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.
This commit is contained in:
Daniel Juyung Seo 2013-11-18 09:57:41 +09:00
parent 1dd1f2f425
commit 56a842d29a
1 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,9 @@ static void
_click_me(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Elm_Object_Item *it = (Elm_Object_Item *)data;
fputs(":-)\n", stderr);
int disabled = elm_object_item_disabled_get(it);
Elm_Object_Item *it = data;
Eina_Bool disabled = elm_object_item_disabled_get(it);
printf("The first item is now %s\n", disabled ? "enabled" : "disabled");
elm_object_item_disabled_set(it, !disabled);
}