Take care of border internal app icons too.

SVN revision: 25359
This commit is contained in:
David Walter Seikel 2006-09-02 13:29:59 +00:00
parent 1f561a3ca2
commit adafa0c6a6
2 changed files with 26 additions and 14 deletions

View File

@ -1554,6 +1554,7 @@ _e_app_icon_path_add(Evas *evas, E_App *a)
else
e_icon_file_set(o, a->icon_path);
e_icon_fill_inside_set(o, 1);
return o;
}
@ -1561,7 +1562,7 @@ _e_app_icon_path_add(Evas *evas, E_App *a)
EAPI Evas_Object *
e_app_icon_add(Evas *evas, E_App *a)
{
Evas_Object *o;
Evas_Object *o = NULL;
if (a->icon_path)
o = _e_app_icon_path_add(evas, a);
@ -1608,6 +1609,8 @@ 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);
if ((!a->icon_path) && (a->icon_class))
{
char *v;
@ -1622,8 +1625,6 @@ 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");
if (a->icon_path)
e_menu_item_icon_file_set(mi, a->icon_path);
return;
}

View File

@ -2544,17 +2544,28 @@ e_border_icon_add(E_Border *bd, Evas *evas)
e_util_edje_icon_set(o, "enlightenment/e");
else
{
/* FIXME: .eaps are going away, raster says this is for module .eaps, so need to take care of all that at the same time. */
if (!strcmp(bd->internal_icon + strlen(bd->internal_icon) - 4, ".eap"))
{
if (!edje_object_file_set(o, bd->internal_icon, "icon"))
e_util_edje_icon_set(o, "enlightenment/e");
}
else
{
if (!e_util_edje_icon_set(o, bd->internal_icon))
e_util_edje_icon_set(o, "enlightenment/e");
}
a = e_app_new(bd->internal_icon, 0);
if (a)
{
/* Free the aborted object first. */
if (o) evas_object_del(o);
o = e_app_icon_add(evas, a);
bd->app = a;
e_object_ref(E_OBJECT(bd->app));
}
else
{
if (!strcmp(bd->internal_icon + strlen(bd->internal_icon) - 4, ".eap"))
{
if (!edje_object_file_set(o, bd->internal_icon, "icon"))
e_util_edje_icon_set(o, "enlightenment/e");
}
else
{
if (!e_util_edje_icon_set(o, bd->internal_icon))
e_util_edje_icon_set(o, "enlightenment/e");
}
}
}
return o;
}