[eog] Convert background image setting fro GConf to GSettings



commit 9bc346bc624c7fde7c3cd878b9f35cb65795bb41
Author: Felix Riemann <friemann gnome org>
Date:   Sat Nov 20 13:07:14 2010 +0100

    Convert background image setting fro GConf to GSettings
    
    Adds dependency on gsettings-desktop-schemas package.
    Part of bug 620121.

 configure.ac          |    6 ++++--
 src/eog-config-keys.h |    3 ++-
 src/eog-window.c      |   10 ++++------
 3 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bc5443a..344baab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,7 @@ GTK_PRINT_REQUIRED=2.90.4
 GNOME_ICON_THEME_REQUIRED=2.19.1
 SHARED_MIME_INFO_REQUIRED=0.20
 EXEMPI_REQUIRED=1.99.5
+DESKTOP_SCHEMAS_REQUIRED=0.1.0
 
 EOG_MODULES="gtk+-3.0 >= $GTK_REQUIRED \
              glib-2.0 >= $GLIB_REQUIRED \
@@ -103,8 +104,9 @@ EOG_MODULES="gtk+-3.0 >= $GTK_REQUIRED \
              gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED \
              gconf-2.0 >= $GCONF_REQUIRED \
              gtk+-unix-print-3.0 >= $GTK_PRINT_REQUIRED \
-	     gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED \
-	     shared-mime-info >= $SHARED_MIME_INFO_REQUIRED"
+             gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED \
+             shared-mime-info >= $SHARED_MIME_INFO_REQUIRED \
+             gsettings-desktop-schemas >= $DESKTOP_SCHEMAS_REQUIRED"
 
 # ***************
 # ZLIB (required)
diff --git a/src/eog-config-keys.h b/src/eog-config-keys.h
index ec2a1e1..b45393a 100644
--- a/src/eog-config-keys.h
+++ b/src/eog-config-keys.h
@@ -32,7 +32,8 @@
 #define EOG_CONF_UI				EOG_CONF_DOMAIN".ui"
 #define EOG_CONF_VIEW				EOG_CONF_DOMAIN".view"
 
-#define EOG_CONF_DESKTOP_WALLPAPER		"/desktop/gnome/background/picture_filename"
+#define EOG_CONF_DESKTOP_WALLPAPER_SCHEMA	"org.gnome.desktop.background"
+#define EOG_CONF_DESKTOP_WALLPAPER		"picture-filename"
 #define EOG_CONF_DESKTOP_CAN_SAVE		"/desktop/gnome/lockdown/disable_save_to_disk"
 #define EOG_CONF_DESKTOP_CAN_PRINT      	"/desktop/gnome/lockdown/disable_printing"
 #define EOG_CONF_DESKTOP_CAN_SETUP_PAGE 	"/desktop/gnome/lockdown/disable_print_setup"
diff --git a/src/eog-window.c b/src/eog-window.c
index 0eedbcb..3f99abd 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -2652,7 +2652,7 @@ wallpaper_info_bar_response (GtkInfoBar *bar, gint response, EogWindow *window)
 static void
 eog_window_set_wallpaper (EogWindow *window, const gchar *filename, const gchar *visible_filename)
 {
-	EogWindowPrivate *priv = EOG_WINDOW_GET_PRIVATE (window);
+	GSettings *settings;
 	GtkWidget *info_bar;
 	GtkWidget *image;
 	GtkWidget *label;
@@ -2661,11 +2661,9 @@ eog_window_set_wallpaper (EogWindow *window, const gchar *filename, const gchar
 	gchar *text;
 	gchar *basename;
 
-
-	gconf_client_set_string (priv->client,
-				 EOG_CONF_DESKTOP_WALLPAPER,
-				 filename,
-				 NULL);
+	settings = g_settings_new (EOG_CONF_DESKTOP_WALLPAPER_SCHEMA);
+	g_settings_set_string (settings, EOG_CONF_DESKTOP_WALLPAPER, filename);
+	g_object_unref (settings);
 
 	/* 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]