From b4bbafb9c2ac25d818ba866c44dfdde88eacdecc Mon Sep 17 00:00:00 2001 From: jeffdameth Date: Sat, 15 May 2010 17:55:41 +0000 Subject: [PATCH] remove svg from default types. make efreet_icon_extensions prepended a type when it already is in list git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@48895 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/efreet_icon.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/efreet_icon.c b/src/lib/efreet_icon.c index 6458d4a..e0b819d 100644 --- a/src/lib/efreet_icon.c +++ b/src/lib/efreet_icon.c @@ -115,10 +115,7 @@ efreet_icon_init(void) { if (!efreet_icon_themes) { - /* FIXME when svg and xpm with same name exist but svg - loader was not built xpm icon will not be found. - use sth like #ifdef EVAS_IMAGE_LOADER_SVG when possible. */ - const char *default_exts[] = {".png", ".svg", ".xpm", NULL}; + const char *default_exts[] = {".png", ".xpm", NULL}; int i; if (!ecore_init()) @@ -209,7 +206,17 @@ efreet_icon_user_dir_get(void) EAPI void efreet_icon_extension_add(const char *ext) { - efreet_icon_extensions = eina_list_prepend(efreet_icon_extensions, eina_stringshare_add(ext)); + Eina_List *l; + + ext = eina_stringshare_add(ext); + + if ((l = eina_list_data_find_list(efreet_icon_extensions, ext))) + { + eina_stringshare_del((const char *)l->data); + efreet_icon_extensions = eina_list_remove_list(efreet_icon_extensions, l); + } + + efreet_icon_extensions = eina_list_prepend(efreet_icon_extensions, ext); } /** -- 2.7.4