[evince] libview: Hold the application while printing
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Hold the application while printing
- Date: Mon, 1 Oct 2012 12:38:07 +0000 (UTC)
commit 4e147b507e06292633601fe1e5283f9cf4deac31
Author: Christian Persch <chpe gnome org>
Date: Sat Jul 7 17:35:06 2012 +0200
libview: Hold the application while printing
We need to hold the application while the print is in progress.
libview/ev-print-operation.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c
index a5561ac..8db208a 100644
--- a/libview/ev-print-operation.c
+++ b/libview/ev-print-operation.c
@@ -1944,6 +1944,7 @@ static void
ev_print_operation_print_finalize (GObject *object)
{
EvPrintOperationPrint *print = EV_PRINT_OPERATION_PRINT (object);
+ GApplication *application;
if (print->op) {
g_object_unref (print->op);
@@ -1969,11 +1970,17 @@ ev_print_operation_print_finalize (GObject *object)
}
(* G_OBJECT_CLASS (ev_print_operation_print_parent_class)->finalize) (object);
+
+ application = g_application_get_default ();
+ if (application)
+ g_application_release (application);
}
static void
ev_print_operation_print_init (EvPrintOperationPrint *print)
{
+ GApplication *application;
+
print->op = gtk_print_operation_new ();
g_signal_connect_swapped (print->op, "begin_print",
G_CALLBACK (ev_print_operation_print_begin_print),
@@ -2000,6 +2007,10 @@ ev_print_operation_print_init (EvPrintOperationPrint *print)
gtk_print_operation_set_use_full_page (print->op, TRUE);
gtk_print_operation_set_unit (print->op, GTK_UNIT_POINTS);
gtk_print_operation_set_custom_tab_label (print->op, _("Page Handling"));
+
+ application = g_application_get_default ();
+ if (application)
+ g_application_hold (application);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]