# include "elementary_config.h"
#endif
#include <Elementary.h>
-
-
static void
-_click_me(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+_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_disabled_set(it, !disabled);
}
void
menu_it1 = elm_menu_item_add(menu, menu_it, NULL, "disabled item", NULL, NULL);
elm_object_item_disabled_set(menu_it1, EINA_TRUE);
elm_menu_item_separator_add(menu, menu_it);
- elm_menu_item_add(menu, menu_it, NULL, "click me :-)", _click_me, NULL);
+ elm_menu_item_add(menu, menu_it, NULL, "click me :-)", _click_me, menu_it1);
elm_menu_item_add(menu, menu_it, "applications-email-panel", "third item", NULL, NULL);
menu_it1 = elm_menu_item_add(menu, menu_it, NULL, "sub menu", NULL, NULL);
elm_menu_item_add(menu, menu_it1, NULL, "first item", NULL, NULL);
else
elm_layout_signal_emit(VIEW(item), "elm,state,enabled", "elm");
+ if (item->dbus_menu) _elm_dbus_menu_update(item->dbus_menu);
edje_object_message_signal_process(elm_layout_edje_get(VIEW(item)));
}
_elm_menu_item_add_helper(obj, (Elm_Menu_Item *)parent, subitem, sd);
if (sd->dbus_menu)
+ {
subitem->dbus_idx = _elm_dbus_menu_item_add(sd->dbus_menu, (Elm_Object_Item *)subitem);
-
+ subitem->dbus_menu = sd->dbus_menu;
+ }
*ret = (Elm_Object_Item *)subitem;
}