Skip to content

Commit

Permalink
Readd the Export To Pdf function for Webkit1 based builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Jun 5, 2019
1 parent 5f51fc5 commit fd6ce16
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion gnucash/report/report-gnome/gnc-plugin-page-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit fd6ce16

Please sign in to comment.