forked from enlightenment/enlightenment
rephorm had a seggie, but not enough information to track down a
solution. So, just be extra paranoid. SVN revision: 26721
This commit is contained in:
parent
67df17a573
commit
70518d5c50
|
@ -511,6 +511,9 @@ e_app_new(const char *path, int scan_subdirs)
|
||||||
{
|
{
|
||||||
if (a->monitor) ecore_file_monitor_del(a->monitor);
|
if (a->monitor) ecore_file_monitor_del(a->monitor);
|
||||||
if (a->path) evas_stringshare_del(a->path);
|
if (a->path) evas_stringshare_del(a->path);
|
||||||
|
/* Just going that little extra paranoid, coz rephorm got a strange seggie. */
|
||||||
|
a->monitor = NULL;
|
||||||
|
a->path = NULL;
|
||||||
e_app_fields_empty(a);
|
e_app_fields_empty(a);
|
||||||
free(a);
|
free(a);
|
||||||
}
|
}
|
||||||
|
@ -1000,7 +1003,8 @@ e_app_remove(E_App *a)
|
||||||
_e_apps_every_app = evas_hash_del(_e_apps_every_app, a->path, a);
|
_e_apps_every_app = evas_hash_del(_e_apps_every_app, a->path, a);
|
||||||
evas_stringshare_del(a->path);
|
evas_stringshare_del(a->path);
|
||||||
a->path = evas_stringshare_add(buf);
|
a->path = evas_stringshare_add(buf);
|
||||||
_e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, a->path, a);
|
if (a->path)
|
||||||
|
_e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, a->path, a);
|
||||||
}
|
}
|
||||||
_e_app_save_order(a->parent);
|
_e_app_save_order(a->parent);
|
||||||
for (l = a->references; l; l = l->next)
|
for (l = a->references; l; l = l->next)
|
||||||
|
@ -1742,7 +1746,7 @@ e_app_fields_fill(E_App *a, const char *path)
|
||||||
if ( (ext) && ((strcmp(ext, ".desktop") == 0) || (strcmp(ext, ".directory") == 0)) )
|
if ( (ext) && ((strcmp(ext, ".desktop") == 0) || (strcmp(ext, ".directory") == 0)) )
|
||||||
{ /* It's a .desktop file. */
|
{ /* It's a .desktop file. */
|
||||||
Ecore_Desktop *desktop;
|
Ecore_Desktop *desktop;
|
||||||
|
|
||||||
desktop = ecore_desktop_get(path, lang);
|
desktop = ecore_desktop_get(path, lang);
|
||||||
if (desktop)
|
if (desktop)
|
||||||
{
|
{
|
||||||
|
@ -2185,18 +2189,22 @@ printf("e_app_icon_add(%s) %s %s %s\n", a->path, a->icon_class, e_config->
|
||||||
{
|
{
|
||||||
char *ext;
|
char *ext;
|
||||||
|
|
||||||
o = e_icon_add(evas);
|
/* Be paranoid. */
|
||||||
ext = strrchr(a->icon_path, '.');
|
if (a->icon_path)
|
||||||
if (ext)
|
{
|
||||||
{
|
o = e_icon_add(evas);
|
||||||
if (strcmp(ext, ".edj") == 0)
|
ext = strrchr(a->icon_path, '.');
|
||||||
e_icon_file_edje_set(o, a->icon_path, "icon");
|
if (ext)
|
||||||
else
|
{
|
||||||
e_icon_file_set(o, a->icon_path);
|
if (strcmp(ext, ".edj") == 0)
|
||||||
}
|
e_icon_file_edje_set(o, a->icon_path, "icon");
|
||||||
else
|
else
|
||||||
e_icon_file_set(o, a->icon_path);
|
e_icon_file_set(o, a->icon_path);
|
||||||
e_icon_fill_inside_set(o, 1);
|
}
|
||||||
|
else
|
||||||
|
e_icon_file_set(o, a->icon_path);
|
||||||
|
e_icon_fill_inside_set(o, 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2242,16 +2250,20 @@ printf("e_app_icon_add_to_menu_item(%s) %s %s %s\n", a->path, a->icon_clas
|
||||||
{
|
{
|
||||||
char *ext;
|
char *ext;
|
||||||
|
|
||||||
ext = strrchr(a->icon_path, '.');
|
/* Be paranoid. */
|
||||||
if (ext)
|
if (a->icon_path)
|
||||||
{
|
{
|
||||||
if (strcmp(ext, ".edj") == 0)
|
ext = strrchr(a->icon_path, '.');
|
||||||
e_menu_item_icon_edje_set(mi, a->icon_path, "icon");
|
if (ext)
|
||||||
else
|
{
|
||||||
e_menu_item_icon_file_set(mi, a->icon_path);
|
if (strcmp(ext, ".edj") == 0)
|
||||||
}
|
e_menu_item_icon_edje_set(mi, a->icon_path, "icon");
|
||||||
else
|
else
|
||||||
e_menu_item_icon_file_set(mi, a->icon_path);
|
e_menu_item_icon_file_set(mi, a->icon_path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
e_menu_item_icon_file_set(mi, a->icon_path);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2357,6 +2369,9 @@ _e_app_free(E_App *a)
|
||||||
e_app_fields_empty(a);
|
e_app_fields_empty(a);
|
||||||
if (a->path)
|
if (a->path)
|
||||||
evas_stringshare_del(a->path);
|
evas_stringshare_del(a->path);
|
||||||
|
/* Just going that little extra paranoid, coz rephorm got a strange seggie. */
|
||||||
|
a->monitor = NULL;
|
||||||
|
a->path = NULL;
|
||||||
free(a);
|
free(a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue