From ab90f381fdbe5c6956a7dda81ffae79c9687563c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Sun, 2 Mar 2008 19:43:51 +0000 Subject: [PATCH] Bug#397108: Improve resizing of sx list panes, save and restore their sizes. Give additional space to the sx list instead of the calendar. Also save the page's pane divisor position and restore it when reopening the data file. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16999 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/glade/sched-xact.glade | 4 ++-- src/gnome/gnc-plugin-page-sx-list.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/gnome/glade/sched-xact.glade b/src/gnome/glade/sched-xact.glade index aad27e9f0f..a18a392d70 100644 --- a/src/gnome/glade/sched-xact.glade +++ b/src/gnome/glade/sched-xact.glade @@ -5992,7 +5992,7 @@ Custom True - False + True @@ -6085,7 +6085,7 @@ Custom True - True + False diff --git a/src/gnome/gnc-plugin-page-sx-list.c b/src/gnome/gnc-plugin-page-sx-list.c index 9049ab6e4a..60322eb2e7 100644 --- a/src/gnome/gnc-plugin-page-sx-list.c +++ b/src/gnome/gnc-plugin-page-sx-list.c @@ -421,7 +421,10 @@ gnc_plugin_page_sx_list_save_page (GncPluginPage *plugin_page, priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page); g_key_file_set_integer(key_file, group_name, "dense_cal_num_months", - gnc_dense_cal_get_num_months(priv->gdcal)); + gnc_dense_cal_get_num_months(priv->gdcal)); + + g_key_file_set_integer(key_file, group_name, "paned_position", + gtk_paned_get_position(GTK_PANED(priv->widget))); } /** @@ -459,6 +462,16 @@ gnc_plugin_page_sx_list_recreate_page (GtkWidget *window, g_error_free(err); } + { + GError *err = NULL; + gint paned_position = g_key_file_get_integer(key_file, group_name, + "paned_position", &err); + if (err == NULL) + gtk_paned_set_position(GTK_PANED(priv->widget), paned_position); + else + g_error_free(err); + } + return GNC_PLUGIN_PAGE(page); }