ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fd422c48d19e31e4aa938fd40a7c1d64551c3ac5

commit fd422c48d19e31e4aa938fd40a7c1d64551c3ac5
Author: Andy Williams <a...@andywilliams.me>
Date:   Thu Apr 28 15:31:55 2016 +0100

    elementary: remove fdo caching and fallback code
    
    The hicolor fallback requirement is handled by efreet
    and the usage of fdo is user specified now not by code.
    This means the only (theoretical) way this could be a
    problem is if the user removes a theme.
    This seems like a good tradeoff to remove the overhead
    and enable the apps to switch icons based on config change.
---
 src/lib/elementary/elm_icon.c | 31 +------------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index b68d5b9..a39a16a 100644
--- a/src/lib/elementary/elm_icon.c
+++ b/src/lib/elementary/elm_icon.c
@@ -11,7 +11,6 @@
 #include "elm_widget_image.h"
 
 #define NON_EXISTING (void *)-1
-static const char *icon_theme = NULL;
 
 #define MY_CLASS ELM_ICON_CLASS
 #define MY_CLASS_NAME "Elm_Icon"
@@ -270,35 +269,7 @@ _icon_freedesktop_set(Evas_Object *obj,
 
    elm_need_efreet();
 
-   if (icon_theme == NON_EXISTING) return EINA_FALSE;
-
-   if (!icon_theme)
-     {
-        Efreet_Icon_Theme *theme;
-        /* TODO: Listen for EFREET_EVENT_ICON_CACHE_UPDATE */
-        theme = efreet_icon_theme_find(elm_config_icon_theme_get());
-        if (!theme)
-          {
-             const char **itr;
-             static const char *themes[] = {
-                "gnome", "Human", "oxygen", "hicolor", NULL
-             };
-             for (itr = themes; *itr; itr++)
-               {
-                  theme = efreet_icon_theme_find(*itr);
-                  if (theme) break;
-               }
-          }
-
-        if (!theme)
-          {
-             icon_theme = NON_EXISTING;
-             return EINA_FALSE;
-          }
-        else
-          icon_theme = eina_stringshare_add(theme->name.internal);
-     }
-   path = efreet_icon_path_find(icon_theme, name, size);
+   path = efreet_icon_path_find(elm_config_icon_theme_get(), name, size);
    sd->freedesktop.use = !!path;
    if (sd->freedesktop.use)
      {

-- 


Reply via email to