elementary/popup - Fix the corrupted internal widget tree that caused elm_theme_set() doesn't work correctly.

This commit is contained in:
ChunEon Park 2013-08-10 18:52:35 +09:00
parent 2d651a3688
commit 87993d76ba
3 changed files with 21 additions and 8 deletions

View File

@ -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.

View File

@ -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:
-------------------------

View 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)
{