changeset 765:339db85846da

Preserve properties window width and height during session even when layout.save_window_positions is not set. It restores the pre revision 858 behavior.
author zas_
date Thu, 29 May 2008 07:58:34 +0000
parents ae618ebec3e9
children 7148e125bf23
files src/info.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/info.c	Thu May 29 07:52:05 2008 +0000
+++ b/src/info.c	Thu May 29 07:58:34 2008 +0000
@@ -833,9 +833,12 @@
 	GtkWidget *button;
 	GtkWidget *label;
 	GdkGeometry geometry;
+	static gboolean run_once = FALSE;
 
 	if (!fd && !list) return;
 
+	run_once = TRUE;
+
 	if (!list)
 		{
 		list = g_list_append(NULL, file_data_ref(fd));
@@ -866,7 +869,7 @@
 	gtk_window_set_geometry_hints(GTK_WINDOW(id->window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE);
 
-	if (options->layout.save_window_positions)
+	if (options->layout.save_window_positions || run_once)
 		gtk_window_set_default_size(GTK_WINDOW(id->window), options->layout.properties_window.w, options->layout.properties_window.h);
 	else
 		gtk_window_set_default_size(GTK_WINDOW(id->window), DEF_PROPERTY_WIDTH, DEF_PROPERTY_HEIGHT);