elementary/panes - Patch to handle deletion of current contents while setting new ones
Attached to the mail is a patch for elm_panes.
I have a query that shall we hide the unset content in the widget itself or should application explicitly hide them after unsetting!
In case of edje_object_part_unswallow, application needs to do it explicitly and it is documented but in case of elm_object_part_content_unset, there is no documentation available.
Details of the patch:
Existing Issue before this change:
1. Panes deletes the older content while setting a new content even though both are same.
2. left and right content are being unswallowed in the content_left_set and _content_right_unset functions. So when the reparenting happens, say when the content is put inside a layout then only _sub_del gets called and
unswallowing does not happen as these functions do not get called.
e.g. @@ -253,8 +250,6 @@ _content_left_unset(Evas_Object *obj)
if (!wd->contents.left) return NULL;
Evas_Object *content = wd->contents.left;
elm_widget_sub_object_del(obj, content); //wd->contents.left already gets set to NULL in _sub_del
- edje_object_part_unswallow(wd->panes, content); // can be unswallowed in _sub_del as in case of reparenting like setting content in a layout, only _sub_del will get called, not this function
- wd->contents.left = NULL; //this instruction is redundent as it happens in _sub_del anyway
return content;
}
Change Description:
1. Unswallowing the contents now in _sub_del as this is a common function to be executed when subobject removal happens.
2. Comparing the current content with new before deleting.
Signed-Off-By: RAJEEV RANJAN<rajeev.r@samsumg.com>
Thanks.
Regards,
Rajeev
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69720
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33