summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/test_toolbar.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/bin/test_toolbar.c b/src/bin/test_toolbar.c
index eff88578f..f5359581f 100644
--- a/src/bin/test_toolbar.c
+++ b/src/bin/test_toolbar.c
@@ -77,25 +77,20 @@ _tb_sel5_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
77static void 77static void
78toolbar_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info) 78toolbar_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
79{ 79{
80 Elm_Object_Item *it = elm_toolbar_more_item_get(obj); 80 Elm_Object_Item *more_it = elm_toolbar_more_item_get(obj);
81 81
82 if (event_info) 82 printf("toolbar item %p is clicked\n", event_info);
83 { 83
84 printf("toolbar item %p clicked", event_info); 84 if (!strcmp(elm_object_item_text_get(more_it), "Open") &&
85 if (elm_toolbar_item_selected_get(event_info)) 85 (more_it == elm_toolbar_selected_item_get(obj)))
86 printf(" (selected)\n");
87 else
88 printf(" (unselected)\n");
89 }
90 if (!strcmp(elm_object_item_text_get(it), "Open") && (it == elm_toolbar_selected_item_get(obj)))
91 { 86 {
92 elm_toolbar_item_icon_set(it, "arrow_up"); 87 elm_toolbar_item_icon_set(more_it, "arrow_up");
93 elm_object_item_text_set(it, "Close"); 88 elm_object_item_text_set(more_it, "Close");
94 } 89 }
95 else if (!strcmp(elm_object_item_text_get(it), "Close")) 90 else if (!strcmp(elm_object_item_text_get(more_it), "Close"))
96 { 91 {
97 elm_toolbar_item_icon_set(it, "arrow_down"); 92 elm_toolbar_item_icon_set(more_it, "arrow_down");
98 elm_object_item_text_set(it, "Open"); 93 elm_object_item_text_set(more_it, "Open");
99 } 94 }
100} 95}
101 96