elementary/popup - Fix the corrupted internal widget tree that caused elm_theme_set...
authorChunEon Park <hermet@hermet.pe.kr>
Sat, 10 Aug 2013 09:52:35 +0000 (18:52 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Sat, 10 Aug 2013 09:52:35 +0000 (18:52 +0900)
ChangeLog
NEWS
src/lib/elc_popup.c

index 00d6f9a3576bccff0f7912e349371ae6b0bff0d0..6f094fae1d5717d65005d10275510a12b79641f8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
 2013-08-09  Cedric Bail
 
-       * Add support for URL in Elm_Image.
+        * Add support for URL in Elm_Image.
+
+2013-08-10  ChunEon Park (Hermet)
+
+        * Popup: Fix the corrupted internal widget tree that caused
+        elm_theme_set() doesn't work correctly.
diff --git a/NEWS b/NEWS
index d639c3c462b2cd5ecc56e2a5ff20bf2bb2706ed1..9d839c32280a52a63e0fb689276a2cbd1c99aeea 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -279,6 +279,7 @@ Removals:
    * Deprecate elm_web_uri_set(), elm_web_uri_get() and "uri,changed" signal for web, web2.
    * Naviframe: Dont' be popped if the event is freezed and popping is going on.
    * Ctxpopup: Apply current ctxpopup style to the list.
+   * Popup: Fix the corrupted internal widget tree that caused elm_theme_set() doesn't work correctly.
 
 Changes since Elementary 1.0.0:
 -------------------------
index 6ee5c275d2106f52d7fef3ab7baee4a81a83b6b6..f2615cef805f1083b068ad6d3053f23b05715990 100644 (file)
@@ -100,12 +100,17 @@ _on_show(void *data __UNUSED__,
 {
    ELM_POPUP_DATA_GET(obj, sd);
 
-   evas_object_show(sd->notify);
+   /* yeah, ugly, but again, this widget needs a rewrite */
+   if (elm_widget_parent_get(sd->notify) == obj)
+     elm_widget_sub_object_del(obj, sd->notify);
 
 /* 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! */
    elm_widget_sub_object_add(elm_widget_parent_get(obj), sd->notify);
+
    elm_object_content_set(sd->notify, obj);
 
+   evas_object_show(sd->notify);
+
    elm_object_focus_set(obj, EINA_TRUE);
 }
 
@@ -117,9 +122,12 @@ _on_hide(void *data __UNUSED__,
 {
    ELM_POPUP_DATA_GET(obj, sd);
 
-   evas_object_hide(sd->notify);
-
+   //Revert the obj-tree again.
    elm_object_content_unset(sd->notify);
+   elm_widget_sub_object_add(elm_widget_parent_get(sd->notify), obj);
+   elm_widget_sub_object_add(obj, sd->notify);
+
+   evas_object_hide(sd->notify);
 
 /* FIXME:elm_object_content_unset(notify) deletes callback to revert focus status. */
    elm_object_focus_set(obj, EINA_FALSE);
@@ -325,10 +333,9 @@ _elm_popup_smart_theme(Eo *obj, void *_pd, va_list *list)
 
    _mirrored_set(obj, elm_widget_mirrored_get(obj));
 
-   /* Since parent of the popup can be notify, we need to set the notify style
-      manually. */
-   if (elm_widget_parent_get(sd->notify) != obj)
-     eo_do(sd->notify, elm_wdg_style_set(elm_widget_style_get(obj), &ret));
+   //FIXME: theme set seems corrupted.
+   //if (elm_widget_parent_get(sd->notify) != obj)
+     elm_widget_style_set(sd->notify, elm_widget_style_get(obj));
 
    if (sd->action_area)
      {