Skip to content

WIP: Change PpNewPrinterDialog to GtkDialog

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

Since it is no longer feasible to catch the GtkDialog signals and process them before passing data back to users of PpNewPrinterDialog, callback functions are used. A new "PreResponseCallback" typedef is introduced for callback functions to handle what used to be the "PRE_RESPONSE" signal to abstract away the async nature of adding printer to CUPS. The RESPONSE signal is handled by a standard UserResponseCallback.

Destructors no longer cleanup PpNewPrinterDialog instances as they are handled when the dialog is dismissed, or automatically by the destroy_with_parent property.

The WID helper macro is removed as access to the GtkBuilder which builds the dialog is no longer possible. Instead, references are kept to the relevant UI components by gtk_widget_class_bind_template_child.

PpNewPrinterDialog can be displayed with gtk_dialog_run and gtk_window_set_transient_for.

Merge request reports