Commit graph

201 commits

Author SHA1 Message Date
Bastien Nocera
ed896b8060 printers: Use CUPS CFLAGS when compiling 2013-02-18 09:43:15 +01:00
Jeremy Bicha
05e60169ea build: Disable printers panel is libsmbclient.pc isn't found
https://bugzilla.gnome.org/show_bug.cgi?id=693923
2013-02-18 09:42:58 +01:00
Marek Kasik
39071d5b56 printers: Show printer name only in the title of options dialog
The name of the printer is sufficient information to describe the contents of
the dialog. "Options" isn't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=690424
2013-02-15 18:33:46 +01:00
Marek Kasik
d33f14b70a printers: Move dialog names to their titles
https://bugzilla.gnome.org/show_bug.cgi?id=690447
2013-02-15 18:33: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
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
8f2d51cb5e printers: Add authentication dialog for samba printers
Add new class PpAuthenticationDialog which shows dialog
requesting username and password. The dialog has 3 parameters.
The first one is a text which will be shown to the user and
the second is username by which username entry will be prefilled.
The last parameter is parent window so thedialog is properly
decorated and positioned.

https://bugzilla.gnome.org/show_bug.cgi?id=683229
2013-02-15 18:23:49 +01:00
Marek Kasik
27aa41f5c1 printers: Visual improvements of driver selection dialog
Make the dialog bigger (600x400). Add padding between list of manufacturers
and the list of drivers. Add padding to manufacturers and drivers lists.
Change Manufacturers and Drivers to singular. Trigger resizing of treeview
when list has changed so it has optimal width.

https://bugzilla.gnome.org/show_bug.cgi?id=690448
2013-02-15 16:07:39 +01:00
Marek Kasik
22d8f1be60 printers: Have nicer icon for default printer
Change icon of default printer from emblem-default-symbolic
to object-select-symbolic. Make it follow the state of the cell
in which it is placed.

https://bugzilla.gnome.org/show_bug.cgi?id=690444
2013-01-16 12:44:21 +01:00
Marek Kasik
50a0f57533 printers: Attach toolbar controlling jobs to list of jobs
Use inline-toolbar style for the toolbar containing
buttons for controlling jobs. Set junctions so it
visually connects with the list of jobs.

https://bugzilla.gnome.org/show_bug.cgi?id=690421
2013-01-16 12:42:39 +01:00
Marek Kasik
3482dd19c9 printers: Control acceptance of jobs with enable switch
Control acceptance of jobs by selected printer together
with switch which controls whether printer is enabled/disabled.

Use word "Stopped" instead of "Paused" for disabled printers.

Show state "Does not accept jobs" if printer is enabled but doesn't
accept jobs.

https://bugzilla.gnome.org/show_bug.cgi?id=678668
2013-01-09 14:25:15 +01:00
Allan Day
95eb8868ac printers: Reduce vertical and horizontal padding
There was too much space between rows and columns. Reduce the
padding a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=690375
2013-01-09 14:17:32 +01:00
Colin Walters
b8e93fb333 printers: Fix build with srcdir != builddir 2013-01-07 12:30:32 +01:00
Cosimo Cecchi
3064425711 printers: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:15 +01:00
Matthias Clasen
3d27d8caaf shell: Fittsify panels
Make it possible for panels to go all the way to the edge of the
shell. This is particularly important for panels that scroll, such
as the new power panel. All other panels are changed to compensate
for the loss of external padding.

https://bugzilla.gnome.org/show_bug.cgi?id=691229
2013-01-07 10:51:29 +01:00
Marek Kasik
9afed77bde printers: Avoid possible crash
Unlink given PPD file and free its filename
as soon as it is not required. This avoids
possible double free.

https://bugzilla.gnome.org/show_bug.cgi?id=690091
2012-12-12 13:34:58 +01:00
Bastien Nocera
e419ee7d4e panels: Remove unused X-GNOME-Settings-Panel key 2012-12-11 17:09:04 +01:00
Bastien Nocera
3686cf7eb8 shell: Make all control-center plugins static
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.

By the same token, it will stop external panels from being
created, and loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=690036
2012-12-11 17:07:39 +01:00
Marek Kasik
2bd01a70d3 printers: Make error messages clearer
Point to cups-pk-helper for errors originating from cups-pk-helper.

https://bugzilla.gnome.org/show_bug.cgi?id=689983
2012-12-10 17:05:56 +01:00
Jeremy Bicha
190052ff74 printers: Use the proper Unicode ellipsis (…) instead of three dots
https://bugzilla.gnome.org/show_bug.cgi?id=689497
2012-12-03 09:12:47 -05:00
Jeremy Bicha
7e7a690d12 printers: Add more a11y relations, change 'Show' btn to 'Show Jobs'
https://bugzilla.gnome.org/show_bug.cgi?id=688960
2012-11-26 17:49:17 -05:00
Marek Kasik
a153f43b4e printers: Resolve symlink when passing a PPD to CUPS
root is not able to resolve symlinks in /tmp/ created by ordinary users
because of a new policy and PPDs got from CUPS are symlinks to /etc/cups/ppd/*
placed to /tmp/.
Since we need to pass PPD file of original printer to CUPS when renaming
a printer we resolve given symlink and pass original filename to the CUPS.
2012-11-08 13:39:14 +01:00
Jeremy Bicha
e32494f2f0 Show Printers & Region panels in Unity but hide Background
Ubuntu plans to fork a separate Appearance panel this cycle so
that Gnomebuntu can use the GNOME Background panel.

I believe Ubuntu will try to use the Printers and Region & Language
panels instead of system-config-printer & language-selector

https://bugzilla.gnome.org/show_bug.cgi?id=687258
2012-10-31 06:50:05 -04:00
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