30 #define G_LOG_DOMAIN "gnc.printing" 32 static GtkPrintSettings *print_settings = NULL;
33 static GtkPageSetup *page_setup = NULL;
34 G_LOCK_DEFINE_STATIC(print_settings);
35 G_LOCK_DEFINE_STATIC(page_setup);
43 G_LOCK(print_settings);
45 g_object_unref(print_settings);
46 print_settings = g_object_ref(gtk_print_operation_get_print_settings(op));
47 G_UNLOCK(print_settings);
56 G_LOCK(print_settings);
58 gtk_print_operation_set_print_settings(op, print_settings);
59 G_UNLOCK(print_settings);
64 gtk_print_operation_set_default_page_setup(op, page_setup);
67 gtk_print_operation_set_job_name ( op, jobname);
73 GtkPrintSettings *settings = NULL;
74 GtkPageSetup *old_page_setup, *new_page_setup;
77 G_LOCK(print_settings);
78 settings = print_settings;
80 g_object_ref(settings);
81 G_UNLOCK(print_settings);
85 old_page_setup = page_setup;
87 g_object_ref(old_page_setup);
91 new_page_setup = gtk_print_run_page_setup_dialog(parent, old_page_setup,
97 g_object_unref(page_setup);
98 page_setup = new_page_setup;
103 g_object_unref(settings);
105 g_object_unref(old_page_setup);
110 return print_settings;
void gnc_print_operation_save_print_settings(GtkPrintOperation *op)
Retrieve the print settings from the GtkPrintOperation op and save them in a static variable...
void gnc_ui_page_setup(GtkWindow *parent)
Run a page setup dialog and save the resulting GtkPageSetup in a static variable. ...
void gnc_print_operation_init(GtkPrintOperation *op, const gchar *jobname)
If print settings have been saved by gnc_print_operation_save_print_settings(), then set them on the ...
GtkPrintSettings * gnc_print_get_settings()
Returns the pointer to our static GtkPrintSettings object.