gnucash maint: Readd the Export To Pdf function for Webkit1 based builds
Geert Janssens
gjanssens at code.gnucash.org
Wed Jun 5 11:38:53 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/fd6ce161 (commit)
from https://github.com/Gnucash/gnucash/commit/5f51fc54 (commit)
commit fd6ce1612bf54b53f695474ffb1ec4ac67e414e8
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Jun 5 17:38:29 2019 +0200
Readd the Export To Pdf function for Webkit1 based builds
diff --git a/gnucash/report/report-gnome/gnc-plugin-page-report.c b/gnucash/report/report-gnome/gnc-plugin-page-report.c
index 6c1ede21a..1cfc747b0 100644
--- a/gnucash/report/report-gnome/gnc-plugin-page-report.c
+++ b/gnucash/report/report-gnome/gnc-plugin-page-report.c
@@ -420,6 +420,7 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
GncPluginPageReportPrivate *priv;
GncMainWindow *window;
GtkWindow *topLvl;
+ GtkAction *action;
URLType type;
char * id_name;
char * child_name;
@@ -428,6 +429,13 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
ENTER("page %p", page);
+#ifndef WEBKIT1
+ /* Hide the ExportPdf action for Webkit2 */
+ action = gnc_plugin_page_get_action (page, "FilePrintPDFAction");
+ gtk_action_set_sensitive (action, FALSE);
+ gtk_action_set_visible (action, FALSE);
+#endif
+
report = GNC_PLUGIN_PAGE_REPORT(page);
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
@@ -458,7 +466,7 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
gnc_html_set_urltype_cb(priv->html, gnc_plugin_page_report_check_urltype);
gnc_html_set_load_cb(priv->html, gnc_plugin_page_report_load_cb, report);
- /* We need to call the load call back so the report appears to of been run
+ /* We need to call the load call back so the report appears to have been run
so it will get saved properly if the report is not realized in session */
id_name = g_strdup_printf("id=%d", priv->reportId );
child_name = gnc_build_url( URL_TYPE_REPORT, id_name, NULL );
@@ -1166,6 +1174,11 @@ gnc_plugin_page_report_constr_init(GncPluginPageReport *plugin_page, gint report
N_("Print the current report"),
G_CALLBACK(gnc_plugin_page_report_print_cb)
},
+ {
+ "FilePrintPDFAction", GNC_ICON_PDF_EXPORT, N_("Export as P_DF..."), NULL,
+ N_("Export the current report as a PDF document"),
+ G_CALLBACK(gnc_plugin_page_report_exportpdf_cb)
+ },
{
"EditCutAction", "edit-cut", N_("Cu_t"), "<primary>X",
Summary of changes:
gnucash/report/report-gnome/gnc-plugin-page-report.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list