@@ -420,6 +420,7 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
420
420
GncPluginPageReportPrivate * priv ;
421
421
GncMainWindow * window ;
422
422
GtkWindow * topLvl ;
423
+ GtkAction * action ;
423
424
URLType type ;
424
425
char * id_name ;
425
426
char * child_name ;
@@ -428,6 +429,13 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
428
429
429
430
ENTER ("page %p" , page );
430
431
432
+ #ifndef WEBKIT1
433
+ /* Hide the ExportPdf action for Webkit2 */
434
+ action = gnc_plugin_page_get_action (page , "FilePrintPDFAction" );
435
+ gtk_action_set_sensitive (action , FALSE);
436
+ gtk_action_set_visible (action , FALSE);
437
+ #endif
438
+
431
439
report = GNC_PLUGIN_PAGE_REPORT (page );
432
440
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE (report );
433
441
@@ -458,7 +466,7 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
458
466
gnc_html_set_urltype_cb (priv -> html , gnc_plugin_page_report_check_urltype );
459
467
gnc_html_set_load_cb (priv -> html , gnc_plugin_page_report_load_cb , report );
460
468
461
- /* We need to call the load call back so the report appears to of been run
469
+ /* We need to call the load call back so the report appears to have been run
462
470
so it will get saved properly if the report is not realized in session */
463
471
id_name = g_strdup_printf ("id=%d" , priv -> reportId );
464
472
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
1166
1174
N_ ("Print the current report" ),
1167
1175
G_CALLBACK (gnc_plugin_page_report_print_cb )
1168
1176
},
1177
+ {
1178
+ "FilePrintPDFAction" , GNC_ICON_PDF_EXPORT , N_ ("Export as P_DF..." ), NULL ,
1179
+ N_ ("Export the current report as a PDF document" ),
1180
+ G_CALLBACK (gnc_plugin_page_report_exportpdf_cb )
1181
+ },
1169
1182
1170
1183
{
1171
1184
"EditCutAction" , "edit-cut" , N_ ("Cu_t" ), "<primary>X" ,
0 commit comments