[gnome-control-center] printers: Cancel adding printer if PPD dialog is cancelled



commit 5e2e4a55af8d15d4b710d8054201bff148d7cf02
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Nov 10 15:05:21 2020 +1300

    printers: Cancel adding printer if PPD dialog is cancelled

 panels/printers/pp-new-printer-dialog.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 20c041416..de410a868 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -1900,6 +1900,11 @@ ppd_selection_cb (GtkDialog *_dialog,
   guint                      window_id = 0;
   gint                       acquisition_method;
 
+  if (response_id != GTK_RESPONSE_OK) {
+      emit_response (self, GTK_RESPONSE_CANCEL);
+      return;
+  }
+
   ppd_name = pp_ppd_selection_dialog_get_ppd_name (self->ppd_selection_dialog);
   ppd_display_name = pp_ppd_selection_dialog_get_ppd_display_name (self->ppd_selection_dialog);
   g_clear_object (&self->ppd_selection_dialog);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]