eog r4849 - in trunk: . src



Author: csaavedra
Date: Sun Oct 26 17:24:17 2008
New Revision: 4849
URL: http://svn.gnome.org/viewvc/eog?rev=4849&view=rev

Log:
2008-09-25  Claudio Saavedra  <csaavedra igalia com>

	* src/eog-window.c: (eog_window_set_wallpaper),
	(eog_window_cmd_wallpaper): Factor out the calls to set
	the wallpaper.

Modified:
   trunk/ChangeLog
   trunk/src/eog-window.c

Modified: trunk/src/eog-window.c
==============================================================================
--- trunk/src/eog-window.c	(original)
+++ trunk/src/eog-window.c	Sun Oct 26 17:24:17 2008
@@ -208,6 +208,7 @@
 static void eog_window_list_store_image_removed (GtkTreeModel *tree_model,
                  				 GtkTreePath  *path,
 						 gpointer      user_data);
+static void eog_window_set_wallpaper (EogWindow *window, const gchar *filename);
 
 static GQuark
 eog_window_error_quark (void)
@@ -2604,6 +2605,25 @@
 	}
 }
 
+
+static void
+eog_window_set_wallpaper (EogWindow *window, const gchar *filename)
+{
+	EogWindowPrivate *priv = EOG_WINDOW_GET_PRIVATE (window);
+	GdkScreen *screen;
+
+	gconf_client_set_string (priv->client,
+				 EOG_CONF_DESKTOP_WALLPAPER,
+				 filename,
+				 NULL);
+
+	screen = gtk_widget_get_screen (GTK_WIDGET (window));
+	gdk_spawn_command_line_on_screen (screen,
+					  "gnome-appearance-properties"
+					  " --show-page=background",
+					  NULL);
+}
+
 static void
 eog_job_save_cb (EogJobSave *job, gpointer user_data)
 {
@@ -2877,7 +2897,6 @@
 	EogWindowPrivate *priv;
 	EogImage *image;
 	GFile *file;
-	GdkScreen *screen;
 	char *filename = NULL;
 	
 	g_return_if_fail (EOG_IS_WINDOW (user_data));
@@ -2919,16 +2938,8 @@
 
 	g_object_unref (file);
 
-	gconf_client_set_string (priv->client, 
-				 EOG_CONF_DESKTOP_WALLPAPER, 
-				 filename, 
-				 NULL);
+	eog_window_set_wallpaper (window, filename);
 
-	screen = gtk_widget_get_screen (GTK_WIDGET (window));
-	gdk_spawn_command_line_on_screen (screen,
-					  "gnome-appearance-properties"
-					  " --show-page=background",
-					  NULL);
 	g_free (filename);
 }
 



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