summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--legacy/elementary/ChangeLog7
-rw-r--r--legacy/elementary/NEWS1
-rw-r--r--legacy/elementary/src/lib/elm_widget.c13
-rw-r--r--legacy/elementary/src/lib/elm_widget.h1
4 files changed, 20 insertions, 2 deletions
diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog
index cef7b1a4d9..b1986a4379 100644
--- a/legacy/elementary/ChangeLog
+++ b/legacy/elementary/ChangeLog
@@ -1566,3 +1566,10 @@
15662013-08-22 Thiep Ha 15662013-08-22 Thiep Ha
1567 1567
1568 * Add hide effect for notify. 1568 * Add hide effect for notify.
1569
15702013-08-22 ChunEon Park (Hermet)
1571
1572 * Widget: Improve performance in applying widget theme. It prevents
1573 applying themes more strictly if it tries to apply same theme. This
1574 increases the performance hugely in case that user applies a specific
1575 theme to the window object.
diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS
index 2fac39ebab..92f42cf07f 100644
--- a/legacy/elementary/NEWS
+++ b/legacy/elementary/NEWS
@@ -128,6 +128,7 @@ Improvements:
128 * Add support for URL in Elm_Image and Elm_Photocam. 128 * Add support for URL in Elm_Image and Elm_Photocam.
129 * Popup: Support "language,changed" smart callback. 129 * Popup: Support "language,changed" smart callback.
130 * Add hide effect for notify. 130 * Add hide effect for notify.
131 * Widget: Improve performance in applying widget theme. It prevents applying themes more strictly if it tries to apply same theme. This increases the performance hugely in case that user applies a specific theme to the window object.
131 132
132Fixes: 133Fixes:
133 * Now elm_datetime_field_limit_set() can set year limits wihtout problems. 134 * Now elm_datetime_field_limit_set() can set year limits wihtout problems.
diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c
index 1b169ae792..d8fd8f4dff 100644
--- a/legacy/elementary/src/lib/elm_widget.c
+++ b/legacy/elementary/src/lib/elm_widget.c
@@ -1039,6 +1039,8 @@ _elm_widget_sub_object_add(Eo *obj, void *_pd, va_list *list)
1039 (sobj, EVAS_CALLBACK_DEL, _on_sub_obj_del, obj); 1039 (sobj, EVAS_CALLBACK_DEL, _on_sub_obj_del, obj);
1040 if (_elm_widget_is(sobj)) 1040 if (_elm_widget_is(sobj))
1041 { 1041 {
1042 ELM_WIDGET_DATA_GET(sobj, sdc);
1043
1042 evas_object_event_callback_add 1044 evas_object_event_callback_add
1043 (sobj, EVAS_CALLBACK_HIDE, _on_sub_obj_hide, NULL); 1045 (sobj, EVAS_CALLBACK_HIDE, _on_sub_obj_hide, NULL);
1044 1046
@@ -1046,7 +1048,8 @@ _elm_widget_sub_object_add(Eo *obj, void *_pd, va_list *list)
1046 th = elm_widget_theme_get(sobj); 1048 th = elm_widget_theme_get(sobj);
1047 mirrored = elm_widget_mirrored_get(sobj); 1049 mirrored = elm_widget_mirrored_get(sobj);
1048 1050
1049 if ((scale != pscale) || (th != pth) || (pmirrored != mirrored)) 1051 if ((scale != pscale) || (!sdc->on_create && th != pth) ||
1052 (pmirrored != mirrored))
1050 elm_widget_theme(sobj); 1053 elm_widget_theme(sobj);
1051 1054
1052 if (elm_widget_focus_get(sobj)) _parents_focus(obj); 1055 if (elm_widget_focus_get(sobj)) _parents_focus(obj);
@@ -3763,12 +3766,14 @@ _elm_widget_theme_set(Eo *obj, void *_pd, va_list *list)
3763{ 3766{
3764 Elm_Theme *th = va_arg(*list, Elm_Theme *); 3767 Elm_Theme *th = va_arg(*list, Elm_Theme *);
3765 Elm_Widget_Smart_Data *sd = _pd; 3768 Elm_Widget_Smart_Data *sd = _pd;
3769 Eina_Bool apply = EINA_FALSE;
3766 if (sd->theme != th) 3770 if (sd->theme != th)
3767 { 3771 {
3772 if (elm_widget_theme_get(obj) != th) apply = EINA_TRUE;
3768 if (sd->theme) elm_theme_free(sd->theme); 3773 if (sd->theme) elm_theme_free(sd->theme);
3769 sd->theme = th; 3774 sd->theme = th;
3770 if (th) th->ref++; 3775 if (th) th->ref++;
3771 elm_widget_theme(obj); 3776 if (apply) elm_widget_theme(obj);
3772 } 3777 }
3773} 3778}
3774 3779
@@ -5875,9 +5880,13 @@ elm_widget_tree_dot_dump(const Evas_Object *top,
5875static void 5880static void
5876_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) 5881_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
5877{ 5882{
5883 ELM_WIDGET_DATA_GET(obj, sd);
5884
5885 sd->on_create = EINA_TRUE;
5878 eo_do_super(obj, MY_CLASS, eo_constructor()); 5886 eo_do_super(obj, MY_CLASS, eo_constructor());
5879 eo_do(obj, evas_obj_type_set(MY_CLASS_NAME)); 5887 eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
5880 eo_do(obj, elm_wdg_parent_set(eo_parent_get(obj))); 5888 eo_do(obj, elm_wdg_parent_set(eo_parent_get(obj)));
5889 sd->on_create = EINA_FALSE;
5881} 5890}
5882 5891
5883static void 5892static void
diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h
index 594580f85b..945ef9d90b 100644
--- a/legacy/elementary/src/lib/elm_widget.h
+++ b/legacy/elementary/src/lib/elm_widget.h
@@ -436,6 +436,7 @@ typedef struct _Elm_Widget_Smart_Data
436 Eina_Bool highlighted : 1; 436 Eina_Bool highlighted : 1;
437 Eina_Bool highlight_root : 1; 437 Eina_Bool highlight_root : 1;
438 Eina_Bool on_translate : 1; 438 Eina_Bool on_translate : 1;
439 Eina_Bool on_create : 1;
439} Elm_Widget_Smart_Data; 440} Elm_Widget_Smart_Data;
440 441
441/** 442/**