summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwoochan lee <wc0917.lee@samsung.com>2015-07-02 20:07:48 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-07-02 20:07:48 +0900
commit8dc5c98240a3e82050b4a90c9595ed22f5832201 (patch)
tree89451f7c242298484807f30fbbc8c90150d1846f /src
parent260e09ea5adaffeef40286f424a8a5ca25e9077e (diff)
toolbar: content_set function called when user content set to toolbar item.
Summary: If User want to content set something to item area. there is no way to except elm customizing. So i added this feature and make the toolbar item object to layout before. Now user can content set something on item area only call "elm_object_item_part_content_set" API. Test Plan: Make some swallow part on toolbar edc. and content set some layout to that swallow part to using "elm_object_item_part_content_set" Reviewers: cedric, Hermet Subscribers: SanghyeonLee, eagleeye, id213sin Differential Revision: https://phab.enlightenment.org/D2777
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_toolbar.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 5b78ed892..cbff114f3 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -1577,7 +1577,11 @@ _elm_toolbar_item_elm_widget_item_part_content_set(Eo *eo_item EINA_UNUSED, Elm_
1577 1577
1578 ELM_TOOLBAR_DATA_GET(obj, sd); 1578 ELM_TOOLBAR_DATA_GET(obj, sd);
1579 1579
1580 if (part && strcmp(part, "object")) return; 1580 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
1581 {
1582 eo_do(VIEW(item), elm_obj_container_content_set(part, content));
1583 return;
1584 }
1581 if (item->object == content) return; 1585 if (item->object == content) return;
1582 1586
1583 evas_object_del(item->object); 1587 evas_object_del(item->object);
@@ -1594,7 +1598,14 @@ EOLIAN static Evas_Object *
1594_elm_toolbar_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_Toolbar_Item_Data *it, 1598_elm_toolbar_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_Toolbar_Item_Data *it,
1595 const char *part) 1599 const char *part)
1596{ 1600{
1597 if (part && strcmp(part, "object")) return NULL; 1601 Evas_Object *content;
1602
1603 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
1604 {
1605 eo_do(VIEW(it), content = elm_obj_container_content_get(part));
1606 if (content) return content;
1607 else return NULL;
1608 }
1598 return it->object; 1609 return it->object;
1599} 1610}
1600 1611