Luncher/Batman: Don't access an invalid icon structure.
This commit is contained in:
parent
1fe5b56500
commit
671f881e42
|
@ -400,7 +400,7 @@ _bar_icon_menu_item_new(Icon *ic, Evas_Object *popup, Evas_Object *parent, const
|
||||||
{
|
{
|
||||||
path = icon;
|
path = icon;
|
||||||
}
|
}
|
||||||
if (!path)
|
if (!path && icon)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
||||||
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
||||||
|
@ -414,6 +414,11 @@ _bar_icon_menu_item_new(Icon *ic, Evas_Object *popup, Evas_Object *parent, const
|
||||||
k = "e/icons/unknown";
|
k = "e/icons/unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!path && !icon)
|
||||||
|
{
|
||||||
|
path = e_theme_edje_file_get("base/theme/icons", "e/icons/unknown");
|
||||||
|
k = "e/icons/unknown";
|
||||||
|
}
|
||||||
if (path && icon)
|
if (path && icon)
|
||||||
{
|
{
|
||||||
len = strlen(icon);
|
len = strlen(icon);
|
||||||
|
@ -1040,7 +1045,7 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, E_Client *non_desktop_cli
|
||||||
{
|
{
|
||||||
path = desktop->icon;
|
path = desktop->icon;
|
||||||
}
|
}
|
||||||
if (!path)
|
if (!path && desktop->icon)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/icons/%s", desktop->icon);
|
snprintf(buf, sizeof(buf), "e/icons/%s", desktop->icon);
|
||||||
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
||||||
|
@ -1054,6 +1059,11 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, E_Client *non_desktop_cli
|
||||||
k = "e/icons/unknown";
|
k = "e/icons/unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!path && !desktop->icon)
|
||||||
|
{
|
||||||
|
path = e_theme_edje_file_get("base/theme/icons", "e/icons/unknown");
|
||||||
|
k = "e/icons/unknown";
|
||||||
|
}
|
||||||
if (path && desktop->icon && !k)
|
if (path && desktop->icon && !k)
|
||||||
{
|
{
|
||||||
len = strlen(desktop->icon);
|
len = strlen(desktop->icon);
|
||||||
|
|
|
@ -238,7 +238,7 @@ _icon_theme_file_set(Evas_Object *img, const char *icon)
|
||||||
{
|
{
|
||||||
path = icon;
|
path = icon;
|
||||||
}
|
}
|
||||||
if (!path)
|
if (!path && icon)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
||||||
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
||||||
|
@ -252,6 +252,11 @@ _icon_theme_file_set(Evas_Object *img, const char *icon)
|
||||||
k = "e/icons/unknown";
|
k = "e/icons/unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!path && !icon)
|
||||||
|
{
|
||||||
|
path = e_theme_edje_file_get("base/theme/icons", "e/icons/unknown");
|
||||||
|
k = "e/icons/unknown";
|
||||||
|
}
|
||||||
if (path && icon)
|
if (path && icon)
|
||||||
{
|
{
|
||||||
len = strlen(icon);
|
len = strlen(icon);
|
||||||
|
|
|
@ -286,7 +286,7 @@ _grid_icon_add(Instance *inst, Efreet_Desktop *desktop)
|
||||||
{
|
{
|
||||||
path = desktop->icon;
|
path = desktop->icon;
|
||||||
}
|
}
|
||||||
if (!path)
|
if (!path && desktop->icon)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/icons/%s", desktop->icon);
|
snprintf(buf, sizeof(buf), "e/icons/%s", desktop->icon);
|
||||||
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
||||||
|
@ -300,6 +300,11 @@ _grid_icon_add(Instance *inst, Efreet_Desktop *desktop)
|
||||||
k = "e/icons/unknown";
|
k = "e/icons/unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!path && !desktop->icon)
|
||||||
|
{
|
||||||
|
path = e_theme_edje_file_get("base/theme/icons", "e/icons/unknown");
|
||||||
|
k = "e/icons/unknown";
|
||||||
|
}
|
||||||
elm_image_file_set(ic->o_icon, path, k);
|
elm_image_file_set(ic->o_icon, path, k);
|
||||||
elm_object_tooltip_text_set(ic->o_icon, desktop->name);
|
elm_object_tooltip_text_set(ic->o_icon, desktop->name);
|
||||||
elm_object_tooltip_orient_set(ic->o_icon, ELM_TOOLTIP_ORIENT_CENTER);
|
elm_object_tooltip_orient_set(ic->o_icon, ELM_TOOLTIP_ORIENT_CENTER);
|
||||||
|
|
|
@ -217,7 +217,7 @@ _icon_theme_file_set(Evas_Object *img, const char *icon)
|
||||||
{
|
{
|
||||||
path = icon;
|
path = icon;
|
||||||
}
|
}
|
||||||
if (!path)
|
if (!path && icon)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
||||||
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
if (eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
|
||||||
|
@ -231,6 +231,12 @@ _icon_theme_file_set(Evas_Object *img, const char *icon)
|
||||||
k = "e/icons/unknown";
|
k = "e/icons/unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!path && !icon)
|
||||||
|
{
|
||||||
|
path = e_theme_edje_file_get("base/theme/icons", "e/icons/unknown");
|
||||||
|
k = "e/icons/unknown";
|
||||||
|
}
|
||||||
|
|
||||||
if (path && icon)
|
if (path && icon)
|
||||||
{
|
{
|
||||||
len = strlen(icon);
|
len = strlen(icon);
|
||||||
|
|
Loading…
Reference in New Issue