hermet pushed a commit to branch master.
commit a1dabbbdbfdcc5029a5f51d6e6a7ab9e414698eb
Author: ChunEon Park <[email protected]>
Date: Sat Aug 10 18:52:35 2013 +0900
elementary/popup - Fix the corrupted internal widget tree that caused
elm_theme_set() doesn't work correctly.
---
ChangeLog | 7 ++++++-
NEWS | 1 +
src/lib/elc_popup.c | 21 ++++++++++++++-------
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 00d6f9a..6f094fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1536,4 +1536,9 @@
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 d639c3c..9d839c3 100644
--- 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:
-------------------------
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 6ee5c27..f2615ce 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -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)
{
--
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk