dbbc59
--- gedit-2.13.2/data/gedit.schemas.in.filesel	2006-01-13 13:27:15.000000000 -0500
dbbc59
+++ gedit-2.13.2/data/gedit.schemas.in	2006-01-13 13:29:14.000000000 -0500
fee51b
@@ -629,5 +629,26 @@
dbbc59
       </locale>
dbbc59
     </schema>
dbbc59
     
dbbc59
+    <schema>
dbbc59
+      <key>/schemas/apps/gedit-2/preferences/ui/open_save/selector_width</key>
dbbc59
+      <applyto>/apps/gedit-2/preferences/ui/open_save/selector_width</applyto>
dbbc59
+      <owner>gedit</owner>
dbbc59
+      <type>int</type> +      <default>400</default>
dbbc59
+      <locale name="C"> +       <short>Open/Save Dialog Width</short>
dbbc59
+       <long>Persistent Open/Save dialog width.</long>
dbbc59
+      </locale>
dbbc59
+    </schema>
dbbc59
+
dbbc59
+    <schema>
fee51b
+      <key>/schemas/apps/gedit-2/preferences/ui/open_save/selector_height</key>
fee51b
+      <applyto>/apps/gedit-2/preferences/ui/open_save/selector_height</applyto>
fee51b
+      <owner>gedit</owner>
dbbc59
+      <type>int</type>
dbbc59
+      <default>400</default>
dbbc59
+      <locale name="C">
dbbc59
+       <short>Open/Save Dialog Height</short>
dbbc59
+       <long>Persistent Open/Save dialog height.</long>
dbbc59
+      </locale>
dbbc59
+    </schema>
dbbc59
   </schemalist>
dbbc59
 </gconfschemafile>
dbbc59
--- gedit-2.13.2/gedit/gedit-prefs-manager.h.filesel	2006-01-13 13:29:39.000000000 -0500
dbbc59
+++ gedit-2.13.2/gedit/gedit-prefs-manager.h	2006-01-13 13:36:05.000000000 -0500
dbbc59
@@ -106,6 +106,10 @@
dbbc59
 #define GPM_RECENTS_DIR			GPM_PREFS_DIR "/ui/recents"
dbbc59
 #define GPM_MAX_RECENTS			GPM_RECENTS_DIR "/max_recents"
dbbc59
 
dbbc59
+#define GPM_OPENSAVE_DIR                GPM_PREFS_DIR "/ui/open_save"
dbbc59
+#define GPM_OPENSAVE_WIDTH              GPM_OPENSAVE_DIR "/selector_width"
dbbc59
+#define GPM_OPENSAVE_HEIGHT             GPM_OPENSAVE_DIR "/selector_height"
dbbc59
+
dbbc59
 /* Print */
dbbc59
 #define GPM_PRINT_PAGE_DIR		GPM_PREFS_DIR "/print/page"
dbbc59
 #define GPM_PRINT_SYNTAX		GPM_PRINT_PAGE_DIR "/print_syntax_highlighting"
dbbc59
@@ -189,6 +193,9 @@
dbbc59
 
dbbc59
 #define GPM_DEFAULT_MAX_RECENTS		5
dbbc59
 
dbbc59
+#define GPM_DEFAULT_OPENSAVE_WIDTH      400
dbbc59
+#define GPM_DEFAULT_OPENSAVE_HEIGHT     400
dbbc59
+
dbbc59
 #define GPM_DEFAULT_WINDOW_STATE	0
dbbc59
 #define GPM_DEFAULT_WINDOW_WIDTH	650
dbbc59
 #define GPM_DEFAULT_WINDOW_HEIGHT	500
dbbc59
@@ -386,6 +393,15 @@
dbbc59
  */
dbbc59
 gint		 	 gedit_prefs_manager_get_max_recents		(void);
dbbc59
 
dbbc59
+/* Persistent size of open/save dialogs */
dbbc59
+gint                     gedit_prefs_manager_get_opensave_dialog_width      (void);
dbbc59
+void                     gedit_prefs_manager_set_opensave_dialog_width      (gint width);
dbbc59
+gboolean                 gedit_prefs_manager_opensave_dialog_width_can_set  (void);
dbbc59
+
dbbc59
+gint                     gedit_prefs_manager_get_opensave_dialog_height     (void);
dbbc59
+void                     gedit_prefs_manager_set_opensave_dialog_height     (gint height);
dbbc59
+gboolean                 gedit_prefs_manager_opensave_dialog_height_can_set (void);
dbbc59
+
dbbc59
 /* Encodings */
dbbc59
 GSList 			*gedit_prefs_manager_get_auto_detected_encodings (void);
dbbc59
 
dbbc59
--- gedit-2.13.2/gedit/gedit-prefs-manager.c.filesel	2006-01-13 13:42:22.000000000 -0500
dbbc59
+++ gedit-2.13.2/gedit/gedit-prefs-manager.c	2006-01-13 13:42:56.000000000 -0500
dbbc59
@@ -721,6 +721,16 @@
dbbc59
 
dbbc59
 }
dbbc59
 
dbbc59
+/* Open/Save dialog width */
dbbc59
+DEFINE_INT_PREF (opensave_dialog_width,
dbbc59
+                GPM_OPENSAVE_WIDTH,
dbbc59
+                GPM_DEFAULT_OPENSAVE_WIDTH)
dbbc59
+
dbbc59
+/* Open/Save dialog height */
dbbc59
+DEFINE_INT_PREF (opensave_dialog_height,
dbbc59
+                GPM_OPENSAVE_HEIGHT,
dbbc59
+                GPM_DEFAULT_OPENSAVE_HEIGHT)
dbbc59
+
dbbc59
 /* Statusbar visiblity */
dbbc59
 DEFINE_BOOL_PREF (statusbar_visible,
dbbc59
 		  GPM_STATUSBAR_VISIBLE,
dbbc59
--- gedit-2.13.2/gedit/gedit-commands-file.c.filesel	2006-01-13 13:36:19.000000000 -0500
dbbc59
+++ gedit-2.13.2/gedit/gedit-commands-file.c	2006-01-13 13:42:11.000000000 -0500
dbbc59
@@ -50,6 +50,7 @@
dbbc59
 #include "dialogs/gedit-close-confirmation-dialog.h"
dbbc59
 #include "dialogs/gedit-open-location-dialog.h"
dbbc59
 #include "gedit-file-chooser-dialog.h"
dbbc59
+#include "gedit-prefs-manager.h"
dbbc59
 
dbbc59
 
dbbc59
 /* Defined constants */
dbbc59
@@ -239,9 +240,15 @@
dbbc59
 {
dbbc59
 	GSList              *uris;
dbbc59
 	const GeditEncoding *encoding;
dbbc59
+        gint                 selector_width;
dbbc59
+        gint                 selector_height;
dbbc59
 
dbbc59
 	gedit_debug (DEBUG_COMMANDS);
dbbc59
 
dbbc59
+        gtk_window_get_size (GTK_WINDOW (dialog), &selector_width, &selector_height);
dbbc59
+        gedit_prefs_manager_set_opensave_dialog_width (selector_width);
dbbc59
+        gedit_prefs_manager_set_opensave_dialog_height (selector_height);
dbbc59
+
dbbc59
 	if (response_id != GTK_RESPONSE_OK)
dbbc59
 	{
dbbc59
 		gtk_widget_destroy (GTK_WIDGET (dialog));
dbbc59
@@ -272,6 +279,8 @@
dbbc59
 	gpointer       data;
dbbc59
 	GeditDocument *doc;
dbbc59
 	gchar         *default_path = NULL;
dbbc59
+        gint           selector_width;
dbbc59
+        gint           selector_height;
dbbc59
 
dbbc59
 	gedit_debug (DEBUG_COMMANDS);
dbbc59
 
dbbc59
@@ -336,6 +345,9 @@
dbbc59
 
dbbc59
 	g_free (default_path);
dbbc59
 
dbbc59
+        selector_width = gedit_prefs_manager_get_opensave_dialog_width ();
dbbc59
+        selector_height = gedit_prefs_manager_get_opensave_dialog_height ();
c30a7e
+        gtk_window_resize (GTK_WINDOW (open_dialog), selector_width, selector_height);
dbbc59
 	g_signal_connect (open_dialog,
dbbc59
 			  "response",
dbbc59
 			  G_CALLBACK (open_dialog_response_cb),
dbbc59
@@ -585,6 +597,8 @@
dbbc59
 	GeditTab            *tab;
dbbc59
 	gpointer	     data;
dbbc59
 	GSList		    *tabs_to_save_as;
dbbc59
+        gint                 selector_width;
dbbc59
+        gint                 selector_height;
dbbc59
 
dbbc59
 	gedit_debug (DEBUG_COMMANDS);
dbbc59
 
dbbc59
@@ -603,6 +617,10 @@
dbbc59
 
dbbc59
 	encoding = gedit_file_chooser_dialog_get_encoding (dialog);
dbbc59
 
dbbc59
+        gtk_window_get_size (GTK_WINDOW (dialog), &selector_width, &selector_height);
dbbc59
+        gedit_prefs_manager_set_opensave_dialog_width (selector_width);
dbbc59
+        gedit_prefs_manager_set_opensave_dialog_height (selector_height);
dbbc59
+
dbbc59
 	gtk_widget_destroy (GTK_WIDGET (dialog));
dbbc59
 
dbbc59
 	if (tab != NULL)
dbbc59
@@ -701,6 +719,8 @@
dbbc59
 	gchar *uri;
dbbc59
 	gboolean uri_set = FALSE;
dbbc59
 	const GeditEncoding *encoding;
dbbc59
+        gint selector_width;
dbbc59
+        gint selector_height;
dbbc59
 
dbbc59
 	g_return_if_fail (GEDIT_IS_TAB (tab));
dbbc59
 	g_return_if_fail (GEDIT_IS_WINDOW (window));
dbbc59
@@ -778,6 +798,10 @@
dbbc59
 			  G_CALLBACK (save_dialog_response_cb),
dbbc59
 			  window);
dbbc59
 
dbbc59
+        selector_width = gedit_prefs_manager_get_opensave_dialog_width();
dbbc59
+        selector_height = gedit_prefs_manager_get_opensave_dialog_height();
dbbc59
+        gtk_window_resize (GTK_WINDOW (save_dialog), selector_width, selector_height);
dbbc59
+
dbbc59
 	gtk_widget_show (save_dialog);
dbbc59
 }
dbbc59