[Gnucash-changes] r11972 - gnucash/trunk - Restore the "Save
Report" code that was lost in one of the head->g2
David Hampton
hampton at cvs.gnucash.org
Fri Nov 18 13:09:38 EST 2005
Author: hampton
Date: 2005-11-18 13:09:37 -0500 (Fri, 18 Nov 2005)
New Revision: 11972
Trac: http://svn.gnucash.org/trac/changeset/11972
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report-ui.xml
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
Restore the "Save Report" code that was lost in one of the head->g2
syncs.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2005-11-18 04:37:26 UTC (rev 11971)
+++ gnucash/trunk/ChangeLog 2005-11-18 18:09:37 UTC (rev 11972)
@@ -1,3 +1,9 @@
+2005-11-18 David Hampton <hampton at employees.org>
+
+ * src/report/report-gnome/gnc-plugin-page-report-ui.xml:
+ * src/report/report-gnome/gnc-plugin-page-report.c: Restore the
+ "Save Report" code that was lost in one of the head->g2 syncs.
+
2005-11-17 David Hampton <hampton at employees.org>
* src/quotes/dump-finance-quote: Add support for printing currency
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report-ui.xml
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report-ui.xml 2005-11-18 04:37:26 UTC (rev 11971)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report-ui.xml 2005-11-18 18:09:37 UTC (rev 11972)
@@ -1,6 +1,9 @@
<ui>
<menubar>
<menu name="File" action="FileAction">
+ <placeholder name="FileSavePlaceholder">
+ <menuitem name="FileReportSave" action="ReportSaveAction" />
+ </placeholder>
<menu name="FileExport" action="FileExportAction">
<placeholder name="FileExportPlaceholder">
<menuitem name="FileReportExport" action="ReportExportAction" />
@@ -29,6 +32,7 @@
<toolitem name="ReportToolbarReload" action="ReportReloadAction" />
<toolitem name="ReportToolbarStop" action="ReportStopAction" />
<separator name="ReportToolbarSep1" />
+ <toolitem name="ReportToolbarSave" action="ReportSaveAction" />
<toolitem name="ReportToolbarExport" action="ReportExportAction" />
<toolitem name="ReportToolbarOptions" action="ReportOptionsAction" />
<toolitem name="ReportToolbarPrint" action="FilePrintAction" />
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2005-11-18 04:37:26 UTC (rev 11971)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2005-11-18 18:09:37 UTC (rev 11972)
@@ -151,6 +151,7 @@
static void gnc_plugin_page_report_back_cb(GtkAction *action, GncPluginPageReport *rep);
static void gnc_plugin_page_report_reload_cb(GtkAction *action, GncPluginPageReport *rep);
static void gnc_plugin_page_report_stop_cb(GtkAction *action, GncPluginPageReport *rep);
+static void gnc_plugin_page_report_save_cb(GtkAction *action, GncPluginPageReport *rep);
static void gnc_plugin_page_report_export_cb(GtkAction *action, GncPluginPageReport *rep);
static void gnc_plugin_page_report_options_cb(GtkAction *action, GncPluginPageReport *rep);
static void gnc_plugin_page_report_print_cb(GtkAction *action, GncPluginPageReport *rep);
@@ -821,6 +822,12 @@
{
{ "FilePrintAction", GTK_STOCK_PRINT, N_("Print Report..."), NULL, NULL,
G_CALLBACK(gnc_plugin_page_report_print_cb) },
+ { "ReportSaveAction", GTK_STOCK_SAVE, N_("Save Report"), NULL,
+ N_("Save the current report for later use in "
+ "~/.gnucash/saved-reports-2.0 so that they are accessible as "
+ "menu entries in the report menu. Will go into effect at the "
+ "next startup of gnucash."),
+ G_CALLBACK(gnc_plugin_page_report_save_cb) },
{ "ReportExportAction", GTK_STOCK_CONVERT, N_("Export Report"), NULL, NULL,
G_CALLBACK(gnc_plugin_page_report_export_cb) },
{ "ReportOptionsAction", GTK_STOCK_PROPERTIES, N_("Report Options"), NULL, NULL,
@@ -1199,6 +1206,20 @@
}
static void
+gnc_plugin_page_report_save_cb( GtkAction *action, GncPluginPageReport *report )
+{
+ GncPluginPageReportPrivate *priv;
+ SCM save_func;
+
+ priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
+ if (priv->cur_report == SCM_BOOL_F)
+ return;
+
+ save_func = scm_c_eval_string("gnc:report-save-to-savefile");
+ scm_call_1(save_func, priv->cur_report);
+}
+
+static void
gnc_plugin_page_report_export_cb( GtkAction *action, GncPluginPageReport *report )
{
GncPluginPageReportPrivate *priv;
More information about the gnucash-changes
mailing list