r21716 - gnucash/trunk/src - Remember the printing setting after a Report print job
Christian Stimming
cstim at code.gnucash.org
Sun Dec 11 16:50:27 EST 2011
Author: cstim
Date: 2011-12-11 16:50:27 -0500 (Sun, 11 Dec 2011)
New Revision: 21716
Trac: http://svn.gnucash.org/trac/changeset/21716
Modified:
gnucash/trunk/src/html/gnc-html-webkit.c
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
Remember the printing setting after a Report print job
Modified: gnucash/trunk/src/html/gnc-html-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-webkit.c 2011-12-11 20:59:48 UTC (rev 21715)
+++ gnucash/trunk/src/html/gnc-html-webkit.c 2011-12-11 21:50:27 UTC (rev 21716)
@@ -1089,7 +1089,6 @@
gtk_print_operation_set_unit( op, GTK_UNIT_POINTS );
#endif
webkit_web_frame_print_full( frame, op, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, &error );
- g_object_unref( op );
if ( error != NULL )
{
@@ -1104,6 +1103,11 @@
g_signal_connect( dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show( dialog );
}
+
+ // Remember to save the printing settings after this print job
+ gnc_print_operation_save_print_settings(op);
+ g_object_unref( op );
+
#else
webkit_web_frame_print( frame );
#endif
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2011-12-11 20:59:48 UTC (rev 21715)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2011-12-11 21:50:27 UTC (rev 21716)
@@ -1628,7 +1628,10 @@
"Report name", NULL);
if (!report_name)
report_name = g_strdup (_(default_jobname));
- if (safe_strcmp(report_name, _("Printable Invoice")) == 0)
+ if (g_strcmp0(report_name, _("Printable Invoice")) == 0
+ || g_strcmp0(report_name, _("Tax Invoice")) == 0
+ || g_strcmp0(report_name, _("Easy Invoice")) == 0
+ || g_strcmp0(report_name, _("Fancy Invoice")) == 0)
{
/* Again HACK alert: We modify this single known string here into
* something more appropriate. */
More information about the gnucash-changes
mailing list