summaryrefslogtreecommitdiff
path: root/libraries/libfm/patches/0022-3590304-Fallback-themed-icon-folder-video-to-folder-.patch
blob: 4852b267b6dda7bb3d91bddd80fcc1c159d036e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 552d91d59d32c0ed9fec958bf4f3c99a9caccedd Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Tue, 27 Nov 2012 21:23:15 +0200
Subject: [PATCH 22/22] [#3590304]Fallback themed icon "folder-video" to
 "folder" not to gnome.

GTK fallbacks missing themed icon "folder-video" to GNOME
"folder-video" and that breaks icon theme.
The same happens with many other icons.
It is better to use g_themed_icon_new_with_default_fallbacks()
and use default fallback to "folder" in case of above.
---
 src/base/fm-icon.c       | 2 +-
 src/gtk/fm-icon-pixbuf.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/base/fm-icon.c b/src/base/fm-icon.c
index 42dd3fc..e86a13b 100644
--- a/src/base/fm-icon.c
+++ b/src/base/fm-icon.c
@@ -99,7 +99,7 @@ FmIcon* fm_icon_from_name(const char* name)
             g_object_unref(gicon_file);
         }
         else
-            gicon = g_themed_icon_new(name);
+            gicon = g_themed_icon_new_with_default_fallbacks(name);
 
         if(G_LIKELY(gicon))
         {
diff --git a/src/gtk/fm-icon-pixbuf.c b/src/gtk/fm-icon-pixbuf.c
index b30d7c7..8b1c276 100644
--- a/src/gtk/fm-icon-pixbuf.c
+++ b/src/gtk/fm-icon-pixbuf.c
@@ -102,11 +102,13 @@ GdkPixbuf* fm_pixbuf_from_icon(FmIcon* icon, int size)
         char* str = g_icon_to_string(icon->gicon);
         g_debug("unable to load icon %s", str);
         /* pix = NULL; */
+#if 0
         if(g_strcmp0(str, "folder-locked") == 0)
             pix = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "folder",
                     size, GTK_ICON_LOOKUP_USE_BUILTIN|GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
             /* FIXME: create locked icon from "folder" one */
         else
+#endif
             pix = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "unknown",
                     size, GTK_ICON_LOOKUP_USE_BUILTIN|GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
         if(G_LIKELY(pix))
-- 
1.8.0.1