summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_panel.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-27 14:00:14 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-27 20:19:23 +0100
commit0b152734ba13d46155b2c1dcc98cd13c79fc804c (patch)
treec561dfae458ad5c53f2f44f2c20db81d28a61167 /src/lib/elementary/efl_ui_panel.c
parent98b4a7bfa74201cccacd62cb84230a194fa8c697 (diff)
efl_ui_widget: redo disable handling
before the disable property was a bit weird. Setting something to disabled=true will disable all children of the widget that is changed. However, only the update function of the children will get the false flag, not the flag itself. Which means, to query the real disabled state, we need to walk up the parent relations. With this patch, every change to disabled will go through the disabled property, which mean, a implementor can just overwrite the disabled property, and adjust its internal state there. Just be carefull, a set to disabled=true still might result in disabled=false. This makes the function on_disable_update unneccesary. Which also cleans up the Efl.Ui.Widget class. ref T7553 Depends on D8016 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D8017
Diffstat (limited to 'src/lib/elementary/efl_ui_panel.c')
-rw-r--r--src/lib/elementary/efl_ui_panel.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/elementary/efl_ui_panel.c b/src/lib/elementary/efl_ui_panel.c
index 77c8ae1..285cebf 100644
--- a/src/lib/elementary/efl_ui_panel.c
+++ b/src/lib/elementary/efl_ui_panel.c
@@ -1156,11 +1156,10 @@ _scroll_cb(Evas_Object *obj, void *data EINA_UNUSED)
1156 (obj, EFL_UI_EVENT_SCROLL, (void *) &event); 1156 (obj, EFL_UI_EVENT_SCROLL, (void *) &event);
1157} 1157}
1158 1158
1159EOLIAN static Eina_Bool 1159EOLIAN static void
1160_efl_ui_panel_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Panel_Data *sd, Eina_Bool disabled) 1160_efl_ui_panel_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Panel_Data *sd, Eina_Bool disabled)
1161{ 1161{
1162 if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled)) 1162 efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
1163 return EINA_FALSE;
1164 1163
1165 if (sd->scrollable) 1164 if (sd->scrollable)
1166 { 1165 {
@@ -1191,8 +1190,6 @@ _efl_ui_panel_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Panel_Data *sd, E
1191 sd->callback_added = EINA_TRUE; 1190 sd->callback_added = EINA_TRUE;
1192 } 1191 }
1193 } 1192 }
1194
1195 return EINA_TRUE;
1196} 1193}
1197 1194
1198EOLIAN static double 1195EOLIAN static double