summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-08-10 18:52:35 +0900
committerChunEon Park <hermet@hermet.pe.kr>2013-08-10 18:52:35 +0900
commita1dabbbdbfdcc5029a5f51d6e6a7ab9e414698eb (patch)
tree7b8f65a1fff1a9e91bd77e015579f0c8d6fbb0b3
parent3688a00144eb41535c65aaaf92cbe84b462eb4e2 (diff)
elementary/popup - Fix the corrupted internal widget tree that caused elm_theme_set() doesn't work correctly.
-rw-r--r--ChangeLog7
-rw-r--r--NEWS1
-rw-r--r--src/lib/elc_popup.c21
3 files changed, 21 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 00d6f9a35..6f094fae1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1536,4 +1536,9 @@
1536 1536
15372013-08-09 Cedric Bail 15372013-08-09 Cedric Bail
1538 1538
1539 * Add support for URL in Elm_Image. 1539 * Add support for URL in Elm_Image.
1540
15412013-08-10 ChunEon Park (Hermet)
1542
1543 * Popup: Fix the corrupted internal widget tree that caused
1544 elm_theme_set() doesn't work correctly.
diff --git a/NEWS b/NEWS
index d639c3c46..9d839c322 100644
--- a/NEWS
+++ b/NEWS
@@ -279,6 +279,7 @@ Removals:
279 * Deprecate elm_web_uri_set(), elm_web_uri_get() and "uri,changed" signal for web, web2. 279 * Deprecate elm_web_uri_set(), elm_web_uri_get() and "uri,changed" signal for web, web2.
280 * Naviframe: Dont' be popped if the event is freezed and popping is going on. 280 * Naviframe: Dont' be popped if the event is freezed and popping is going on.
281 * Ctxpopup: Apply current ctxpopup style to the list. 281 * Ctxpopup: Apply current ctxpopup style to the list.
282 * Popup: Fix the corrupted internal widget tree that caused elm_theme_set() doesn't work correctly.
282 283
283Changes since Elementary 1.0.0: 284Changes since Elementary 1.0.0:
284------------------------- 285-------------------------
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 6ee5c275d..f2615cef8 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -100,12 +100,17 @@ _on_show(void *data __UNUSED__,
100{ 100{
101 ELM_POPUP_DATA_GET(obj, sd); 101 ELM_POPUP_DATA_GET(obj, sd);
102 102
103 evas_object_show(sd->notify); 103 /* yeah, ugly, but again, this widget needs a rewrite */
104 if (elm_widget_parent_get(sd->notify) == obj)
105 elm_widget_sub_object_del(obj, sd->notify);
104 106
105/* FIXME: Should be rewritten popup. This code is for arranging child-parent relation well. Without this code, Popup't top parent will be notify. And there will be no parent for notify. Terrible! */ 107/* FIXME: Should be rewritten popup. This code is for arranging child-parent relation well. Without this code, Popup't top parent will be notify. And there will be no parent for notify. Terrible! */
106 elm_widget_sub_object_add(elm_widget_parent_get(obj), sd->notify); 108 elm_widget_sub_object_add(elm_widget_parent_get(obj), sd->notify);
109
107 elm_object_content_set(sd->notify, obj); 110 elm_object_content_set(sd->notify, obj);
108 111
112 evas_object_show(sd->notify);
113
109 elm_object_focus_set(obj, EINA_TRUE); 114 elm_object_focus_set(obj, EINA_TRUE);
110} 115}
111 116
@@ -117,9 +122,12 @@ _on_hide(void *data __UNUSED__,
117{ 122{
118 ELM_POPUP_DATA_GET(obj, sd); 123 ELM_POPUP_DATA_GET(obj, sd);
119 124
120 evas_object_hide(sd->notify); 125 //Revert the obj-tree again.
121
122 elm_object_content_unset(sd->notify); 126 elm_object_content_unset(sd->notify);
127 elm_widget_sub_object_add(elm_widget_parent_get(sd->notify), obj);
128 elm_widget_sub_object_add(obj, sd->notify);
129
130 evas_object_hide(sd->notify);
123 131
124/* FIXME:elm_object_content_unset(notify) deletes callback to revert focus status. */ 132/* FIXME:elm_object_content_unset(notify) deletes callback to revert focus status. */
125 elm_object_focus_set(obj, EINA_FALSE); 133 elm_object_focus_set(obj, EINA_FALSE);
@@ -325,10 +333,9 @@ _elm_popup_smart_theme(Eo *obj, void *_pd, va_list *list)
325 333
326 _mirrored_set(obj, elm_widget_mirrored_get(obj)); 334 _mirrored_set(obj, elm_widget_mirrored_get(obj));
327 335
328 /* Since parent of the popup can be notify, we need to set the notify style 336 //FIXME: theme set seems corrupted.
329 manually. */ 337 //if (elm_widget_parent_get(sd->notify) != obj)
330 if (elm_widget_parent_get(sd->notify) != obj) 338 elm_widget_style_set(sd->notify, elm_widget_style_get(obj));
331 eo_do(sd->notify, elm_wdg_style_set(elm_widget_style_get(obj), &ret));
332 339
333 if (sd->action_area) 340 if (sd->action_area)
334 { 341 {