[gtk+/gtk-3-10] icontheme: use g_file_load_contents() for symbolic icons
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] icontheme: use g_file_load_contents() for symbolic icons
- Date: Mon, 30 Sep 2013 16:47:16 +0000 (UTC)
commit e97c115b5480503ce11a5bc692f1968d043a5c97
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Sep 29 15:38:54 2013 -0700
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
gtk/gtkicontheme.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 0786cac..8345614 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]