Commit Graph

136 Commits

Author SHA1 Message Date
Mike Blumenkrantz 3f3582af26 elm/fileselector: return early in theme_apply during construction
Summary:
the remainder of this function is used to setup styles for subobjects
which don't yet exist at this point

@fix
Depends on D8984

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8985
2019-05-29 12:29:04 -04:00
Marcel Hollerbach 41e1dadbf1 elementary: do not emit new events in legacy
Summary:
This commits prepares the tree in order to mess with the events in the
Efl.Ui.Clickable event. Events which have been emitted in a none legacy
widget, are now emitted either with evas, when the widget is legacy due
to inheritance. Or via the normal event and normal event functions.

In case the widget is a legacy only widget (not used at all in the new
api), then the events are for now emitted with
evas_object_smart_callback_call.

Cases where event handlers have been added to legacy widgets, smart
events are now used, and not the eo one anymore.

ref T7844

Depends on D8813

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7844

Differential Revision: https://phab.enlightenment.org/D8816
2019-05-13 15:14:13 -04:00
Cedric BAIL 5fa78a44d8 elementary: move Fileselector to rely on Efl.FilterModel for filtering instead of custom logic.
This simply a bit the logic of things, but more refactoring would be nice for this widget.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8799
2019-05-10 11:00:35 -07:00
Cedric BAIL 44fb906c4f elementary: enforce Efl.IoModel as a base type for fileselector.
On the long run, we might just want to have an Efl.Model dedicated to
be used by fileselector and inherit Efl.IoModel from it. At the moment,
we don't, but I think it is still best to rely on this assumption to
make the fileselector code simpler.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8654
2019-04-21 11:36:47 +02:00
Cedric BAIL 3715faf965 elementary: ensure that the parent model is still alive when resolving future for fileselector.
This future where relying on the parent model being alive to work (efl_parent_get). For
that reason we should have been using efl_future_then with the parent Model as a measure
to make sure this is always the case.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8500
2019-04-18 16:19:47 -07:00
Yeongjong Lee 41136db8e8 ui.widget: remove elm_widget_sub_object_parent_add from each of widgets
since commit a1addad60e, To add myself as a sub object of parent object will be
done in Efl.Ui.Widget constructor.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8280
2019-04-18 11:01:19 +02:00
Cedric BAIL 9afd12324b elementary: fix error path during shutdown of fileselector.
During shutdown, sometimes, we can have an error generated on the object
while it is invalidating, but before it is invalidated. This lead to
properties on the object to change to an error state and trigger the
properties changed logic. At this point, the parent has already been
destroyed and we don't really have anything more to do. So let's not
do anything.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8502
2019-04-06 13:13:38 -07:00
Cedric BAIL 37663b27df elementary: remove some asynchronous behavior from the fileselector.
Marcel notted that when using the LIST view of the fileselector on a
big directory, we end up having to wait for the entire genlist to be
populated to be able to switch to another directory. This is actually
a side effect of the populate code being triggered through an idler.
This idler was useful when the list was populated directly, but now
that we rely on Efl.Io.Model, we should be asynchronous enough that
it shouldn't be a problem to actually not be asynchronous here. By
removing the reliance on the idler, we are not queued after all the
idler and can properly short circuit all of that.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8491
2019-03-28 09:30:01 +01:00
Marcel Hollerbach 197210cde2 elc_filselector: solve the mysterium of sometimes failing tests
so after a phone call, two days of debugging, tears, crying etc. etc. we
finally came to a point of enlightenment! *Someone* (bu5hm4n) moved
gengrid and genlist events from eo back to smart events, so we can work
arround legacy borks and event-name collisions, at this point he did not
knew that some widgets (fileselector) already relied on those *lovely*
events. Hence this broke theoretically the testsuite, however, the
fileselector testsuite is ultimatily buggy, and the wait function does
not return false when it timeouts, (i don't know why not). So this break
was never discovered.

Additionally there is a second issue. it appears, that when we
immidiatly quit the mainloop after we have got the selected callback,
that then genlist decides to forget about the sd->selected pointer, and
NULLs that one out. Which then results in the fact that
elm_fileselector_selected_get ends up returning invalid paths.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8488
2019-03-27 15:03:41 -07:00
Cedric BAIL 8ab3f3319e elementary: make sure that the model parent being used is always the fileselector.
Model provided by an item selection would have there parent being the current
model of the fileselector. Once that one is replaced by the item model, it would
automatically invalidate the model and break any further request. This lead to
a bug where you could only get into one directory before everything else
being empty.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8450
2019-03-27 15:03:39 -07:00
Cedric BAIL 1eb49b2e9b elementary: prevent asynchronous properties change to believe target is ready when it is not in fileselector.
In some case, the properties changed event would be triggered first on the object model
instead of the target model. This now enforce that the target will be the first model
to handle and react on the information.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8449
2019-03-27 15:03:37 -07:00
Cedric BAIL db618e179a elementary: fix fileselector entry support to define path manually.
There was no need in the first place to do all this asynchronous work here.
It is more robust to do it in sync.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8448
2019-03-27 15:03:35 -07:00
Cedric BAIL 3bbaf71b68 elementary: destroy fileselector children when they are not itemized yet.
As we now do everything asynchronously, we do have model representing child
of the main model that don't provide enough information to be displayed yet.
This are not tracked by a genlist item, nor are they a child of the
fileselector. To properly handle their lifecycle, it is necessary to unref
them manually explicitely.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8375
2019-03-27 15:03:24 -07:00
Cedric BAIL 9cadba3387 elementary: improve lifecycle of model object in the fileselector widget.
This is a minimal change and it would be best to refactor the code completely
using all the infrastructure we have now instead of the organically grown code,
but I am afraid of doing such a big change at this point of our release cycle.

Part of the improvement are use of efl_replace to make sure Eo object reference
are set to NULL once reference are dropped. Handling the case when a processed
child is actually pointing to an error. Also it is not supported by model to
get their parent stolen, so this has been fixed too. Finally setting the path
asynchronously was creating more trouble than needed, when it could be done in
a synchronous way.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8336
2019-03-27 15:03:20 -07:00
Cedric BAIL 791ca77a68 elementary: split the smart callback event name from the Eo name when needed.
This fix the borkage of the "selected" smart event not being triggered.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8332
2019-03-27 15:03:10 -07:00
Marcel Hollerbach 11003bcae3 efl_ui: rename select and unselected of efl_ui_selectable
Summary:
this was conflicting with a model event. Prefixing it with "item,"
resolves this, and describes better what it does.
Depends on D8413

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8414
2019-03-19 16:30:19 -04:00
Marcel Hollerbach c9cdb916cd Revert "efl_ui_selectable: namespace events to avoid conflicts"
Summary:
This reverts commit f629f11bed.

This breaks legacy events. As the selected event is used in legacy
widgets. Also this commits mixed up two different concepts, selection in
a entry etc. and selection of a item.
Depends on D8411

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8412
2019-03-19 16:29:39 -04:00
Cedric BAIL c5560bf2ef eo: efl_object_legacy_only_event_description_get is an internal only function, make it so.
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8361
2019-03-15 11:54:24 +01:00
Mike Blumenkrantz f629f11bed efl_ui_selectable: namespace events to avoid conflicts
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8261
2019-03-08 12:17:54 -08:00
Mike Blumenkrantz 1ae67a9286 elm_fileselector: some misc include fixes for compiling
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8232
2019-03-07 14:17:16 -08:00
Mike Blumenkrantz c4fdda1fb0 elm_genlist*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8171
2019-03-07 14:15:20 -08:00
Mike Blumenkrantz bb85bb6b1d elm_gengrid*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8169
2019-03-07 14:15:18 -08:00
Mike Blumenkrantz a156cc2289 elm_fileselector*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8167
2019-03-07 14:15:14 -08:00
Mike Blumenkrantz a8057a3403 elm_entry: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8166
2019-03-07 14:15:12 -08:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
Summary:
now that the error codes have been change to be compatible with eina_error,
this can be removed and will work through eina_error naturally

fix T7718

Depends on D8067

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04 13:37:07 -05:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
Summary:
Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged
as @beta. This means that any app (and the EFL code) wanting to use BETA features
has to enable them class by class, which is cumbersome.
This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT
guard, so apps only need to define one symbol to access BETA features.

Any usage of the per-class guards has been removed from the EFL code and examples.
When building EFL the global guard is defined by configure, so all EFL methods
already have access to BETA API.
Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to
use BETA API have to define this symbol before including any EFL header
(It has been added to the examples requiring it).

Test Plan:
make && make check && make examples still work, but there's a lot less #defines
in the code

Reviewers: zmike, bu5hm4n, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6788

Differential Revision: https://phab.enlightenment.org/D7924
2019-02-13 18:09:17 +01:00
SangHyeon Jade Lee 5525c89a3d efl_model : rename all efl_model based classes.
Summary:
As the result of discussion in T7458,
we need to rename all efl_model based classes with efl_XXX_Model sequence.
I've run few vote for this, see V42, V43
few classes are totally renamed as our consideration of misnaming.

| Efl.Model_Loop | Efl.Loop_Model |
| Efl.Model_Item | Efl.Generic_Model |
| Efl.Model_Container | Efl.Container_Model |
| Efl.Model_Container_Item | Efl.Container_Model_Item |
| Efl.Model_Composite | Efl.Composite_Model |
| Efl.Model_Composite_Boolean | Efl.Boolean_Model |
| Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item |
| Efl.Model_Composite_Selection | Efl.Select_Model |
| Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item |
| Efl.Model_View | Efl.View_Model |
| Eio.Model | Efl.Io.Model |
| Efl.Ui.Model_State | Efl.Ui.State_Model |
| Efl.Ui.Model_Size | Efl.Ui.Size_Model |
| Efl.Ui.Model_Exact | Efl.Ui.Exact_Model |
| Efl.Ui.Model_Average | Efl.Ui.Average_Model |
| Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model |

I worried about Efl.Io.Model changes, cause it is widely used,
but as I tested, there is no issue found yet.

Eldbus.Model also may can changed Efl.Dbus.Model,
but I cannot found any class who using Efl.Dbus namespace,
so I left it future work.

Test Plan:
Run the Make Test,
it works well except Efl test about selection.
there are class inheritance problem exist in select_model,
I reported it and will fix it in another patch.

Reviewers: cedric, felipealmeida, woohyun, Hermet

Reviewed By: cedric

Subscribers: lauromoura

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D7533
2019-01-31 14:59:37 +09:00
Cedric BAIL 5de51f84fb eo: rename efl_future_Eina_FutureXXX_then in efl_future_then as this has been available for some time.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7327
2018-11-23 11:39:43 -08:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Marcel Hollerbach 9f758dc363 elm: update widgets that have documented focus and unfocused events
this emits focus and unfocus on those widgets.

fixes T7386

Depends on D7124

Differential Revision: https://phab.enlightenment.org/D7103
2018-11-15 13:55:37 +01:00
Carsten Haitzler 665a75378f xxx - fix eina_future_then calls to pass sotrage val - fix warns 2018-11-09 11:43:59 +00:00
Youngbok Shin 6a8f2ce863 elementary: remove meaningless memory allocation and leaking
'evt_data' was allocated. Actually, it was not used in anywhere in its function.
@fix
Differential Revision: https://phab.enlightenment.org/D7086
2018-09-21 09:27:48 +02:00
Marcel Hollerbach 92820dbb88 elm_fileselector: move to focus compostition
Summary:
elm_fileselector was using efl_ui_widget_state_apply to call for internal chain update.
This internal chain update was relying on efl_ui_focus_object_manager_get, which
results in a wrong value at this time, since the value is still the old one and not the
current one. (This behaviour will be updated after the release). Focus composition
solves this issue by not relying on the properties of efl.ui.focus_object, but rather
take the values from the configuration in the state_apply call.

fix T6147
fix T7105

Reviewers: zmike, stefan_schmidt, segfaultxavi, devilhorns, herdsman

Reviewed By: zmike

Subscribers: herdsman, cedric, #committers

Tags: #efl

Maniphest Tasks: T7105, T6147

Differential Revision: https://phab.enlightenment.org/D6552
2018-07-12 09:33:38 -04:00
Cedric BAIL 311e35a0dd elementary: prevent model from being invalidated when their parent model get destroyed. 2018-05-24 16:02:21 -07:00
Cedric BAIL 40af4fe94b elementary: refactor filesector target cleanup to not leave function handler behind. 2018-05-24 16:02:21 -07:00
Cedric BAIL 85598a8a40 elementary: make sure to use the model that generated the event to fetch information from. 2018-05-24 16:02:21 -07:00
Cedric BAIL b5b9f72f57 elementary: when there is no file listed yet, no need to request them. 2018-05-24 16:02:19 -07:00
Cedric BAIL 590304d597 eio: properly handle Eio.Model lifecycle inside Elm.Fileselector.
Differential Revision: https://phab.enlightenment.org/D6107
2018-05-24 16:02:18 -07:00
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
Cedric BAIL 380c45722b elementary: unreak non tree mode for fileselector.
The model can outlive the item which resulted in keeping a dead reference in the model.
2018-05-05 21:27:31 -07:00
Cedric Bail 94d9a0fd24 elementary: fix fileselector tree mode to properly nest files into directory. 2018-05-02 10:46:34 -07:00
Cedric BAIL 8093eca7f3 elementary: migrate filesector to use the new Efl.Model API. 2018-05-01 10:39:01 -07:00
Xavi Artigas 9dcc31ed4a Efl.Access.Object (from Efl.Access)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:24 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Carsten Haitzler 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Mike Blumenkrantz 57c07757c7 fileselector: remove 'model' property
this is already extant in Efl.Ui.View
2018-02-15 13:11:01 -05:00
Mike Blumenkrantz 5263f311f4 efl_widget_item: remove 'del'
this now uses regular efl_del
2018-02-15 13:11:00 -05:00
Yeongjong Lee 210db8fc5d efl_ui_focus: merge efl_ui_focus_user and efl_ui_focus_object into one mixin
Summary:
focus_user and focus_object are similar classes. by merging them into
one mixin, we can maintain consistency.

Test Plan: make check

Reviewers: bu5hm4n

Subscribers: cedric, Jaehyun_Cho, woohyun, jpeg

Differential Revision: https://phab.enlightenment.org/D5734
2018-01-16 22:39:13 +01:00