parent
99673bb0a8
commit
08e9824c6e
|
@ -965,6 +965,7 @@ efreet_icon_new(const char *path)
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
icon = NEW(Efreet_Icon, 1);
|
icon = NEW(Efreet_Icon, 1);
|
||||||
|
if (!icon) return NULL;
|
||||||
icon->path = eina_stringshare_add(path);
|
icon->path = eina_stringshare_add(path);
|
||||||
|
|
||||||
/* load the .icon file if it's available */
|
/* load the .icon file if it's available */
|
||||||
|
@ -1096,6 +1097,7 @@ efreet_icon_populate(Efreet_Icon *icon, const char *file)
|
||||||
if (!p) break;
|
if (!p) break;
|
||||||
|
|
||||||
point = NEW(Efreet_Icon_Point, 1);
|
point = NEW(Efreet_Icon_Point, 1);
|
||||||
|
if (!point) goto error;
|
||||||
|
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
point->x = atoi(s);
|
point->x = atoi(s);
|
||||||
|
@ -1113,6 +1115,7 @@ efreet_icon_populate(Efreet_Icon *icon, const char *file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error:
|
||||||
efreet_ini_free(ini);
|
efreet_ini_free(ini);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1127,6 +1130,7 @@ efreet_icon_theme_new(void)
|
||||||
Efreet_Icon_Theme *theme;
|
Efreet_Icon_Theme *theme;
|
||||||
|
|
||||||
theme = NEW(Efreet_Icon_Theme, 1);
|
theme = NEW(Efreet_Icon_Theme, 1);
|
||||||
|
if (!theme) return NULL;
|
||||||
|
|
||||||
return theme;
|
return theme;
|
||||||
}
|
}
|
||||||
|
@ -1482,6 +1486,7 @@ efreet_icon_theme_directory_new(Efreet_Ini *ini, const char *name)
|
||||||
if (!ini) return NULL;
|
if (!ini) return NULL;
|
||||||
|
|
||||||
dir = NEW(Efreet_Icon_Theme_Directory, 1);
|
dir = NEW(Efreet_Icon_Theme_Directory, 1);
|
||||||
|
if (!dir) return NULL;
|
||||||
dir->name = eina_stringshare_add(name);
|
dir->name = eina_stringshare_add(name);
|
||||||
|
|
||||||
efreet_ini_section_set(ini, name);
|
efreet_ini_section_set(ini, name);
|
||||||
|
@ -1631,15 +1636,14 @@ efreet_icon_cache_check(Efreet_Icon_Theme *theme, const char *icon, unsigned int
|
||||||
static void
|
static void
|
||||||
efreet_icon_cache_add(Efreet_Icon_Theme *theme, const char *icon, unsigned int size, const char *value)
|
efreet_icon_cache_add(Efreet_Icon_Theme *theme, const char *icon, unsigned int size, const char *value)
|
||||||
{
|
{
|
||||||
Eina_List *list, *l;
|
Eina_List *list;
|
||||||
Efreet_Icon_Cache *cache;
|
Efreet_Icon_Cache *cache;
|
||||||
char key[4096];
|
char key[4096];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
list = eina_hash_find(efreet_icon_cache, theme);
|
|
||||||
|
|
||||||
snprintf(key, sizeof(key), "%s %d", icon, size);
|
|
||||||
cache = NEW(Efreet_Icon_Cache, 1);
|
cache = NEW(Efreet_Icon_Cache, 1);
|
||||||
|
if (!cache) return;
|
||||||
|
snprintf(key, sizeof(key), "%s %d", icon, size);
|
||||||
cache->key = eina_stringshare_add(key);
|
cache->key = eina_stringshare_add(key);
|
||||||
if ((value) && !stat(value, &st))
|
if ((value) && !stat(value, &st))
|
||||||
{
|
{
|
||||||
|
@ -1649,7 +1653,7 @@ efreet_icon_cache_add(Efreet_Icon_Theme *theme, const char *icon, unsigned int s
|
||||||
else
|
else
|
||||||
cache->lasttime = ecore_time_get();
|
cache->lasttime = ecore_time_get();
|
||||||
|
|
||||||
l = list;
|
list = eina_hash_find(efreet_icon_cache, theme);
|
||||||
list = eina_list_prepend(list, cache);
|
list = eina_list_prepend(list, cache);
|
||||||
|
|
||||||
eina_hash_set(efreet_icon_cache, theme, list);
|
eina_hash_set(efreet_icon_cache, theme, list);
|
||||||
|
|
|
@ -1012,6 +1012,7 @@ efreet_menu_internal_new(void)
|
||||||
Efreet_Menu_Internal *internal;
|
Efreet_Menu_Internal *internal;
|
||||||
|
|
||||||
internal = NEW(Efreet_Menu_Internal, 1);
|
internal = NEW(Efreet_Menu_Internal, 1);
|
||||||
|
if (!internal) return NULL;
|
||||||
internal->show_empty = -1;
|
internal->show_empty = -1;
|
||||||
internal->in_line = -1;
|
internal->in_line = -1;
|
||||||
internal->inline_limit = -1;
|
internal->inline_limit = -1;
|
||||||
|
@ -2436,6 +2437,7 @@ efreet_menu_filter_new(void)
|
||||||
Efreet_Menu_Filter *filter;
|
Efreet_Menu_Filter *filter;
|
||||||
|
|
||||||
filter = NEW(Efreet_Menu_Filter, 1);
|
filter = NEW(Efreet_Menu_Filter, 1);
|
||||||
|
if (!filter) return NULL;
|
||||||
filter->op = efreet_menu_filter_op_new();
|
filter->op = efreet_menu_filter_op_new();
|
||||||
if (!filter->op)
|
if (!filter->op)
|
||||||
{
|
{
|
||||||
|
|
|
@ -458,6 +458,7 @@ efreet_xml_attributes_parse(char **data, int *size,
|
||||||
}
|
}
|
||||||
|
|
||||||
*attributes = NEW(Efreet_Xml_Attribute *, count + 1);
|
*attributes = NEW(Efreet_Xml_Attribute *, count + 1);
|
||||||
|
if (!*attributes) goto efreet_error;
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
(*attributes)[i] = malloc(sizeof(Efreet_Xml_Attribute));
|
(*attributes)[i] = malloc(sizeof(Efreet_Xml_Attribute));
|
||||||
|
|
Loading…
Reference in New Issue