[glade3] * src/glade-window.c: Removed hard coded size request to palette (Bug 579624)



commit 66e31dd00b3f5a66f1be9d2277a5774075d0b584
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Wed Apr 22 09:55:56 2009 -0400

    	* src/glade-window.c: Removed hard coded size request to palette (Bug 579624)
    	(added some default pane positions).
---
 ChangeLog          |    3 +++
 src/glade-window.c |   11 +++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cbe6622..fd406c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 	* plugins/gtk+/glade-gtk.c: Made Atk proxy objects always have unique names (at
 	least as unique as the widget they are created for) (bug 579565).
 
+	* src/glade-window.c: Removed hard coded size request to palette (Bug 579624)
+	(added some default pane positions).
+
 2009-04-22  Davyd Madeley <davyd madeley id au>
 
 	* plugins/gtk+/glade-gtk.c: Fixed output format for GtkLabel attributes (bug 579793).
diff --git a/src/glade-window.c b/src/glade-window.c
index b735546..3b8c2d5 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -2875,10 +2875,10 @@ glade_window_set_initial_size (GladeWindow *window, GKeyFile *config)
 }
 
 static void
-load_paned_position (GKeyFile *config, GtkWidget *pane, const gchar *name)
+load_paned_position (GKeyFile *config, GtkWidget *pane, const gchar *name, gint default_position)
 {
 	gtk_paned_set_position (GTK_PANED (pane),
-				g_key_file_get_integer (config, name, "position", NULL));
+				key_file_get_int (config, name, "position", default_position));
 }
 
 static void
@@ -2888,9 +2888,9 @@ glade_window_config_load (GladeWindow *window)
 	
 	glade_window_set_initial_size (window, config);
 	
-	load_paned_position (config, window->priv->center_pane, "center_pane");
-	load_paned_position (config, window->priv->left_pane, "left_pane");
-	load_paned_position (config, window->priv->right_pane, "right_pane");
+	load_paned_position (config, window->priv->center_pane, "center_pane", 400);
+	load_paned_position (config, window->priv->left_pane, "left_pane", 200);
+	load_paned_position (config, window->priv->right_pane, "right_pane", 220);
 }
 
 static void
@@ -3028,7 +3028,6 @@ glade_window_init (GladeWindow *window)
 	gtk_paned_pack1 (GTK_PANED (hpaned2), palette, FALSE, FALSE);
 	setup_dock (&priv->docks[DOCK_PALETTE], palette, 200, 540, 
 		    _("Palette"), "palette", hpaned2, TRUE);
-	gtk_widget_set_size_request (palette, 200, 540);
 	gtk_widget_show (palette);
 
 	/* inspectors */



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