Handle case where gadcon may not have the icon function for menu.

SVN revision: 52110
This commit is contained in:
Christopher Michael 2010-09-09 22:18:00 +00:00
parent 312da38b10
commit 5a6461bcd8
1 changed files with 8 additions and 4 deletions

View File

@ -2702,11 +2702,15 @@ _e_gadcon_client_cb_menu_pre(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi)
E_Gadcon_Client *gcc;
if (!(gcc = data)) return;
if (!gcc->client_class->func.icon) return;
if (gcc->client_class->func.icon)
{
mi->icon_object =
gcc->client_class->func.icon((E_Gadcon_Client_Class *)gcc->client_class,
mi->menu->evas);
}
else
e_util_menu_item_theme_icon_set(mi, "preferences-gadget"); // FIXME: Needs icon in theme
}
static void
_e_gadcon_client_del_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)