summaryrefslogtreecommitdiff
path: root/gtk/gtkicontheme.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2013-09-29 15:38:54 -0700
committerCosimo Cecchi <cosimoc@gnome.org>2013-09-30 09:45:22 -0700
commit3d602f5b0a67a7b515dc5add504e02e486aad70c (patch)
tree97c43d013783b3d8de27372d5b7a70aa70916c7e /gtk/gtkicontheme.c
parent28a3638448924acf69c9ac5b77b856d6ec138aec (diff)
downloadgtk+-3d602f5b0a67a7b515dc5add504e02e486aad70c.tar.gz
icontheme: use g_file_load_contents() for symbolic icons
When loading a symbolic icon, g_file_get_contents() is currently used with the icon pathname, to load its SVG data. This won't work when the icon is not a local file, for instance when a symbolic icon is loaded from a GFileIcon with a GResource path. Fortunately GtkIconInfo already holds a GFile, so we can just use g_file_load_contents() to load the data instead. https://bugzilla.gnome.org/show_bug.cgi?id=709056
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r--gtk/gtkicontheme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 0786cac102..8345614f12 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4200,7 +4200,7 @@ _gtk_icon_info_load_symbolic_internal (GtkIconInfo *icon_info,
css_error = gdk_color_to_css (&error_default_color);
}
- if (!g_file_get_contents (icon_info->filename, &file_data, &file_len, NULL))
+ if (!g_file_load_contents (icon_info->icon_file, NULL, &file_data, &file_len, NULL, NULL))
return NULL;
if (!icon_info->symbolic_pixbuf_size)