r16999 - gnucash/trunk/src/gnome - Bug#397108: Improve resizing of sx list panes, save and restore their sizes.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Mar 2 14:43:51 EST 2008
Author: andi5
Date: 2008-03-02 14:43:51 -0500 (Sun, 02 Mar 2008)
New Revision: 16999
Trac: http://svn.gnucash.org/trac/changeset/16999
Modified:
gnucash/trunk/src/gnome/glade/sched-xact.glade
gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
Log:
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.
Modified: gnucash/trunk/src/gnome/glade/sched-xact.glade
===================================================================
--- gnucash/trunk/src/gnome/glade/sched-xact.glade 2008-03-02 18:55:09 UTC (rev 16998)
+++ gnucash/trunk/src/gnome/glade/sched-xact.glade 2008-03-02 19:43:51 UTC (rev 16999)
@@ -5992,7 +5992,7 @@
</widget>
<packing>
<property name="shrink">True</property>
- <property name="resize">False</property>
+ <property name="resize">True</property>
</packing>
</child>
@@ -6085,7 +6085,7 @@
</widget>
<packing>
<property name="shrink">True</property>
- <property name="resize">True</property>
+ <property name="resize">False</property>
</packing>
</child>
</widget>
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2008-03-02 18:55:09 UTC (rev 16998)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2008-03-02 19:43:51 UTC (rev 16999)
@@ -421,7 +421,10 @@
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 @@
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);
}
More information about the gnucash-changes
mailing list