[eog] Update to the new "picture-uri" GSettings key



commit 60a7e7b6628b169c3cfde548322b5fe996cdec32
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Mar 10 20:33:23 2011 +0200

    Update to the new "picture-uri" GSettings key
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644417

 src/eog-config-keys.h |    2 +-
 src/eog-window.c      |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-config-keys.h b/src/eog-config-keys.h
index 2da80fd..64b6032 100644
--- a/src/eog-config-keys.h
+++ b/src/eog-config-keys.h
@@ -33,7 +33,7 @@
 #define EOG_CONF_VIEW				EOG_CONF_DOMAIN".view"
 
 #define EOG_CONF_DESKTOP_WALLPAPER_SCHEMA	"org.gnome.desktop.background"
-#define EOG_CONF_DESKTOP_WALLPAPER		"picture-filename"
+#define EOG_CONF_DESKTOP_WALLPAPER		"picture-uri"
 
 #define EOG_CONF_DESKTOP_LOCKDOWN_SCHEMA	"org.gnome.desktop.lockdown"
 #define EOG_CONF_DESKTOP_CAN_PRINT		"disable-printing"
diff --git a/src/eog-window.c b/src/eog-window.c
index b1a87f8..212bbc5 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -2694,10 +2694,13 @@ eog_window_set_wallpaper (EogWindow *window, const gchar *filename, const gchar
 	gchar *markup;
 	gchar *text;
 	gchar *basename;
+	gchar *uri;
 
+	uri = g_filename_to_uri (filename, NULL, NULL);
 	settings = g_settings_new (EOG_CONF_DESKTOP_WALLPAPER_SCHEMA);
-	g_settings_set_string (settings, EOG_CONF_DESKTOP_WALLPAPER, filename);
+	g_settings_set_string (settings, EOG_CONF_DESKTOP_WALLPAPER, uri);
 	g_object_unref (settings);
+	g_free (uri);
 
 	/* I18N: When setting mnemonics for these strings, watch out to not
 	   clash with mnemonics from eog's menubar */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]