From 9e5d61325768d346e3a092ae12fcfb045eae555e Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Mon, 5 May 2014 20:46:02 +0200 Subject: [PATCH] Bug 729497 - Saved Report Configuration selection window resize --- .../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(-) 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 6a71a447dc..7c318dd2c7 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 @@ + @@ -141,6 +142,16 @@ + + + (-1,-1,-1,-1) + Last window position and size + 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. + + + 200 diff --git a/src/report/report-gnome/dialog-custom-report.c b/src/report/report-gnome/dialog-custom-report.c index ac01ee2026..3e642ff2d7 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 4247a36ac6..5f13edd355 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. - True + False True 3