forked from enlightenment/enlightenment
parent
11823b5cb7
commit
5a1799c941
|
@ -1609,8 +1609,7 @@ e_app_icon_add(Evas *evas, E_App *a)
|
|||
EAPI void
|
||||
e_app_icon_add_to_menu_item(E_Menu_Item *mi, E_App *a)
|
||||
{
|
||||
if (a->icon_path)
|
||||
e_menu_item_icon_file_set(mi, a->icon_path);
|
||||
mi->app = a;
|
||||
if ((!a->icon_path) && (a->icon_class))
|
||||
{
|
||||
char *v;
|
||||
|
@ -1625,7 +1624,8 @@ e_app_icon_add_to_menu_item(E_Menu_Item *mi, E_App *a)
|
|||
/* e_menu_item_icon_edje_set() just tucks away the params, the actual call to edje_object_file_set() happens later. */
|
||||
/* e_menu_item_icon_file_set() just tucks away the params, the actual call to e_icon_add() happens later. */
|
||||
e_menu_item_icon_edje_set(mi, a->path, "icon");
|
||||
return;
|
||||
if (a->icon_path)
|
||||
e_menu_item_icon_file_set(mi, a->icon_path);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1205,10 +1205,19 @@ _e_menu_item_realize(E_Menu_Item *mi)
|
|||
else
|
||||
evas_object_del(o);
|
||||
|
||||
if (mi->icon)
|
||||
/* FIXME: Not sure why there are two different tries to get the icon size, surely only the last one si needed. */
|
||||
/* FIXME: Do it this way later, when e_app_icon_add() just registers a request for an icon to be filled in when it's ready.
|
||||
if (mi->app)
|
||||
{
|
||||
o = e_app_icon_add(mi->menu->evas, mi->app);
|
||||
mi->icon_object = o;
|
||||
e_icon_size_get(mi->icon_object, &icon_w, &icon_h);
|
||||
}
|
||||
else
|
||||
*/
|
||||
if (mi->icon)
|
||||
{
|
||||
/* This is done this way to match up with how e_app_icon_add does it. */
|
||||
// mi->icon_object = NULL; /* Just coz I'm paranoid, may not be needed. */
|
||||
if (mi->icon_key)
|
||||
{
|
||||
Evas_Coord iww, ihh;
|
||||
|
|
|
@ -101,6 +101,8 @@ struct _E_Menu_Item
|
|||
|
||||
Evas_Object *event_object;
|
||||
|
||||
E_App *app; /* For when this item is used for an app. Experimental, if this makes it into cvs, kill onefang. */
|
||||
|
||||
int label_w, label_h;
|
||||
int icon_w, icon_h;
|
||||
int separator_w, separator_h;
|
||||
|
|
Loading…
Reference in New Issue