From 1ee8039b8ba1be8f31ddcc1f9d975f4a323f5595 Mon Sep 17 00:00:00 2001 From: Marcin Banasiak Date: Fri, 15 Feb 2008 14:35:44 +0000 Subject: [PATCH] - fixes: http://bugzilla.gnome.org/show_bug.cgi?id=516103 http://bugzilla.gnome.org/show_bug.cgi?id=516269 Changed files: gnome-desktop-bugfix.patch -> 1.1 --- gnome-desktop-bugfix.patch | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 gnome-desktop-bugfix.patch diff --git a/gnome-desktop-bugfix.patch b/gnome-desktop-bugfix.patch new file mode 100644 index 0000000..bb42060 --- /dev/null +++ b/gnome-desktop-bugfix.patch @@ -0,0 +1,73 @@ +--- gnome-desktop-2.21.91/libgnome-desktop/gnome-bg.c 2008-02-11 19:35:11.000000000 +0100 ++++ trunk/libgnome-desktop/gnome-bg.c 2008-02-15 15:09:57.000000000 +0100 +@@ -238,8 +238,13 @@ + gnome_bg_set_uri (GnomeBG *bg, + const char *uri) + { ++ char *free_me = NULL; ++ + g_return_if_fail (bg != NULL); + ++ if (g_path_is_absolute (uri)) ++ uri = free_me = g_filename_to_uri (uri, NULL, NULL); ++ + if (is_different (bg, uri)) { + char *tmp = g_strdup (uri); + +@@ -253,6 +258,8 @@ + + emit_changed (bg); + } ++ ++ g_free (free_me); + } + + static void +@@ -1076,10 +1083,11 @@ + file = g_file_new_for_uri (uri); + info = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED, + G_FILE_QUERY_INFO_NONE, NULL, NULL); +- if (info) ++ if (info) { + mtime = g_file_info_get_attribute_uint64 (info, + G_FILE_ATTRIBUTE_TIME_MODIFIED); +- g_object_unref (info); ++ g_object_unref (info); ++ } + g_object_unref (file); + } + +@@ -1602,6 +1610,21 @@ + return strtol (text, NULL, 0); + } + ++static char * ++make_uri (char *file) ++{ ++ if (g_path_is_absolute (file)) { ++ char *result = g_filename_to_uri (file, NULL, NULL); ++ ++ g_free (file); ++ ++ return result; ++ } ++ else { ++ return file; ++ } ++} ++ + static void + handle_text (GMarkupParseContext *context, + const gchar *text, +@@ -1638,9 +1661,11 @@ + else if (stack_is (parser, "file", "static", "background", NULL) || + stack_is (parser, "from", "transition", "background", NULL)) { + slide->file1 = g_strdup (text); ++ slide->file1 = make_uri (slide->file1); + } + else if (stack_is (parser, "to", "transition", "background", NULL)) { + slide->file2 = g_strdup (text); ++ slide->file2 = make_uri (slide->file2); + } + } + -- 2.44.0