forked from enlightenment/efl
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:
parent
1dd1f2f425
commit
56a842d29a
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue