bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=b2fe5145d90a1a36c7d7168d3dd8c7887b56512e

commit b2fe5145d90a1a36c7d7168d3dd8c7887b56512e
Author: Marcel Hollerbach <[email protected]>
Date:   Sun Oct 9 17:17:57 2016 +0200

    media: try to search for a icon theme which provides the given icon
    
    This fixes cases where a icon theme is found but, but the given icon
    name is not found in the theme. So we are also testing for the
    availablility of the icon name.
---
 src/bin/media.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/bin/media.c b/src/bin/media.c
index 9b67268..612177b 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -203,7 +203,7 @@ _type_thumb_init2(Evas_Object *obj)
      {
         /* TODO: Listen for theme cache changes */
         static const char *icon_theme = NULL;
-        const char *fl;
+        const char *fl = NULL;
 
         if (!icon_theme)
           {
@@ -219,13 +219,20 @@ _type_thumb_init2(Evas_Object *obj)
                   for (itr = themes; *itr; itr++)
                     {
                        theme = efreet_icon_theme_find(*itr);
-                       if (theme) break;
+                       if (!theme) continue;
+                       //try to fetch the icon, if we dont find it, continue 
at other themes
+                       icon_theme = eina_stringshare_add(theme->name.internal);
+                       fl = efreet_icon_path_find(icon_theme, sd->realf, 
sd->iw);
+                       if (!fl) break;
                     }
                }
-             if (theme)
-               icon_theme = eina_stringshare_add(theme->name.internal);
+             else
+               {
+                  icon_theme = eina_stringshare_add(theme->name.internal);
+               }
           }
-        fl = efreet_icon_path_find(icon_theme, sd->realf, sd->iw);
+        if (!fl)
+          fl = efreet_icon_path_find(icon_theme, sd->realf, sd->iw);
         ok = ethumb_client_file_set(et_client, fl, NULL);
         if (!ok)
           return -1;

-- 


Reply via email to