printer_set_ppd_async and printer_set_ppd_file_async copy the printer name, but
this isn't freed in any cases that use these callback (the string isn't even
used at all).
Remove the GList holding printing devices and use already present
GtkListStore for this in the New printer dialog.
This avoids us to install wrong printer when there is more devices
with the same name since we have GtkTreeIter of the selected row.
Use GtkTreeModelFilter for filtering of current devices.
Update test for canonicalize_device_name() since I had to change one
of its parameters.
https://bugzilla.gnome.org/show_bug.cgi?id=749830
Set 'PageSize' instead of 'media' for new printers since we use PPD
for construction of the combo for selecting of default paper size.
Previously, we've been setting 'media' attribute for new printers.
Attribute 'media' is used by IPP but we set paper size using 'PageSize'
which comes from PPD in the options dialog. Sometimes (quite often) IPP
gets priority over PPD in print systems. Therefore there was inconsistency
of what user set as default paper size on the options dialog and what was used.
Also don't mark IPP and user's local options as default in PpPPDOptionWidget
since it should use just PPD (we can change PPD values only in this widget).
Since we use PPD for setting of paper size in the options dialog, we shouldn't
show a value which user does not change actually (IPP's 'media' vs. PPD's
'PageSize').
https://bugzilla.gnome.org/show_bug.cgi?id=748569
Add pp_host_get_lpd_devices_async() and
pp_host_get_lpd_devices_finish() functions to PpHost class.
pp_host_get_lpd_devices_async() starts searching for LPD printer
on given address.
The test consist in connection to the default port 515 (or the one
given by creator of PpHost) of the address and sending a print job
to it, which in turn returns a status (we test several standard
queue names).
We suppose that there is a LPD printer on the address if a buffer
with zero length is returned (rfc 1179 5.2).
https://bugzilla.gnome.org/show_bug.cgi?id=695564
Add pp_host_get_socket_devices_async() and
pp_host_get_socket_devices_finish() functions to PpHost class.
pp_host_get_socket_devices_async() starts searching for socket printer
on given address.
The test consist in connection to the default port 9100 (or the one
given by creator of PpHost) of the address.
We suppose that there is an AppSocket/HP JetDirect printer on the address
if the connection succeeds.
See these links for additional info:
http://en.wikipedia.org/wiki/JetDirecthttp://www.cups.org/documentation.php/network.htmlhttps://bugzilla.gnome.org/show_bug.cgi?id=695564
PpPrintDevice has grown quite a lot since its introduction.
It contains almost all members of TDevice now.
Merging members of TDevice into PpPrintDevice saves us some work
and allows us to process TDevice's data out of pp-new-printer-dialog.c.
https://bugzilla.gnome.org/show_bug.cgi?id=695564
Guess hostname of found device if it was not provided before.
CUPS browses its printers as "PrinterName @ ComputerName" or
"PrinterInfo @ ComputerName" through DNS-SD. Get the last part
of that string and set it as hostname.
HPLIP printers have URIs of form
hp:/net/PrinterModel?ip=IPAddress&port=Port or
hp:/net/PrinterModel?ip=IPAddress.
URIs of other protocols are parsed by httpSeparateURI().
https://bugzilla.gnome.org/show_bug.cgi?id=693183
Add parameter which enables showing of authentication dialog
for Samba servers which need authentication.
Add samba server to the internal list of found devices if it needs
authentication and the authentication is disabled.
https://bugzilla.gnome.org/show_bug.cgi?id=698532
Add class PpSamba which contains asynchronous function
for searching for samba-shared printers. It can search
for printers on local network or on a specific host if
needed.
https://bugzilla.gnome.org/show_bug.cgi?id=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)
<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)
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).
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.
If available, use DBus method GetBestDriver which determines the best PPD file
for the given printer. This method is available in system-config-printer
since version 1.3.5 (#654742).
Clean "~/.cups/lpoptions" file before setting default printer
on local CUPS server. Store default printer to "~/.cups/lpoptions"
if we are connected to a remote CUPS server (#646100).
This patch makes Printers panel to automatically refresh printers list
when a new printer is added or removed. It is refreshed also when a printer
changes its state (to see changes in paused/unpaused state) (rhbz#691718).
It also automatically refresh list of jobs (and also number of active jobs in
main tab) for actual printer (rhbz#691737).
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).