aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-02 21:15:50 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-04 11:52:16 +0900
commita4940ae6c98072687f1ce0442278551c4b03d06e (patch)
treec02834e8bb9664674efcdc31a2908231a1d31863
parentscroller: Implement default content part (diff)
downloadefl-a4940ae6c98072687f1ce0442278551c4b03d06e.tar.gz
layout: Remove method theme_enable
This was an internal thing, ugly, replaced by another ugly solution, but maybe less ugly. Ref https://phab.enlightenment.org/T5315
-rw-r--r--src/lib/elementary/efl_ui_text.c16
-rw-r--r--src/lib/elementary/efl_ui_text.eo1
-rw-r--r--src/lib/elementary/elm_entry.c16
-rw-r--r--src/lib/elementary/elm_entry.eo1
-rw-r--r--src/lib/elementary/elm_layout.c22
-rw-r--r--src/lib/elementary/elm_layout.eo5
6 files changed, 17 insertions, 44 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 16ae6f6917..64a4935c6a 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -912,12 +912,14 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
{
const char *str;
const char *style = elm_widget_style_get(obj);
+ Elm_Theme_Apply theme_apply;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
- Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
- int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (!int_ret) return ELM_THEME_APPLY_FAILED;
+ // Note: We are skipping elm_layout here! This is by design.
+ // This assumes the following inheritance: my_class -> layout -> widget ...
+ theme_apply = elm_obj_widget_theme_apply(efl_cast(obj, ELM_WIDGET_CLASS));
+ if (!theme_apply) return ELM_THEME_APPLY_FAILED;
evas_event_freeze(evas_object_evas_get(obj));
@@ -1031,7 +1033,7 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
evas_object_unref(obj);
- return int_ret;
+ return theme_apply;
}
static void
@@ -3328,12 +3330,6 @@ _efl_ui_text_efl_canvas_group_group_member_add(Eo *obj, Efl_Ui_Text_Data *sd, Ev
evas_object_raise(sd->hit_rect);
}
-EOLIAN static Eina_Bool
-_efl_ui_text_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd EINA_UNUSED)
-{
- return EINA_FALSE;
-}
-
static void
_cb_added(void *data EINA_UNUSED, const Efl_Event *ev)
{
diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo
index 9793c5146f..d06700e922 100644
--- a/src/lib/elementary/efl_ui_text.eo
+++ b/src/lib/elementary/efl_ui_text.eo
@@ -412,7 +412,6 @@ class Efl.Ui.Text (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
Elm.Widget.disable;
Elm.Widget.sub_object_del;
Elm.Widget.focus_next_manager_is;
- Elm.Layout.theme_enable;
Elm.Layout.sizing_eval;
Elm.Layout.signal_callback_add;
Elm.Layout.signal_callback_del;
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 09de69e8eb..677cd8e0a7 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -862,12 +862,14 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
const char *t;
const char *stl_user;
const char *style = elm_widget_style_get(obj);
+ Elm_Theme_Apply theme_apply;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ELM_THEME_APPLY_FAILED);
- Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
- int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (!int_ret) return ELM_THEME_APPLY_FAILED;
+ // Note: We are skipping elm_layout here! This is by design.
+ // This assumes the following inheritance: my_class -> layout -> widget ...
+ theme_apply = elm_obj_widget_theme_apply(efl_cast(obj, ELM_WIDGET_CLASS));
+ if (!theme_apply) return ELM_THEME_APPLY_FAILED;
evas_event_freeze(evas_object_evas_get(obj));
@@ -1001,7 +1003,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
evas_object_unref(obj);
- return int_ret;
+ return theme_apply;
}
static void
@@ -4010,12 +4012,6 @@ _elm_entry_efl_canvas_group_group_member_add(Eo *obj, Elm_Entry_Data *sd, Evas_O
evas_object_raise(sd->hit_rect);
}
-EOLIAN static Eina_Bool
-_elm_entry_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd EINA_UNUSED)
-{
- return EINA_FALSE;
-}
-
EAPI Evas_Object *
elm_entry_add(Evas_Object *parent)
{
diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo
index 3eb3b3533e..92978ad681 100644
--- a/src/lib/elementary/elm_entry.eo
+++ b/src/lib/elementary/elm_entry.eo
@@ -962,7 +962,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
Elm.Widget.disable;
Elm.Widget.sub_object_del;
Elm.Widget.focus_next_manager_is;
- Elm.Layout.theme_enable;
Elm.Layout.sizing_eval;
Elm.Layout.signal_callback_add;
Elm.Layout.signal_callback_del;
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 1dabb1f356..df3a35dfe8 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -376,19 +376,13 @@ _elm_layout_theme_internal(Eo *obj, Elm_Layout_Smart_Data *sd)
EOLIAN static Elm_Theme_Apply
_elm_layout_elm_widget_theme_apply(Eo *obj, Elm_Layout_Smart_Data *sd)
{
- Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
+ Elm_Theme_Apply theme_apply = ELM_THEME_APPLY_FAILED;
- int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (!int_ret) return ELM_THEME_APPLY_FAILED;
- /* The following lines are here to support entry design; the _theme function
- * of entry needs to call directly the widget _theme function */
- Eina_Bool enable = EINA_TRUE;
- enable = elm_obj_layout_theme_enable(obj);
- if (!enable) return int_ret;
-
- int_ret = _elm_layout_theme_internal(obj, sd) & int_ret;
+ theme_apply = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
+ if (!theme_apply) return ELM_THEME_APPLY_FAILED;
- return int_ret;
+ theme_apply &= _elm_layout_theme_internal(obj, sd);
+ return theme_apply;
}
static void *
@@ -602,12 +596,6 @@ _elm_layout_sub_object_add_enable(Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data *_p
return EINA_TRUE;
}
-EOLIAN static Eina_Bool
-_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
-{
- return EINA_TRUE;
-}
-
EAPI Eina_Bool
_elm_layout_part_aliasing_eval(const Evas_Object *obj,
const char **part,
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index 8d82f96a1a..dd8e0a29d2 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -62,11 +62,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
settings loaded \@ref elm_layout_file_set.]]
}
}
- theme_enable {
- [[Enable theme]]
- legacy: null;
- return: bool; [[$true on success, $false otherwise]]
- }
sizing_eval {
[[Eval sizing.