summaryrefslogtreecommitdiff
path: root/src/bin/test_main_menu.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-11-18 09:57:41 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-11-18 09:59:51 +0900
commit5a3a3e9a3c25c5ae36b79610084835f98b3a1a0d (patch)
treed17e6a88c8034d4929991c1cf5efa077f75b43c7 /src/bin/test_main_menu.c
parent072166c0d8b5d3098f52ef7bf75f46f5d7cb46f6 (diff)
test_main_menu.c: refactored button callback function.
- removed unnecessary casting. - used a proper type, Eina_Bool, for the return value of elm_object_item_disabled_get() - printed out more useful information.
Diffstat (limited to '')
-rw-r--r--src/bin/test_main_menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/test_main_menu.c b/src/bin/test_main_menu.c
index 846cc7173..38554b62d 100644
--- a/src/bin/test_main_menu.c
+++ b/src/bin/test_main_menu.c
@@ -6,9 +6,9 @@ static void
6_click_me(void *data, Evas_Object *obj EINA_UNUSED, 6_click_me(void *data, Evas_Object *obj EINA_UNUSED,
7 void *event_info EINA_UNUSED) 7 void *event_info EINA_UNUSED)
8{ 8{
9 Elm_Object_Item *it = (Elm_Object_Item *)data; 9 Elm_Object_Item *it = data;
10 fputs(":-)\n", stderr); 10 Eina_Bool disabled = elm_object_item_disabled_get(it);
11 int disabled = elm_object_item_disabled_get(it); 11 printf("The first item is now %s\n", disabled ? "enabled" : "disabled");
12 elm_object_item_disabled_set(it, !disabled); 12 elm_object_item_disabled_set(it, !disabled);
13} 13}
14 14