gnucash maint: Bug 729497 - Saved Report Configuration selection window resize

Geert Janssens gjanssens at code.gnucash.org
Mon May 5 15:43:20 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/9e5d6132 (commit)
	from  https://github.com/Gnucash/gnucash/commit/6695f6c6 (commit)



commit 9e5d61325768d346e3a092ae12fcfb045eae555e
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Mon May 5 20:46:02 2014 +0200

    Bug 729497 - Saved Report Configuration selection window resize

diff --git a/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in.in b/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in.in
index 6a71a44..7c318dd 100644
--- a/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in.in
+++ b/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in.in
@@ -12,6 +12,7 @@
     <child name="log-replay" schema="org.gnucash.dialogs.log-replay"/>
     <child name="open-save" schema="org.gnucash.dialogs.open-save"/>
     <child name="report" schema="org.gnucash.dialogs.report"/>
+    <child name="report-saved-configs" schema="org.gnucash.dialogs.report-saved-configs"/>
     <child name="lot-viewer" schema="org.gnucash.dialogs.lot-viewer"/>
     <child name="new-user" schema="org.gnucash.dialogs.new-user"/>
     <child name="new-hierarchy" schema="org.gnucash.dialogs.new-hierarchy"/>
@@ -141,6 +142,16 @@
     </key>
   </schema>
 
+  <schema id="org.gnucash.dialogs.report-saved-configs" path="/org/gnucash/dialogs/report-saved-configs/">
+    <key name="last-geometry" type="(iiii)">
+      <default>(-1,-1,-1,-1)</default>
+      <summary>Last window position and size</summary>
+      <description>This setting describes the size and position of the window when it was last closed.
+        The numbers are the X and Y coordinates of the top left corner of the window
+        followed by the width and height of the window.</description>
+    </key>
+  </schema>
+
   <schema id="org.gnucash.dialogs.lot-viewer" path="/org/gnucash/dialogs/lot-viewer/">
     <key name="hpane-position" type="i">
       <default>200</default>
diff --git a/src/report/report-gnome/dialog-custom-report.c b/src/report/report-gnome/dialog-custom-report.c
index ac01ee2..3e642ff 100644
--- a/src/report/report-gnome/dialog-custom-report.c
+++ b/src/report/report-gnome/dialog-custom-report.c
@@ -41,6 +41,7 @@
 #include "gnc-report.h"
 #include "gnc-plugin-page-report.h"
 
+#define GNC_PREFS_GROUP_REPORT_SAVED_CONFIGS "dialogs.report-saved-configs"
 
 /* convenience for accessing columns in the GtkListStore that holds
    the reports */
@@ -95,6 +96,8 @@ void
 custom_report_dialog_close_cb(GtkWidget* widget, gpointer data)
 {
     CustomReportDialog *crd = data;
+    gnc_save_window_size(GNC_PREFS_GROUP_REPORT_SAVED_CONFIGS, GTK_WINDOW(crd->dialog));
+
     gtk_widget_destroy(crd->dialog);
     g_free(crd);
 }
@@ -497,6 +500,8 @@ static CustomReportDialog *gnc_ui_custom_report_internal(GncMainWindow * window)
     set_reports_view_and_model(crd);
     crd->window = window;
 
+    gnc_restore_window_size (GNC_PREFS_GROUP_REPORT_SAVED_CONFIGS, GTK_WINDOW(crd->dialog));
+
     /* connect the signals */
     gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, crd);
 
diff --git a/src/report/report-gnome/dialog-custom-report.glade b/src/report/report-gnome/dialog-custom-report.glade
index 4247a36..5f13edd 100644
--- a/src/report/report-gnome/dialog-custom-report.glade
+++ b/src/report/report-gnome/dialog-custom-report.glade
@@ -96,7 +96,7 @@ altering the report's options to your taste and then choosing "Save Report Confi
 the Reports menu or tool bar.</property>
           </object>
           <packing>
-            <property name="expand">True</property>
+            <property name="expand">False</property>
             <property name="fill">True</property>
             <property name="position">3</property>
           </packing>



Summary of changes:
 src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in.in | 11 +++++++++++
 src/report/report-gnome/dialog-custom-report.c           |  5 +++++
 src/report/report-gnome/dialog-custom-report.glade       |  2 +-
 3 files changed, 17 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list