summaryrefslogtreecommitdiff
path: root/gtk/gtkcssparser.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-01-16 11:18:42 +0100
committerAlexander Larsson <alexl@redhat.com>2012-01-16 14:19:19 +0100
commite46971306a7d1997144669b84c2a59ba0324d5c5 (patch)
tree192557f2dfcd0c8aed593e20aa23c46d79bad1c8 /gtk/gtkcssparser.c
parent6afeb8d3554666d2d88855b12d2cf16475443c1c (diff)
downloadgtk+-e46971306a7d1997144669b84c2a59ba0324d5c5.tar.gz
Ensure we can load images via resource:// uris from CSS
Diffstat (limited to 'gtk/gtkcssparser.c')
-rw-r--r--gtk/gtkcssparser.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c
index cf87ef929a..44b00c305c 100644
--- a/gtk/gtkcssparser.c
+++ b/gtk/gtkcssparser.c
@@ -873,6 +873,7 @@ _gtk_css_parser_read_url (GtkCssParser *parser,
GFile *base)
{
gchar *path;
+ char *scheme;
GFile *file;
if (_gtk_css_parser_try (parser, "url", FALSE))
@@ -907,6 +908,15 @@ _gtk_css_parser_read_url (GtkCssParser *parser,
g_free (path);
return NULL;
}
+
+ scheme = g_uri_parse_scheme (path);
+ if (scheme != NULL)
+ {
+ file = g_file_new_for_uri (path);
+ g_free (path);
+ g_free (scheme);
+ return file;
+ }
}
else
{