Commit graph

178 commits

Author SHA1 Message Date
Cosimo Cecchi
420240840a printers: don't override search entry's icon name
GtkSearchEntry already gets it right; this icon should be symbolic and
there's no need to override it.

https://bugzilla.gnome.org/show_bug.cgi?id=684827
2012-09-26 10:55:50 -04: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
Matthias Clasen
ba7171a579 Set a window title on the add printer dialog
Otherwise, it shows up as gnome-control-center, which is ugly.
2012-09-06 19:17:21 -04:00
Stefano Facchini
49797e8ae2 printers: Add missing definition of HAVE_CUPS_1_6
Commit 1532d7ef forgot to actually define HAVE_CUPS_1_6
when building against CUPS 1.6

https://bugzilla.gnome.org/show_bug.cgi?id=683441
2012-09-05 18:47:59 +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
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
9428b7a641 printers: Set longer timeouts
Set longer timeouts for GetBestDrivers, PrinterAddOption and
PrinterAddOptionDefault. These can take more time than already
specified timeouts. (#683229)
2012-09-04 14:09:06 +02:00
Marek Kasik
c34e282bab printers: Return after callback
Return from get_ppds_attribute_async() right after callback
was called. Otherwise the callback could be called twice. (#683229)
2012-09-04 14:09:06 +02:00
Marek Kasik
dea424dbee printers: Add PpNewPrinter object for installation of new printer
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)
2012-09-04 14:09:05 +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
1532d7ef1a printers: Add PpMaintenanceCommand object for execution of commands
PpMaintenanceCommand object contains asynchronous method which executes
given CUPS maintenance command (e.g. "AutoConfigure"). (#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
5a2794a7fe printers: Add PpCups object for getting destinations
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)
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
Frédéric Péters
e87c564cdb printers: remove blank class_finalize function 2012-08-21 22:10:14 +02:00
Ray Strode
b0e7a5efa8 panels: add register macro
Bastien says he doesn't like the blank class_finalize
functions in every panel and he would like a wrapper
macro to hide them.

This commit does that.
2012-08-21 14:32:33 -04:00
Marek Kasik
71db59d9a2 printers: Remove obsoleted notebook page
This commit removes the notebook page which consists
old printer options. It was replaced by separate dialog.
2012-08-09 14:23:49 +02:00
Jiri Popelka
fa5e27d320 Use CUPS-1.6 IPP API getter/setter functions.
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)
2012-08-08 14:35:58 +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
439b75fcea printers: Return accidentally removed code
Return implementation of get_help_uri() which was accidentally removed.
2012-08-07 12:28:05 +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
c272aa5eb5 printers: Don't restrict PPD list
Don't restrict PPD list to PPDs with DeviceIDs only.
Extend dictionary of manufacturers names.
2012-08-02 11:47:39 +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
Florian Müllner
0c353fb4a8 printers: Add get_help_uri() implementation
https://bugzilla.gnome.org/show_bug.cgi?id=675471
2012-05-18 18:48:38 +02:00
Bastien Nocera
82aa5d0130 printers: Fix small memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=673151
2012-04-13 14:58:59 +02:00
Marek Kasik
f87e38441d printers: A little correction of previous commit
Correcting a little typo.
2012-04-13 13:16:08 +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
Marek Kasik
30a9c7c7a7 printers: Fix crash in actualize_printers_list()
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).
2012-03-23 14:30:24 +01:00
Robert Ancell
1aace205fc printers: Check if device_info is NULL (I don't think it can be but was requested in bugzilla) 2012-03-01 09:34:11 +11:00
Robert Ancell
bda149fdd0 printers: Convert unnecessary use of GDBusProxy to using GDBusConnection directly 2012-03-01 09:34:11 +11:00
Robert Ancell
7dd5ae6b94 printers: Port to GDBus 2012-03-01 09:34:11 +11:00
Marek Kasik
8fdc455b21 printers: Check length of markers-related arrays
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).
2012-02-15 16:30:26 +01:00
Matthias Clasen
9dbc562777 Printers: Fix more floating variant madness
Floating references were _such_ a good idea...
2012-02-13 23:19:27 -05:00
Marek Kasik
7aae99aea9 Printers: Remove some warnings
Properly initialize a GValue with G_VALUE_INIT.
Remove unused code.
2012-01-24 13:34:24 +01:00
Marek Kasik
b0288811dd Printers: Show correct icon in information tab
Set correct icon in main tab of Printers panel (remote vs. local).
2012-01-24 13:15:32 +01:00
Marek Kasik
b1228913ba Printers: Actualize list of jobs at better place
Actualize list of print jobs after connection of "changed" signal
to GtkTreeSelection and after reset of sensitivity state of
job-handling buttons.
2012-01-24 12:31:54 +01:00
Marek Kasik
5e4e429cd0 Printers: Use g_error_free() instead of g_clear_error ()
Replace g_clear_error() with more appropriate g_error_free()
where suitable. (#658581)
2012-01-23 16:40:36 +01: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
Florian Müllner
4cd7b6c6dc .desktop: Drop prefix from X-GNOME-Keywords
The field has now been included in the spec, so use the standardized
name.
2011-12-19 16:26:40 +01:00
Marek Kasik
5421c92eb6 Printers: Don't crash because of external panel switch
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)
2011-12-12 12:56:00 +01:00
Marek Kasik
8fdbaea0e7 Printers: Store DBus subscription id for unsubscription
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.
2011-11-28 15:41:11 +01:00
Marek Kasik
e5747afe41 Printers: Don't allow "/" in printer name
Remove "/" from allowed characters so that models which contain
this character can be added successfully (#661774).
2011-11-08 13:07:03 +01:00
Bastien Nocera
6665b60422 panels: Update for Shell API changes 2011-11-07 18:03:14 +00:00
Marek Kasik
af40a98f80 Printers: Detect disconnection of printer
Connect to CUPS' "printer-stopped" event so the panel can change state
of the printer when unplugged (rhbz #743884).
2011-11-01 13:51:18 +01:00
Marek Kasik
6029100642 Printers: Set requesting-user-name when getting job info
CUPS has changed its policy for giving informations about jobs.
This fixes problem with actualization of list of print jobs.
2011-10-26 14:17:22 +02:00