summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-11-14 22:03:25 +0900
committerSungtaek Hong <sth253.hong@samsung.com>2017-12-08 16:02:22 +0900
commitfc8cc4a9b3407b826d0cf2e17bb0d34399a52d37 (patch)
tree20bc7fcc84e405da4f8e5c3fa304cfd4def7b8ab /src
parentf80ab519af3eaf049cfece5fce21dce52f6065a4 (diff)
efl_ui_widget: find theme just once in layout inherited widget
When a widget inherits layout in tries to set theme in group_add or in constructor. When another widget inherits the previous widget, it sets layout again with new klass name. This sets klass in the widget and sets layout in super class, so that it can set layout only once. Test Plan: Run efl_ui_widget related elementary test. Reviewers: jpeg, cedric, woohyun, singh.amitesh Differential Revision: https://phab.enlightenment.org/D5473
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_bg.c8
-rw-r--r--src/lib/elementary/efl_ui_button.c8
-rw-r--r--src/lib/elementary/efl_ui_calendar.c8
-rw-r--r--src/lib/elementary/efl_ui_check.c5
-rw-r--r--src/lib/elementary/efl_ui_clock.c12
-rw-r--r--src/lib/elementary/efl_ui_frame.c7
-rw-r--r--src/lib/elementary/efl_ui_multibuttonentry.c8
-rw-r--r--src/lib/elementary/efl_ui_nstate.c5
-rw-r--r--src/lib/elementary/efl_ui_panes.c8
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c8
-rw-r--r--src/lib/elementary/efl_ui_radio.c5
-rw-r--r--src/lib/elementary/efl_ui_slider.c8
-rw-r--r--src/lib/elementary/efl_ui_video.c8
-rw-r--r--src/lib/elementary/elm_code_widget.c10
-rw-r--r--src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c5
15 files changed, 85 insertions, 28 deletions
diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c
index 3a38c4a284..38ac41a37c 100644
--- a/src/lib/elementary/efl_ui_bg.c
+++ b/src/lib/elementary/efl_ui_bg.c
@@ -97,10 +97,13 @@ _on_resize(void *data,
97EOLIAN static void 97EOLIAN static void
98_efl_ui_bg_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Bg_Data *priv) 98_efl_ui_bg_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Bg_Data *priv)
99{ 99{
100 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
100 101
101 priv->rect = evas_object_rectangle_add(evas_object_evas_get(obj)); 102 priv->rect = evas_object_rectangle_add(evas_object_evas_get(obj));
102 evas_object_color_set(priv->rect, 0, 0, 0, 0); 103 evas_object_color_set(priv->rect, 0, 0, 0, 0);
103 104
105 if (!elm_widget_theme_klass_get(obj))
106 elm_widget_theme_klass_set(obj, "bg");
104 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 107 efl_canvas_group_add(efl_super(obj, MY_CLASS));
105 elm_widget_sub_object_parent_add(obj); 108 elm_widget_sub_object_parent_add(obj);
106 elm_widget_can_focus_set(obj, EINA_FALSE); 109 elm_widget_can_focus_set(obj, EINA_FALSE);
@@ -109,7 +112,10 @@ _efl_ui_bg_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Bg_Data *priv)
109 112
110 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _on_resize, obj); 113 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _on_resize, obj);
111 114
112 if (!elm_layout_theme_set(obj, "bg", "base", elm_widget_style_get(obj))) 115 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
116 elm_widget_theme_klass_get(obj),
117 elm_widget_theme_element_get(obj),
118 elm_widget_theme_style_get(obj)))
113 CRI("Failed to set layout!"); 119 CRI("Failed to set layout!");
114 elm_layout_content_set(obj, "elm.swallow.rectangle", priv->rect); 120 elm_layout_content_set(obj, "elm.swallow.rectangle", priv->rect);
115} 121}
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index 2f820baae3..5c1dd73035 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -270,6 +270,8 @@ _efl_ui_button_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Button_Data *_pd EINA_
270{ 270{
271 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 271 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
272 272
273 if (!elm_widget_theme_klass_get(obj))
274 elm_widget_theme_klass_set(obj, "button");
273 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 275 efl_canvas_group_add(efl_super(obj, MY_CLASS));
274 elm_widget_sub_object_parent_add(obj); 276 elm_widget_sub_object_parent_add(obj);
275 277
@@ -292,7 +294,11 @@ _efl_ui_button_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Button_Data *_pd EINA_
292 (_elm_access_info_get(obj), ELM_ACCESS_STATE, _access_state_cb, obj); 294 (_elm_access_info_get(obj), ELM_ACCESS_STATE, _access_state_cb, obj);
293 295
294 elm_widget_can_focus_set(obj, EINA_TRUE); 296 elm_widget_can_focus_set(obj, EINA_TRUE);
295 if (!elm_layout_theme_set(obj, "button", "base", elm_widget_style_get(obj))) 297
298 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
299 elm_widget_theme_klass_get(obj),
300 elm_widget_theme_element_get(obj),
301 elm_widget_theme_style_get(obj)))
296 CRI("Failed to set layout!"); 302 CRI("Failed to set layout!");
297} 303}
298 304
diff --git a/src/lib/elementary/efl_ui_calendar.c b/src/lib/elementary/efl_ui_calendar.c
index 8b8a82da9a..2f42a7993d 100644
--- a/src/lib/elementary/efl_ui_calendar.c
+++ b/src/lib/elementary/efl_ui_calendar.c
@@ -1000,8 +1000,12 @@ _efl_ui_calendar_constructor_internal(Eo *obj, Efl_Ui_Calendar_Data *priv)
1000 1000
1001 elm_widget_can_focus_set(obj, EINA_TRUE); 1001 elm_widget_can_focus_set(obj, EINA_TRUE);
1002 1002
1003 if (!elm_layout_theme_set(obj, "calendar", "base", 1003 if (!elm_widget_theme_klass_get(obj))
1004 elm_object_style_get(obj))) 1004 elm_widget_theme_klass_set(obj, "calendar");
1005 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
1006 elm_widget_theme_klass_get(obj),
1007 elm_widget_theme_element_get(obj),
1008 elm_widget_theme_style_get(obj)))
1005 CRI("Failed to set layout!"); 1009 CRI("Failed to set layout!");
1006 1010
1007 _spinner_buttons_add(obj, priv); 1011 _spinner_buttons_add(obj, priv);
diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c
index c79e430756..fc4ff5c7e4 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -320,13 +320,12 @@ elm_check_add(Evas_Object *parent)
320EOLIAN static Eo * 320EOLIAN static Eo *
321_efl_ui_check_efl_object_constructor(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED) 321_efl_ui_check_efl_object_constructor(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED)
322{ 322{
323 if (!elm_widget_theme_klass_get(obj))
324 elm_widget_theme_klass_set(obj, "check");
323 obj = efl_constructor(efl_super(obj, MY_CLASS)); 325 obj = efl_constructor(efl_super(obj, MY_CLASS));
324 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); 326 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
325 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 327 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
326 328
327 if (!elm_layout_theme_set(obj, "check", "base", elm_widget_style_get(obj)))
328 CRI("Failed to set layout!");
329
330 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 329 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
331 efl_layout_signal_callback_add 330 efl_layout_signal_callback_add
332 (wd->resize_obj, "elm,action,check,on", "*", _on_check_on, obj); 331 (wd->resize_obj, "elm,action,check,on", "*", _on_check_on, obj);
diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c
index b205c93991..15d1f1e173 100644
--- a/src/lib/elementary/efl_ui_clock.c
+++ b/src/lib/elementary/efl_ui_clock.c
@@ -821,10 +821,19 @@ _efl_ui_clock_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Clock_Data *priv)
821{ 821{
822 Clock_Field *field; 822 Clock_Field *field;
823 int idx; 823 int idx;
824 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
824 825
826 if (!elm_widget_theme_klass_get(obj))
827 elm_widget_theme_klass_set(obj, "uiclock");
825 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 828 efl_canvas_group_add(efl_super(obj, MY_CLASS));
826 elm_widget_sub_object_parent_add(obj); 829 elm_widget_sub_object_parent_add(obj);
827 830
831 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
832 elm_widget_theme_klass_get(obj),
833 elm_widget_theme_element_get(obj),
834 elm_widget_theme_style_get(obj)))
835 CRI("Failed to set layout!");
836
828 // module - initialise module for clock 837 // module - initialise module for clock
829 if (!dt_mod) dt_mod = _dt_mod_init(); 838 if (!dt_mod) dt_mod = _dt_mod_init();
830 if (dt_mod) 839 if (dt_mod)
@@ -854,9 +863,6 @@ _efl_ui_clock_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Clock_Data *priv)
854 else WRN("Failed to load clock module, clock widget may not show properly!"); 863 else WRN("Failed to load clock module, clock widget may not show properly!");
855 864
856 priv->freeze_sizing = EINA_TRUE; 865 priv->freeze_sizing = EINA_TRUE;
857 if (!elm_layout_theme_set(obj, "uiclock", "base",
858 elm_widget_style_get(obj)))
859 CRI("Failed to set layout!");
860 866
861 _field_list_init(obj); 867 _field_list_init(obj);
862 _reload_format(obj); 868 _reload_format(obj);
diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c
index 20439889d5..74e6e9bfb0 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -117,6 +117,8 @@ _efl_ui_frame_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Frame_Data *_pd EINA_UN
117{ 117{
118 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 118 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
119 119
120 if (!elm_widget_theme_klass_get(obj))
121 elm_widget_theme_klass_set(obj, "frame");
120 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 122 efl_canvas_group_add(efl_super(obj, MY_CLASS));
121 elm_widget_sub_object_parent_add(obj); 123 elm_widget_sub_object_parent_add(obj);
122 124
@@ -129,7 +131,10 @@ _efl_ui_frame_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Frame_Data *_pd EINA_UN
129 131
130 elm_widget_can_focus_set(obj, EINA_FALSE); 132 elm_widget_can_focus_set(obj, EINA_FALSE);
131 133
132 if (!elm_layout_theme_set(obj, "frame", "base", elm_widget_style_get(obj))) 134 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
135 elm_widget_theme_klass_get(obj),
136 elm_widget_theme_element_get(obj),
137 elm_widget_theme_style_get(obj)))
133 CRI("Failed to set layout!"); 138 CRI("Failed to set layout!");
134 139
135 elm_layout_sizing_eval(obj); 140 elm_layout_sizing_eval(obj);
diff --git a/src/lib/elementary/efl_ui_multibuttonentry.c b/src/lib/elementary/efl_ui_multibuttonentry.c
index 03334a6457..f4f14f6328 100644
--- a/src/lib/elementary/efl_ui_multibuttonentry.c
+++ b/src/lib/elementary/efl_ui_multibuttonentry.c
@@ -1558,11 +1558,15 @@ _efl_ui_multibuttonentry_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Multibuttone
1558{ 1558{
1559 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 1559 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
1560 1560
1561 if (!elm_widget_theme_klass_get(obj))
1562 elm_widget_theme_klass_set(obj, "multibuttonentry");
1561 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 1563 efl_canvas_group_add(efl_super(obj, MY_CLASS));
1562 elm_widget_sub_object_parent_add(obj); 1564 elm_widget_sub_object_parent_add(obj);
1563 1565
1564 if (!elm_layout_theme_set 1566 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
1565 (obj, "multibuttonentry", "base", elm_widget_style_get(obj))) 1567 elm_widget_theme_klass_get(obj),
1568 elm_widget_theme_element_get(obj),
1569 elm_widget_theme_style_get(obj)))
1566 CRI("Failed to set layout!"); 1570 CRI("Failed to set layout!");
1567 1571
1568 elm_widget_can_focus_set(obj, EINA_FALSE); 1572 elm_widget_can_focus_set(obj, EINA_FALSE);
diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c
index 7eab66de57..99c3a766d5 100644
--- a/src/lib/elementary/efl_ui_nstate.c
+++ b/src/lib/elementary/efl_ui_nstate.c
@@ -38,6 +38,8 @@ _on_state_changed(void *data,
38EOLIAN static Efl_Object * 38EOLIAN static Efl_Object *
39_efl_ui_nstate_efl_object_constructor(Eo *obj, Efl_Ui_Nstate_Data *pd) 39_efl_ui_nstate_efl_object_constructor(Eo *obj, Efl_Ui_Nstate_Data *pd)
40{ 40{
41 if (!elm_widget_theme_klass_get(obj))
42 elm_widget_theme_klass_set(obj, "nstate");
41 obj = efl_constructor(efl_super(obj, MY_CLASS)); 43 obj = efl_constructor(efl_super(obj, MY_CLASS));
42 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 44 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
43 elm_widget_sub_object_parent_add(obj); 45 elm_widget_sub_object_parent_add(obj);
@@ -46,9 +48,6 @@ _efl_ui_nstate_efl_object_constructor(Eo *obj, Efl_Ui_Nstate_Data *pd)
46 // Default: 2 states 48 // Default: 2 states
47 pd->nstate = 2; 49 pd->nstate = 2;
48 50
49 if (!elm_layout_theme_set(obj, "nstate", "base", elm_widget_style_get(obj)))
50 CRI("Failed to set layout!");
51
52 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 51 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
53 efl_layout_signal_callback_add 52 efl_layout_signal_callback_add
54 (wd->resize_obj, "elm,action,state,changed", "*", _on_state_changed, obj); 53 (wd->resize_obj, "elm,action,state,changed", "*", _on_state_changed, obj);
diff --git a/src/lib/elementary/efl_ui_panes.c b/src/lib/elementary/efl_ui_panes.c
index 893ee1d72a..706dbcc603 100644
--- a/src/lib/elementary/efl_ui_panes.c
+++ b/src/lib/elementary/efl_ui_panes.c
@@ -391,11 +391,15 @@ _efl_ui_panes_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Panes_Data *_pd EINA_UN
391 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 391 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
392 EFL_UI_PANES_DATA_GET(obj, sd); 392 EFL_UI_PANES_DATA_GET(obj, sd);
393 393
394 if (!elm_widget_theme_klass_get(obj))
395 elm_widget_theme_klass_set(obj, "panes");
394 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 396 efl_canvas_group_add(efl_super(obj, MY_CLASS));
395 elm_widget_sub_object_parent_add(obj); 397 elm_widget_sub_object_parent_add(obj);
396 398
397 if (!elm_layout_theme_set 399 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
398 (obj, "panes", "vertical", elm_widget_style_get(obj))) 400 elm_widget_theme_klass_get(obj),
401 _efl_ui_panes_theme_group_get(obj, sd),
402 elm_widget_theme_style_get(obj)))
399 CRI("Failed to set layout!"); 403 CRI("Failed to set layout!");
400 404
401 elm_panes_content_left_size_set(obj, 0.5); 405 elm_panes_content_left_size_set(obj, 0.5);
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index 9764f12748..c4754e8e08 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -353,14 +353,18 @@ _efl_ui_progressbar_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Progressbar_Data
353{ 353{
354 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 354 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
355 355
356 if (!elm_widget_theme_klass_get(obj))
357 elm_widget_theme_klass_set(obj, "progressbar");
356 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 358 efl_canvas_group_add(efl_super(obj, MY_CLASS));
357 elm_widget_sub_object_parent_add(obj); 359 elm_widget_sub_object_parent_add(obj);
358 360
359 priv->dir = EFL_UI_DIR_RIGHT; 361 priv->dir = EFL_UI_DIR_RIGHT;
360 priv->val = MIN_RATIO_LVL; 362 priv->val = MIN_RATIO_LVL;
361 363
362 if (!elm_layout_theme_set 364 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
363 (obj, "progressbar", "horizontal", elm_widget_style_get(obj))) 365 elm_widget_theme_klass_get(obj),
366 _efl_ui_progressbar_theme_group_get(obj, priv),
367 elm_widget_theme_style_get(obj)))
364 CRI("Failed to set layout!"); 368 CRI("Failed to set layout!");
365 369
366 efl_ui_format_string_set(obj, "%.0f %%"); 370 efl_ui_format_string_set(obj, "%.0f %%");
diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c
index 56b901f80c..cd5c157b3f 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -204,13 +204,12 @@ _access_state_cb(void *data EINA_UNUSED, Evas_Object *obj)
204EOLIAN static Eo * 204EOLIAN static Eo *
205_efl_ui_radio_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Data *pd) 205_efl_ui_radio_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Data *pd)
206{ 206{
207 if (!elm_widget_theme_klass_get(obj))
208 elm_widget_theme_klass_set(obj, "radio");
207 obj = efl_constructor(efl_super(obj, MY_CLASS)); 209 obj = efl_constructor(efl_super(obj, MY_CLASS));
208 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); 210 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
209 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 211 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
210 212
211 if (!elm_layout_theme_set(obj, "radio", "base", elm_widget_style_get(obj)))
212 CRI("Failed to set layout!");
213
214 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 213 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
215 elm_layout_signal_callback_add 214 elm_layout_signal_callback_add
216 (obj, "elm,action,radio,toggle", "*", _radio_on_cb, obj); 215 (obj, "elm,action,radio,toggle", "*", _radio_on_cb, obj);
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 2a02116d5d..8c57e64598 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -1130,6 +1130,8 @@ _efl_ui_slider_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Slider_Data *priv)
1130{ 1130{
1131 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 1131 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
1132 1132
1133 if (!elm_widget_theme_klass_get(obj))
1134 elm_widget_theme_klass_set(obj, "slider");
1133 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 1135 efl_canvas_group_add(efl_super(obj, MY_CLASS));
1134 elm_widget_sub_object_parent_add(obj); 1136 elm_widget_sub_object_parent_add(obj);
1135 1137
@@ -1141,8 +1143,10 @@ _efl_ui_slider_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Slider_Data *priv)
1141 priv->wheel_indicator_duration = 0.25; 1143 priv->wheel_indicator_duration = 0.25;
1142 priv->step = SLIDER_STEP; 1144 priv->step = SLIDER_STEP;
1143 1145
1144 if (!elm_layout_theme_set 1146 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
1145 (obj, "slider", "horizontal", elm_widget_style_get(obj))) 1147 elm_widget_theme_klass_get(obj),
1148 _efl_ui_slider_theme_group_get(obj, priv),
1149 elm_widget_theme_style_get(obj)))
1146 CRI("Failed to set layout!"); 1150 CRI("Failed to set layout!");
1147 1151
1148 elm_layout_signal_callback_add(obj, "drag", "*", _drag, obj); 1152 elm_layout_signal_callback_add(obj, "drag", "*", _drag, obj);
diff --git a/src/lib/elementary/efl_ui_video.c b/src/lib/elementary/efl_ui_video.c
index 1aac7224ef..70db16e720 100644
--- a/src/lib/elementary/efl_ui_video.c
+++ b/src/lib/elementary/efl_ui_video.c
@@ -219,8 +219,11 @@ _elm_video_check(Evas_Object *video)
219EOLIAN static void 219EOLIAN static void
220_efl_ui_video_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Video_Data *priv) 220_efl_ui_video_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Video_Data *priv)
221{ 221{
222 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
222 _elm_emotion_init(); 223 _elm_emotion_init();
223 224
225 if (!elm_widget_theme_klass_get(obj))
226 elm_widget_theme_klass_set(obj, "video");
224 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 227 efl_canvas_group_add(efl_super(obj, MY_CLASS));
225 elm_widget_sub_object_parent_add(obj); 228 elm_widget_sub_object_parent_add(obj);
226 elm_widget_can_focus_set(obj, EINA_TRUE); 229 elm_widget_can_focus_set(obj, EINA_TRUE);
@@ -229,7 +232,10 @@ _efl_ui_video_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Video_Data *priv)
229 if (!emotion_object_init(priv->emotion, NULL)) 232 if (!emotion_object_init(priv->emotion, NULL))
230 CRI("Failed to init emotion object"); 233 CRI("Failed to init emotion object");
231 234
232 if (!elm_layout_theme_set(obj, "video", "base", elm_widget_style_get(obj))) 235 if (!efl_ui_widget_theme_object_set(obj, wd->resize_obj,
236 elm_widget_theme_klass_get(obj),
237 elm_widget_theme_element_get(obj),
238 elm_widget_theme_style_get(obj)))
233 CRI("Failed to set layout!"); 239 CRI("Failed to set layout!");
234 240
235 elm_layout_content_set(obj, "elm.swallow.video", priv->emotion); 241 elm_layout_content_set(obj, "elm.swallow.video", priv->emotion);
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index 658d975024..ee82acc0df 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -2238,12 +2238,20 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
2238{ 2238{
2239 Evas_Object *gridrows, *scroller; 2239 Evas_Object *gridrows, *scroller;
2240 const char *fontname, *fontsize; 2240 const char *fontname, *fontsize;
2241 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
2242
2243 if (!elm_widget_theme_klass_get(obj))
2244 elm_widget_theme_klass_set(obj, "code");
2245 elm_widget_theme_element_set(obj, "layout");
2241 2246
2242 efl_canvas_group_add(efl_super(obj, ELM_CODE_WIDGET_CLASS)); 2247 efl_canvas_group_add(efl_super(obj, ELM_CODE_WIDGET_CLASS));
2243 elm_object_focus_allow_set(obj, EINA_TRUE); 2248 elm_object_focus_allow_set(obj, EINA_TRUE);
2244 pd->alpha = 255; 2249 pd->alpha = 255;
2245 2250
2246 if (!elm_layout_theme_set(obj, "code", "layout", elm_widget_style_get(obj))) 2251 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
2252 elm_widget_theme_klass_get(obj),
2253 elm_widget_theme_element_get(obj),
2254 elm_widget_theme_style_get(obj)))
2247 CRI("Failed to set layout!"); 2255 CRI("Failed to set layout!");
2248 2256
2249 scroller = elm_scroller_add(obj); 2257 scroller = elm_scroller_add(obj);
diff --git a/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c b/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
index 72884b96a7..9e9d08dcb2 100644
--- a/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
+++ b/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
@@ -310,7 +310,10 @@ field_create(Efl_Ui_Clock_Module_Data *module_data, Efl_Ui_Clock_Type field_typ
310 310
311 if (field_type == EFL_UI_CLOCK_TYPE_AMPM) 311 if (field_type == EFL_UI_CLOCK_TYPE_AMPM)
312 { 312 {
313 field_obj = elm_button_add(ctx_mod->mod_data.base); 313 field_obj = efl_add(EFL_UI_BUTTON_CLASS, ctx_mod->mod_data.base,
314 elm_widget_element_update(ctx_mod->mod_data.base,
315 efl_added,
316 PART_NAME_ARRAY[field_type]));
314 efl_event_callback_add 317 efl_event_callback_add
315 (field_obj, EFL_UI_EVENT_CLICKED, _ampm_clicked_cb, ctx_mod); 318 (field_obj, EFL_UI_EVENT_CLICKED, _ampm_clicked_cb, ctx_mod);
316 } 319 }