SOURCES: gnome-desktop-bugfix.patch (NEW) - fixes: http://bugzilla...

megabajt megabajt at pld-linux.org
Fri Feb 15 15:35:49 CET 2008


Author: megabajt                     Date: Fri Feb 15 14:35:49 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixes: http://bugzilla.gnome.org/show_bug.cgi?id=516103
         http://bugzilla.gnome.org/show_bug.cgi?id=516269

---- Files affected:
SOURCES:
   gnome-desktop-bugfix.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gnome-desktop-bugfix.patch
diff -u /dev/null SOURCES/gnome-desktop-bugfix.patch:1.1
--- /dev/null	Fri Feb 15 15:35:49 2008
+++ SOURCES/gnome-desktop-bugfix.patch	Fri Feb 15 15:35:44 2008
@@ -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);
+ 	}
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list