summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-11-14 22:03:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-06 17:35:21 +0900
commitea8587aa203adc19b8d3aa0b736185c2c6130684 (patch)
tree567722b3611934da5261740ed5ef68944580c17e
parent82ef179f47c18e9f33a3dee156523fd7bcd64b11 (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
-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.c28
-rw-r--r--src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c5
15 files changed, 97 insertions, 34 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 b1cab58135..f82f1b5724 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 eb4a83800e..c4f3e9c062 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -2201,6 +2201,18 @@ _elm_code_widget_elm_widget_theme_apply(Eo *obj, Elm_Code_Widget_Data *pd)
2201 int r, g, b, a; 2201 int r, g, b, a;
2202 unsigned int i; 2202 unsigned int i;
2203 Evas_Object *grid, *background; 2203 Evas_Object *grid, *background;
2204 const char *fontname, *fontsize;
2205
2206 if (!efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)))
2207 {
2208 CRI("Failed to set layout!");
2209 return EFL_UI_THEME_APPLY_FAILED;
2210 }
2211
2212 fontname = edje_object_data_get(elm_layout_edje_get(obj), "font.name");
2213 fontsize = edje_object_data_get(elm_layout_edje_get(obj), "font.size");
2214 if (fontname && fontsize)
2215 _elm_code_widget_font_set(obj, pd, fontname, atoi(fontsize));
2204 2216
2205 edje = elm_layout_edje_get(obj); 2217 edje = elm_layout_edje_get(obj);
2206 edje_object_color_class_get(edje, "elm/code/status/default", &r, &g, &b, &a, 2218 edje_object_color_class_get(edje, "elm/code/status/default", &r, &g, &b, &a,
@@ -2222,12 +2234,19 @@ EOLIAN static void
2222_elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd) 2234_elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
2223{ 2235{
2224 Evas_Object *background, *gridrows, *scroller; 2236 Evas_Object *background, *gridrows, *scroller;
2225 const char *fontname, *fontsize; 2237 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
2238
2239 if (!elm_widget_theme_klass_get(obj))
2240 elm_widget_theme_klass_set(obj, "code");
2241 elm_widget_theme_element_set(obj, "layout");
2226 2242
2227 efl_canvas_group_add(efl_super(obj, ELM_CODE_WIDGET_CLASS)); 2243 efl_canvas_group_add(efl_super(obj, ELM_CODE_WIDGET_CLASS));
2228 elm_object_focus_allow_set(obj, EINA_TRUE); 2244 elm_object_focus_allow_set(obj, EINA_TRUE);
2229 2245
2230 if (!elm_layout_theme_set(obj, "code", "layout", elm_widget_style_get(obj))) 2246 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
2247 elm_widget_theme_klass_get(obj),
2248 elm_widget_theme_element_get(obj),
2249 elm_widget_theme_style_get(obj)))
2231 CRI("Failed to set layout!"); 2250 CRI("Failed to set layout!");
2232 2251
2233 scroller = elm_scroller_add(obj); 2252 scroller = elm_scroller_add(obj);
@@ -2244,11 +2263,6 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
2244 evas_object_show(background); 2263 evas_object_show(background);
2245 elm_object_part_content_set(scroller, "elm.swallow.background", background); 2264 elm_object_part_content_set(scroller, "elm.swallow.background", background);
2246 2265
2247 fontname = edje_object_data_get(elm_layout_edje_get(obj), "font.name");
2248 fontsize = edje_object_data_get(elm_layout_edje_get(obj), "font.size");
2249 if (fontname && fontsize)
2250 _elm_code_widget_font_set(obj, pd, fontname, atoi(fontsize));
2251
2252 gridrows = elm_box_add(scroller); 2266 gridrows = elm_box_add(scroller);
2253 evas_object_size_hint_weight_set(gridrows, EVAS_HINT_EXPAND, 0.0); 2267 evas_object_size_hint_weight_set(gridrows, EVAS_HINT_EXPAND, 0.0);
2254 evas_object_size_hint_align_set(gridrows, EVAS_HINT_FILL, 0.0); 2268 evas_object_size_hint_align_set(gridrows, EVAS_HINT_FILL, 0.0);
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 }