elementary: remove unnecessessary disabled setter
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 27 Feb 2019 18:52:37 +0000 (13:52 -0500)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:36 +0000 (20:49 +0900)
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 <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8016

src/bin/elementary/test_ctxpopup.c
src/lib/elementary/efl_ui_clock.c
src/lib/elementary/efl_ui_clock.eo
src/lib/elementary/elc_ctxpopup.c
src/lib/elementary/elc_fileselector_entry.c
src/lib/elementary/elm_ctxpopup.eo
src/lib/elementary/elm_fileselector_entry.eo

index 9293647..f547f08 100644 (file)
@@ -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
index 5379c38..4df0cc8 100644 (file)
@@ -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)
 {
index 45fdb32..87968c6 100644 (file)
@@ -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
index 94ec00f..518dfc4 100644 (file)
@@ -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)
 {
index 0c0290e..02b22fe 100644 (file)
@@ -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)
 {
index fd6fb33..afed09b 100644 (file)
@@ -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;
index c9fdc6e..28484ca 100644 (file)
@@ -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; }