Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/background/Makefile.am,v
retrieving revision 1.51
diff -u -r1.51 Makefile.am
--- Makefile.am	28 Nov 2004 08:14:04 -0000	1.51
+++ Makefile.am	6 Jan 2006 19:44:25 -0000
@@ -24,6 +24,13 @@
 libgnomewp_la_LIBADD = \
 	$(GNOMECC_CAPPLETS_LIBS)
 
+schemadir   = $(GCONF_SCHEMA_FILE_DIR)
+schema_in_files=gnome-background.schemas.in
+
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+@INTLTOOL_SCHEMAS_RULE@
+
 desktopdir = $(datadir)/applications
 desktop_in_files = background.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@@ -34,14 +41,22 @@
 glade_DATA = gnome-background-properties.glade
 
 install-data-local:
-	$(mkinstalldirs) $(DESTDIR)$(WALLPAPER_DATADIR)
+	$(mkinstalldirs) $(DESTDIR)$(WALLPAPER_DATADIR) \
+	if GCONF_SCHEMAS_INSTALL
+		if test -z "$(DESTDIR)" ; then \
+			for p in $(schema_DATA) ; do \
+				GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
+			done \
+		fi 
 
 EXTRA_DIST = \
 	background.desktop.in.in \
+	$(schema_in_files) \
 	$(glade_DATA)
 
 CLEANFILES = \
-	$(desktop_in_files) $(desktop_DATA)
+	$(desktop_in_files) $(desktop_DATA) \
+	$(schema_DATA)
 
 MAINTAINERCLEANFILES = \
 	Makefile.in
Index: gnome-wp-capplet.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/background/gnome-wp-capplet.c,v
retrieving revision 1.37
diff -u -r1.37 gnome-wp-capplet.c
--- gnome-wp-capplet.c	21 Nov 2005 04:42:44 -0000	1.37
+++ gnome-wp-capplet.c	6 Jan 2006 19:44:27 -0000
@@ -362,7 +362,35 @@
   }
 }
 
+void gnome_wp_set_state (GnomeWPCapplet * capplet) {
+    int width, height;
+    
+    width = gconf_client_get_int (capplet->client,
+                                                    WP_WIDTH_KEY,
+                                                    NULL);
+     height = gconf_client_get_int (capplet->client,
+                                                    WP_HEIGHT_KEY,
+                                                    NULL);                                               
+    gtk_window_resize (GTK_WINDOW (capplet->window), width, height);    
+}
+
+void gnome_wp_save_state (GnomeWPCapplet * capplet) {
+    GtkAllocation *allocation;
+    GConfChangeSet * cs;
+    
+    cs = gconf_change_set_new ();
+    allocation= &(GTK_WIDGET (capplet->window)->allocation);
+    gconf_change_set_set_int (cs, WP_HEIGHT_KEY, allocation->height);
+    gconf_change_set_set_int (cs, WP_WIDTH_KEY, allocation->width);
+    
+    gconf_client_commit_change_set (capplet->client, cs, TRUE, NULL);
+    
+    gconf_change_set_unref (cs);
+}
+
 void gnome_wp_main_quit (GnomeWPCapplet * capplet) {
+    gnome_wp_save_state (capplet);
+
     g_hash_table_foreach (capplet->wphash, (GHFunc) gnome_wp_remove_wp,
 			  capplet);
 
@@ -1238,6 +1266,8 @@
   
   g_signal_connect (G_OBJECT (capplet->window), "response",
 		    G_CALLBACK (wallpaper_properties_clicked), capplet);
+
+  gnome_wp_set_state (capplet);
 
   gtk_widget_show (capplet->window);
 
Index: gnome-wp-utils.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/background/gnome-wp-utils.h,v
retrieving revision 1.4
diff -u -r1.4 gnome-wp-utils.h
--- gnome-wp-utils.h	26 Feb 2005 19:15:58 -0000	1.4
+++ gnome-wp-utils.h	6 Jan 2006 19:44:27 -0000
@@ -33,6 +33,9 @@
 #define WP_KEYBOARD_PATH "/desktop/gnome/peripherals/keyboard"
 #define WP_DELAY_KEY WP_KEYBOARD_PATH "/delay"
 
+#define WP_HEIGHT_KEY "/apps/control-center/background/height"
+#define WP_WIDTH_KEY "/apps/control-center/background/width"
+
 G_BEGIN_DECLS
 
 GdkPixbuf * gnome_wp_pixbuf_new_gradient (GtkOrientation orientation,
--- /dev/null	2006-01-06 20:26:20.613799664 +0100
+++ gnome-background.schemas.in	2006-01-06 20:26:43.000000000 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+    <schemalist>
+        <schema>
+            <key>/schemas/apps/control-center/background/width</key>
+             <applyto>/apps/control-center/background/width</applyto>
+             <owner>gnome-background-properties</owner>
+             <type>int</type>
+             <default>0</default>
+             <locale name="C">
+                <short>Initial Width</short>
+                <long>Initial Width</long>
+             </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/control-center/background/height</key>
+             <applyto>/apps/control-center/background/height</applyto>
+             <owner>gnome-background-properties</owner>
+             <type>int</type>
+             <default>0</default>
+             <locale name="C">
+                <short>Initial Height</short>
+                <long>Initial Height</long>
+             </locale>
+        </schema>
+    </schemalist>
+</gconfschemafile>
+             
