From 04241767c56c11c05e4cccf1b1df2773f8313b0b Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 27 Feb 2019 13:52:37 -0500 Subject: [PATCH] elementary: remove unnecessessary disabled setter summary_: those objects are disabled anyways, because disabled is applied to the objects in a tree. Which means, subobjects of a widget are disabled whenever the widget is disabled anyways. Depends on D8015 Reviewers: cedric, zmike, segfaultxavi, stefan_schmidt Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D8016 --- src/bin/elementary/test_ctxpopup.c | 3 ++- src/lib/elementary/efl_ui_clock.c | 17 ----------------- src/lib/elementary/efl_ui_clock.eo | 1 - src/lib/elementary/elc_ctxpopup.c | 14 -------------- src/lib/elementary/elc_fileselector_entry.c | 12 ------------ src/lib/elementary/elm_ctxpopup.eo | 1 - src/lib/elementary/elm_fileselector_entry.eo | 1 - 7 files changed, 2 insertions(+), 47 deletions(-) diff --git a/src/bin/elementary/test_ctxpopup.c b/src/bin/elementary/test_ctxpopup.c index 9293647..f547f08 100644 --- a/src/bin/elementary/test_ctxpopup.c +++ b/src/bin/elementary/test_ctxpopup.c @@ -39,10 +39,11 @@ _print_current_dir(Evas_Object *obj) } static void -_btn_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, +_btn_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { printf("Button Clicked\n"); + elm_object_disabled_set(data, !elm_object_disabled_get(data)); } static void diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c index 5379c38..4df0cc8 100644 --- a/src/lib/elementary/efl_ui_clock.c +++ b/src/lib/elementary/efl_ui_clock.c @@ -661,23 +661,6 @@ _efl_ui_clock_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Clock_Data *sd return EINA_TRUE; } -EOLIAN static Eina_Bool -_efl_ui_clock_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Clock_Data *sd, Eina_Bool disabled) -{ - Clock_Field *field; - unsigned int idx = 0; - - if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled)) - return EINA_FALSE; - - for (idx = 0; idx < EFL_UI_CLOCK_TYPE_COUNT; idx++) - { - field = sd->field_list + idx; - elm_object_disabled_set(field->item_obj, disabled); - } - return EINA_TRUE; -} - EOLIAN static void _efl_ui_clock_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Clock_Data *sd) { diff --git a/src/lib/elementary/efl_ui_clock.eo b/src/lib/elementary/efl_ui_clock.eo index 45fdb32..87968c6 100644 --- a/src/lib/elementary/efl_ui_clock.eo +++ b/src/lib/elementary/efl_ui_clock.eo @@ -224,7 +224,6 @@ class @beta Efl.Ui.Clock extends Efl.Ui.Layout implements { Efl.Object.constructor; Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.on_disabled_update; Efl.Ui.Focus.Object.on_focus_update; Efl.Ui.L10n.translation_update; //TIZEN_ONLY(20170807): Apply UI Mirror for Tizen 4.0 UX diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index 94ec00f..518dfc4 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -1167,20 +1167,6 @@ _elm_ctxpopup_item_efl_object_destructor(Eo *eo_ctxpopup_it, efl_destructor(efl_super(eo_ctxpopup_it, ELM_CTXPOPUP_ITEM_CLASS)); } -EOLIAN static Eina_Bool -_elm_ctxpopup_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Ctxpopup_Data *sd, Eina_Bool disabled) -{ - if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled)) - return EINA_FALSE; - - if (sd->list) - elm_object_disabled_set(sd->list, disabled); - else if (sd->content) - elm_object_disabled_set(sd->content, disabled); - - return EINA_TRUE; -} - EOLIAN static void _elm_ctxpopup_efl_canvas_group_group_add(Eo *obj, Elm_Ctxpopup_Data *priv) { diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c index 0c0290e..02b22fe 100644 --- a/src/lib/elementary/elc_fileselector_entry.c +++ b/src/lib/elementary/elc_fileselector_entry.c @@ -158,18 +158,6 @@ _elm_fileselector_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Entr return int_ret; } -EOLIAN static Eina_Bool -_elm_fileselector_entry_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Fileselector_Entry_Data *sd, Eina_Bool disabled) -{ - if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled)) - return EINA_FALSE; - - elm_widget_disabled_set(sd->button, disabled); - elm_widget_disabled_set(sd->entry, disabled); - - return EINA_TRUE; -} - static Eina_Bool _elm_fileselector_entry_text_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, const char *label) { diff --git a/src/lib/elementary/elm_ctxpopup.eo b/src/lib/elementary/elm_ctxpopup.eo index fd6fb33..afed09b 100644 --- a/src/lib/elementary/elm_ctxpopup.eo +++ b/src/lib/elementary/elm_ctxpopup.eo @@ -232,7 +232,6 @@ class Elm.Ctxpopup extends Efl.Ui.Layout implements Efl.Ui.Focus.Layer, Efl.Acce class.constructor; Efl.Object.constructor; Efl.Ui.Widget.widget_parent { set; } - Efl.Ui.Widget.on_disabled_update; Efl.Ui.Widget.widget_sub_object_add; Efl.Ui.L10n.translation_update; Efl.Ui.Widget.theme_apply; diff --git a/src/lib/elementary/elm_fileselector_entry.eo b/src/lib/elementary/elm_fileselector_entry.eo index c9fdc6e..28484ca 100644 --- a/src/lib/elementary/elm_fileselector_entry.eo +++ b/src/lib/elementary/elm_fileselector_entry.eo @@ -7,7 +7,6 @@ class Elm.Fileselector_Entry extends Efl.Ui.Layout implements Elm.Interface.File class.constructor; Efl.Object.constructor; Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.on_disabled_update; Elm.Interface.Fileselector.selected_model { get; set; } Elm.Interface.Fileselector.folder_only { get; set; } Elm.Interface.Fileselector.is_save { get; set; } -- 2.7.4