[gtk/gtk-3-24: 1/2] Remember to call print_cb even if print operation is cancelled.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] Remember to call print_cb even if print operation is cancelled.
- Date: Thu, 9 Jul 2020 03:28:24 +0000 (UTC)
commit 6c911248c9235dcf6797f4b7cab7647926383db2
Author: Casey Jao <casey jao gmail com>
Date: Wed Jul 8 13:26:47 2020 -0400
Remember to call print_cb even if print operation is cancelled.
Closes #2917.
gtk/gtkprintoperation-portal.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkprintoperation-portal.c b/gtk/gtkprintoperation-portal.c
index 9fb0226706..271ede40b8 100644
--- a/gtk/gtkprintoperation-portal.c
+++ b/gtk/gtkprintoperation-portal.c
@@ -426,8 +426,15 @@ prepare_print_response (GDBusConnection *connection,
g_free (filename);
}
else
- portal->result = GTK_PRINT_OPERATION_RESULT_CANCEL;
+ {
+ portal->result = GTK_PRINT_OPERATION_RESULT_CANCEL;
+
+ if (portal->print_cb)
+ portal->print_cb (portal->op, portal->parent, portal->do_print, portal->result);
+ if (portal->destroy)
+ portal->destroy (portal);
+ }
if (portal->loop)
g_main_loop_quit (portal->loop);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]