Skip to content

Make PpNewPrinterDialog a GtkDialog instead of GObject

Change PpNewPrinterDialog to GtkDialog instead of a GObject wrapper around a GtkBuilder.

This is accomplished by moving the calls to pp_printer_add_async directly to CcPrintersPanel. pp_printer_delete_async calls are already done directly in the CcPrintersPanel so there is consistency gained by this implementation in addition to PpNewPrinterDialog actually being a GtkDialog.

A pp_new_printer_dialog_get_new_printer method has been added to PpNewPrinterDialog to allow getting a PpNewPrinter object created by the PpPrintDevice selected by the user to add. This can be called anytime after a response callback with a GTK_RESPONSE_OK reponse_id.

PpNewPrinterDialog still does asynchronous operations to populate the dialog, but the create dialog -> receive signal -> destroy dialog flow can all be handled like a traditional GtkDialog without additional callbacks or signalling.

This is a followup to MR 930.

Edited by Marek Kašík

Merge request reports