Index: gnome-session/ChangeLog
===================================================================
--- gnome-session/ChangeLog	(revision 4333)
+++ gnome-session/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2007-05-08  Ryan Lortie  <desrt@desrt.ca>
+
+	* session-properties-capplet.c: add support for remembering size
+	of the properties window.
+
 2007-05-08  Vincent Untz  <vuntz@gnome.org>
 
 	* logout.c: (get_current_frame): make it faster
Index: gnome-session/session-properties-capplet.c
===================================================================
--- gnome-session/session-properties-capplet.c	(revision 4333)
+++ gnome-session/session-properties-capplet.c	(working copy)
@@ -196,6 +196,55 @@
 	spc_delete (dialog);
 }
 
+static void
+dlg_size_alloc (GtkWidget *dialog,
+                GtkAllocation *alloc,
+                GConfClient *client)
+{
+  static int last_width, last_height;
+  gboolean write = FALSE;
+
+  if (!GTK_WIDGET_REALIZED (dialog))
+    return;
+
+  if (last_width || last_height)
+    write = TRUE;
+
+  if (last_width == alloc->width &&
+      last_height == alloc->height)
+    return;
+
+  last_width = alloc->width;
+  last_height = alloc->height;
+
+  if (!write)
+    return;
+
+  gconf_client_set_int (client,
+                        GSM_GCONF_CONFIG_PREFIX "/properties_width",
+                        alloc->width, NULL);
+  gconf_client_set_int (client,
+                        GSM_GCONF_CONFIG_PREFIX "/properties_height",
+                        alloc->height, NULL);
+}
+
+static void
+dlg_set_default_size (GtkWindow *window,
+                      GConfClient *client)
+{
+  int width, height;
+
+  width = gconf_client_get_int (client,
+                                GSM_GCONF_CONFIG_PREFIX "/properties_width",
+                                NULL);
+  height = gconf_client_get_int (client,
+                                 GSM_GCONF_CONFIG_PREFIX "/properties_height",
+                                 NULL);
+
+  if (width && height)
+    gtk_window_set_default_size (window, width, height);
+}
+
 static GtkWidget *
 capplet_build (void)
 {
@@ -229,6 +278,7 @@
   gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_CLOSE);
   g_signal_connect (G_OBJECT (b), "clicked", G_CALLBACK (spc_close), dlg);
   g_signal_connect (dlg, "delete-event", G_CALLBACK(spc_delete), NULL);
+  g_signal_connect (dlg, "size-allocate", G_CALLBACK(dlg_size_alloc), client);
 
   /* Set up the notebook */
   notebook = gtk_notebook_new();
@@ -363,6 +413,7 @@
   font_size = PANGO_PIXELS (font_size);
   gtk_window_set_default_size (GTK_WINDOW (dlg), -1, font_size * 40);
 
+  dlg_set_default_size (GTK_WINDOW (dlg), client);
   gtk_widget_show_all (dlg);
   gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 4333)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2007-05-08  Ryan Lortie  <desrt@desrt.ca>
+
+	* data/gnome-session.schemas.in: add properties_width and
+	properties_height keys.
+
 2007-05-06  Vincent Untz  <vuntz@gnome.org>
 
 	* configure.in: small fixes, create bzip2 tarballs, require glib
Index: data/gnome-session.schemas.in
===================================================================
--- data/gnome-session.schemas.in	(revision 4333)
+++ data/gnome-session.schemas.in	(working copy)
@@ -67,5 +67,32 @@
             <long>This is the option that will be selected in the logout dialog, valid values are "logout" for logging out, "shutdown" for halting the system and "restart" for restarting the system.</long>
          </locale>
       </schema>
+
+      <schema>
+         <key>/schemas/apps/gnome-session/options/properties_width</key>
+         <applyto>/apps/gnome-session/options/properties_width</applyto>
+         <owner>gnome</owner>
+         <type>int</type>
+         <default>0</default>
+         <locale name="C">
+            <short>The width of the properties dialog</short>
+            <long>This is the width of the properties dialog.  If it is set
+              to zero then the default size is used.
+            </long>
+         </locale>
+       </schema>
+      <schema>
+         <key>/schemas/apps/gnome-session/options/properties_height</key>
+         <applyto>/apps/gnome-session/options/properties_height</applyto>
+         <owner>gnome</owner>
+         <type>int</type>
+         <default>0</default>
+         <locale name="C">
+            <short>The height of the properties dialog</short>
+            <long>This is the height of the properties dialog.  If it is set
+              to zero then the default size is used.
+            </long>
+         </locale>
+       </schema>
    </schemalist>
 </gconfschemafile>
