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)
Set longer timeouts for GetBestDrivers, PrinterAddOption and
PrinterAddOptionDefault. These can take more time than already
specified timeouts. (#683229)
PpNewPrinter contains asynchronous method for installation of
new printer. The new printer is specified by given parameters (e.g. name,
device-id, device-uri, ppd-name, info, location, ...). (#683229)
This commit adds PpHost object which represents a remote
host from which we want to get printers. It contains
asynchronous method for enumerating printers list from the host
using CUPS' SNMP backend and method for enumerating printers list
directly from the remote CUPS server running on the host. (#683229)
This commit adds asynchronous function get_cups_devices_async() which
sequentially executes CUPS' backends and returns found devices
by a callback. (#683229)
PpCups object represents local CUPS server. It contains
asynchronous method for getting printers installed on
the server. It is an asynchronous version of cupsGetDests().
(#683229)
<cups/cups.h> has to be included in pp-utils.h because there
are functions in pp-utils.h which accepts types defined
in the cups.h as their parameters. (#683229)
CUPS 1.6 makes various structures private and
introduces these ippGet and ippSet functions
for all of the fields in these structures.
http://www.cups.org/str.php?L3928
We define our own accessors when
building against CUPS < 1.6. (#679759)
(modified by Marek Kasik)
This commit places list of jobs to separate dialog. The dialog
is updated through calling of pp_jobs_dialog_update()
from "Printers" panel because the panel is already subscribed
to cups notifications.
Add Options dialog which allows users to set more options than current dialog.
The dialog reads printer's PPD file and add its options to the dialog together
with some preselected IPP options (#678637).
All operations in the dialog are asynchronous.
During implementation of this, the option for setting allowed users was removed
because this is not suitable for this panel (the option is intended for
administrators).
This commit adds popup window which when activated allows
user to select PPD from local database of installed PPDs,
select directly PPD from filesystem or select one from 3
recommended PPDs (#678637).
The popup is activated by clicking on model field (the panel
has to be unlocked). It starts to search for the best PPDs
available immediately after its popup.
All operations are asynchronous.
Use new cups-pk-helper's method PrinterAddOption for setting
default media size for new printers. This fixes problem with
setting default media size (#672694).
This fixes a typo in handling of printers options in actualize_printers_list()
which caused a crash when number of printers exceeded number of options (#672689).
Prevent g-c-c from crashing because of different lengths of
arrays in which are informations about markers names, levels,
types and colors (rhbz#790430).
Show correct hostname for each remote printer. G-c-c gets
it from printer-uri-supported or from device-uri CUPS options now.
It also set 'printer-network' icon for remote printers to have them
easily recognizable from local printers.
Don't crash when exiting from new printer dialog due to external change
of panel (e.g. clicking "Network Settings" during run of the new printer
dialog). (rhbz #760587)
Store subscription id returned by g_dbus_connection_signal_subscribe()
and unsubscribe the signal with it when not needed any more. This should
fix rhbz #752168.