summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation-portal.c
diff options
context:
space:
mode:
authorCasey Jao <casey.jao@gmail.com>2020-07-08 23:31:49 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-08 23:32:43 -0400
commitcc8bb5fc545d854b0ae6ea54270974e8846e645e (patch)
tree3c18fe6c22767523302cbf45b074b74d05f225d3 /gtk/gtkprintoperation-portal.c
parent8fb1e33d0f13b2de974fedf41f4e1895ccd885b2 (diff)
downloadgtk+-cc8bb5fc545d854b0ae6ea54270974e8846e645e.tar.gz
Remember to call print_cb even if print operation is cancelled.
Closes #2917.
Diffstat (limited to 'gtk/gtkprintoperation-portal.c')
-rw-r--r--gtk/gtkprintoperation-portal.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/gtkprintoperation-portal.c b/gtk/gtkprintoperation-portal.c
index eb155a78b6..15bf35c7bc 100644
--- a/gtk/gtkprintoperation-portal.c
+++ b/gtk/gtkprintoperation-portal.c
@@ -427,7 +427,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 (options)
g_variant_unref (options);