pp_new_printer_dialog_get_new_print_device is replaced with
pp_new_printer_dialog_get_new_printer which returns a PpNewPrinter.
gtk_show_all is used instead of gtk_dialog_run for PpNewPrinterDialog
and PpPPDSelectionDialog.
This is in response to feedback:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/930#note_1202114
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_print_device method has been added to
PpNewPrinterDialog to allow getting 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.
Search for samba printers on local network or on specified
host. The new printer dialog asks for password for a samba
server if it is needed for listing printers on it. User is
asked for selection of driver from local database during
addition of new samba printer.
https://bugzilla.gnome.org/show_bug.cgi?id=683229
This commit implements design changes from
https://live.gnome.org/Design/SystemSettings/Printers.
The new printer dialog gets informations about connected devices
from CUPS server asynchronously and separately for each backend now.
Entering an address into the entry and pressing the icon inside
the entry or enter starts to detect printers on the entered host.
Entering a text which is a substring of a name of a device or its location
filters the list to contain just devicess with the string in it (e.g. Canon
will keep devices with "Canon" in their name).
The PpNewPrinterDialog is regular object now. It emits signal "pre-response"
when dialog is closed and a printer is being added and signal "response" when
the new printer was added, addition of the new printer failed or the dialog was
cancelled.
This commit removes FirewallD support from new printer dialog. (#683229)
The dialog is able to add printers discovered by cupsGetDevices().
It can also add printers from a remote CUPS server by typing
its address and selecting printer we want to add (#640734).