forked from enlightenment/enlightenment
parent
b71fd801bc
commit
4c783428c4
|
@ -70,7 +70,7 @@ e_fm_mime_icon_get(const char *mime)
|
|||
memcpy(buf + len - (sizeof("edj") - 1), "png", sizeof("png"));
|
||||
if (ecore_file_exists(buf)) goto ok;
|
||||
|
||||
try_e_icon_generic:
|
||||
try_e_icon_generic:
|
||||
len = e_user_dir_snprintf(buf, sizeof(buf), "icons/%s.edj", buf2);
|
||||
if (len >= sizeof(buf))
|
||||
goto try_theme;
|
||||
|
@ -82,7 +82,7 @@ e_fm_mime_icon_get(const char *mime)
|
|||
if (ecore_file_exists(buf)) goto ok;
|
||||
|
||||
/* 3. look up icon in theme */
|
||||
try_theme:
|
||||
try_theme:
|
||||
memcpy(buf, "e/icons/fileman/mime/", sizeof("e/icons/fileman/mime/") - 1);
|
||||
eina_strlcpy(buf + sizeof("e/icons/fileman/mime/") - 1, mime,
|
||||
sizeof(buf) - (sizeof("e/icons/fileman/mime/") - 1));
|
||||
|
@ -105,7 +105,7 @@ e_fm_mime_icon_get(const char *mime)
|
|||
memcpy(buf + len - (sizeof("edj") - 1), "png", sizeof("png"));
|
||||
if (ecore_file_exists(buf)) goto ok;
|
||||
|
||||
try_efreet_icon_generic:
|
||||
try_efreet_icon_generic:
|
||||
len = e_prefix_data_snprintf(buf, sizeof(buf), "data/icons/%s.edj", buf2);
|
||||
if (len >= sizeof(buf))
|
||||
goto try_efreet_icon_generic;
|
||||
|
@ -118,7 +118,7 @@ e_fm_mime_icon_get(const char *mime)
|
|||
|
||||
return NULL;
|
||||
|
||||
ok:
|
||||
ok:
|
||||
val = (char *)eina_stringshare_add(buf);
|
||||
if (!icon_map) icon_map = eina_hash_string_superfast_new(NULL);
|
||||
eina_hash_add(icon_map, mime, val);
|
||||
|
@ -139,9 +139,9 @@ e_fm_mime_icon_cache_flush(void)
|
|||
/* create (allocate), set properties, and return a new mime handler */
|
||||
EAPI E_Fm2_Mime_Handler *
|
||||
e_fm2_mime_handler_new(const char *label, const char *icon_group,
|
||||
void (*action_func) (Evas_Object *obj, const char *path, void *data),
|
||||
void (*action_func)(Evas_Object *obj, const char *path, void *data),
|
||||
void *action_data,
|
||||
int (test_func) (Evas_Object *obj, const char *path, void *data),
|
||||
int(test_func) (Evas_Object * obj, const char *path, void *data),
|
||||
void *test_data)
|
||||
{
|
||||
E_Fm2_Mime_Handler *handler;
|
||||
|
@ -408,3 +408,4 @@ _e_fm_mime_icon_foreach(const Eina_Hash *hash __UNUSED__, const void *key __UNUS
|
|||
*freelist = eina_list_append(*freelist, data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue