Commit graph

24 commits

Author SHA1 Message Date
Marek Kasik
41924f8c75 printers: Add class for searching for samba printers
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
2013-02-15 18:23:53 +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
Bastien Nocera
0a0bc59afa printers: Avoid redefinition of UserResponseCallback
It was declared to be the same value in all three headers, which
causes problems with old version of GCC.

https://bugzilla.gnome.org/show_bug.cgi?id=683696
2012-09-10 14:55:58 +01:00
Marek Kasik
a0ad46365f printers: Remove redundant functions
Remove functions which are not used anymore. (#683229)
2012-09-04 14:09:06 +02:00
Marek Kasik
6f8b9e8825 printers: Allow printer_get_ppd_async() to get PPD from remote host
Adds host_name and port parameters to printer_get_ppd_async(). If host_name
is NULL then it gets the PPD from local CUPS server. (#683229)
2012-09-04 14:09:05 +02:00
Marek Kasik
8695554557 printers: Make get_paper_size_from_locale() available to other source files
Export get_paper_size_from_locale() in pp-utils.h. (#683229)
2012-09-04 14:09:05 +02:00
Marek Kasik
142d2c65b4 printers: Add PpHost object for listing print devices
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)
2012-09-04 14:09:05 +02:00
Marek Kasik
0cb0dab377 printers: Add async method for listing print devices
This commit adds asynchronous function get_cups_devices_async() which
sequentially executes CUPS' backends and returns found devices
by a callback. (#683229)
2012-09-04 14:09:05 +02:00
Marek Kasik
cc2e15a592 printers: Move common constants to pp-utils.h
Move constants which are used in more than one source file
to pp-utils.h. (#683229)
2012-09-04 14:09:05 +02:00
Marek Kasik
1f76a739e3 printers: Include missing header
<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)
2012-09-04 14:09:05 +02:00
Marek Kasik
c6d8b9c825 printers: Place jobs to separate dialog
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.
2012-08-07 14:09:33 +02:00
Marek Kasik
a6b2db1e17 printers: Cancel async operations properly
Don't call callbacks of async functions called
from Printers panel if they were cancelled.
User data are not valid in that case (rhbz#845496).
2012-08-07 11:54:11 +02:00
Marek Kasik
7ae3027b47 printer: Add "Options" dialog
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).
2012-07-16 15:26:33 +02:00
Marek Kasik
dd7479caea printers: Allow users to change printer's PPD file
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.
2012-07-16 13:53:40 +02:00
Marek Kasik
5272bcc06d printers: Use PrinterAddOption method to set media size
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).
2012-04-13 13:09:38 +02:00
Robert Ancell
7dd5ae6b94 printers: Port to GDBus 2012-03-01 09:34:11 +11:00
Marek Kasik
07c7ffaf0c Printers: Show correct hostnames for printers
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.
2012-01-06 13:08:25 +01:00
Marek Kasik
8951bc41a7 Printers: Use system-config-printer's GetBestDrivers method
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).
2011-08-02 14:20:29 +02:00
Marek Kasik
8f4895559a Printers: Allow editing of printer name and location
Use CcEditableEntry for editing name and location of local printers
(#649511).
2011-05-27 13:38:15 +02:00
Marek Kasik
8164c8f7f9 printers: Improve search for PPDs for new devices
Improve logic for selecting PPD from available PPDs.
Try to find the best PPD if there is not an exact match
(rhbz#691808, rhbz#691701).
2011-05-06 12:31:42 +02:00
Marek Kasik
7b830a3c6a printers: Cache PPD files for later use
Don't get PPD file from CUPS server every time user needs
an information from it. Have PPD files stored on disk and
delete them on exit.
2011-04-22 14:30:26 +02:00
Marek Kasik
2b3da7feb8 printers: Set default printer properly
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).
2011-04-12 16:43:36 +02:00
Marek Kasik
3349308ea2 printers: Actualize printer list and job list automatically
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).
2011-04-05 15:54:09 +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