summary refs log tree commit diff stats
path: root/src/fe-gtk/maingui.c
diff options
context:
space:
mode:
authorRichardHitt <rbh00@netcom.com>2012-12-02 20:08:40 -0800
committerRichardHitt <rbh00@netcom.com>2012-12-02 20:08:40 -0800
commit5fdcdedd9e88c50f969b0fef71c7f40c324da06d (patch)
tree73a7b7852dd0f1dbe45556190ddc6647b97100df /src/fe-gtk/maingui.c
parent5f88e6ccf0a90617e0d4d170750b7dcdb028a3c4 (diff)
parentabaf4425d9cf59166011e63abb5c28ac4d7fa32d (diff)
Merge pull request #298 from TingPing/vertical
Save pane height and restore on start
Diffstat (limited to 'src/fe-gtk/maingui.c')
-rw-r--r--src/fe-gtk/maingui.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 55c73837..e5f79abd 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2543,6 +2543,12 @@ mg_create_userlist (session_gui *gui, GtkWidget *box)
 }
 
 static void
+mg_vpane_cb (GtkPaned *pane, GParamSpec *param, session_gui *gui)
+{
+	prefs.hex_gui_pane_divider_position = gtk_paned_get_position (pane);
+}
+
+static void
 mg_leftpane_cb (GtkPaned *pane, GParamSpec *param, session_gui *gui)
 {
 	prefs.hex_gui_pane_left_size = gtk_paned_get_position (pane);
@@ -2570,6 +2576,10 @@ mg_add_pane_signals (session_gui *gui)
 							G_CALLBACK (mg_rightpane_cb), gui);
 	g_signal_connect (G_OBJECT (gui->hpane_left), "notify::position",
 							G_CALLBACK (mg_leftpane_cb), gui);
+	g_signal_connect (G_OBJECT (gui->vpane_left), "notify::position",
+							G_CALLBACK (mg_vpane_cb), gui);
+	g_signal_connect (G_OBJECT (gui->vpane_right), "notify::position",
+							G_CALLBACK (mg_vpane_cb), gui);
 	return FALSE;
 }
 
@@ -2756,6 +2766,12 @@ mg_place_userlist_and_chanview_real (session_gui *gui, GtkWidget *userlist, GtkW
 		}
 	}
 
+	if (mg_is_userlist_and_tree_combined () && prefs.hex_gui_pane_divider_position != 0)
+	{
+		gtk_paned_set_position (GTK_PANED (gui->vpane_left), prefs.hex_gui_pane_divider_position);
+		gtk_paned_set_position (GTK_PANED (gui->vpane_right), prefs.hex_gui_pane_divider_position);
+	}
+
 	if (unref_chanview)
 		g_object_unref (chanview);
 	if (unref_userlist)