Commit graph

9 commits

Author SHA1 Message Date
Brandon Nielsen
16aa95bdc8 Return a PpNewPrinter instead of PpPrintDevice, use gtk_show_all
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
2021-07-26 16:03:05 +00:00
Brandon Nielsen
179bda1b64 Make PpNewPrinterDialog a GtkDialog instead of GObject
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.
2021-07-26 16:03:05 +00:00
Robert Ancell
13d72a79a7 printers: Replace ifdefs with #pragma once 2019-01-30 11:33:28 +13:00
Robert Ancell
4042cb5d33 printers: Replace GObject boilerplace with G_DECLARE_TYPE 2019-01-30 11:33:28 +13:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Marek Kasik
d7f31fc41c printers: Search for samba printers in new printer dialog
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
2013-02-15 18:23:56 +01:00
Marek Kasik
1eb906515f printers: Use GPLv2+ for files created by Marek Kasik
This commit is related to the bug #683420.
2012-09-11 15:02:26 +02:00
Marek Kasik
45ba8e89e8 printers: Redesign of new printer dialog
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)
2012-09-04 14:09:06 +02:00
Marek Kasik
3fb4d4af27 printers: Add dialog for adding new printers
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).
2011-03-07 17:09:00 +01:00