Commit graph

124 commits

Author SHA1 Message Date
Bastien Nocera
34dadb5ac3 printers: Avoid dereferencing NULL variable
If line is NULL, then buffer is NULL, and buffer[0] points
to nowhere.
2011-10-20 15:50:00 +01:00
Marek Kasik
619364ff1a Printers: Don't add redundant prefix
Don't add prefix "-default" to options set by
PrinterAddOptionDefault method, it is added automatically.
2011-10-14 14:47:39 +02:00
Marek Kasik
4665e84df4 Printers: Don't hide address entry
Don't hide address entry when there is not firewalld available.
It is still possible that firewall is set up correctly and user
should be able to enter address of his network printer and
install it (rhbz #743694).
2011-10-11 16:32:06 +02:00
Bastien Nocera
0e119e480a printers: Fix build on systems without LC_PAPER
By using gtk_paper_size_get_default() directly to do all
the hard work for us.

https://bugzilla.gnome.org/show_bug.cgi?id=660692
2011-10-03 12:29:49 +01:00
Marek Kasik
92b64f1cab Printers: Hide spinner after search
Don't show spinner after search for new printers (#659753).
2011-09-23 16:06:23 +02:00
Marek Kasik
0d86715c01 Printers: Show that no printer was found
Notify user that no local/network printer was found after search (#659725).
2011-09-23 14:53:04 +02:00
Marek Kasik
ffff7a7deb Printers: Match lower-case properly
The lower-cased string needs to be checked against a lower-case
string, or it's never going to match (found by Bastien Nocera in
gnome-settings-daemon).
2011-09-19 14:00:10 +02:00
Marek Kasik
df913a7cf7 Printers: Use system-config-printer's MissingExecutables method
If available, use DBus method MissingExecutables which finds executables
needed by new printer. This method is available in system-config-printer
since version 1.3.5 (#654742). User is offered installation of packages
containing those missing executables then.
2011-08-03 16:27:11 +02:00
Marek Kasik
eb18692613 Printers: Use system-config-printer's GroupPhysicalDevices method
If available, use DBus method GroupPhysicalDevices which removes duplicates
from list of found devices. This method is available in system-config-printer
since version 1.3.5 (#654742).
2011-08-02 17:11:25 +02: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
7962a25ecf Printers: Open firewall for required connections when searching for printers
This commit enables services mdns, ipp, ipp-client and samba-client on
firewall for 5 minutes for detection of network printers (#648784).
It enables required services permanently for printers selected by user
for addition then. It shows a notification for the permanent enable.
It uses firewalld, so if it is not installed or running it shows a warning
message to the user in the place where discovered printers will be shown
(both local and network). The warning disappears after the finish of
printers discovery (but not from network part if no printer was found).
2011-07-27 13:33:48 +02:00
Matthias Clasen
88b47dc25b Add translation context in some places
"Local" and "Network" are not sufficiently unique, otherwise.
See bug 654725
2011-07-20 07:41:36 -04:00
Marek Kasik
63edb0dcbe Printers: Include cups/ppd.h explicitly
cups/ppd.h is not included by cups/cups.h since CUPS 1.5.
2011-06-20 17:02:39 +02:00
Marek Kasik
fba02faa49 Printers: Use SNMP CUPS backend to discover printers on given address
Search for printers on address given by user using CUPS's SNMP backend.
This modification typically finds network printers publishing themselves
on port 9100.
2011-05-27 15:38:59 +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
03f49b9e3f printers: Check presence of new printer
Check successful installation of new printer by search
in list of destinations given by CUPS. Add index to the end
of name of new printer if the name is already used.
2011-05-06 13:39:37 +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
475f3fee9a printers: Make Add button insensitive until user select a printer
Set Add button in the PpNewPrinterDialog sensitive only if user select
a printer in the dialog (#648787).
2011-05-02 15:48:19 +02:00
Marek Kasik
6b0c9cacb2 printers: Set default PaperSize of new printer according to the locale
Set Letter or A4 according to the locale when adding new printer (rhbz#691714).
2011-04-19 13:30:02 +02:00
Marek Kasik
6e479859ed printers: Make call of DevicesGet cancellable
Pass a GCancellable object to g_dbus_proxy_call() for DevicesGet
method. This assures that g-c-c won't crash when user cancels addition
of new printer before the call is finished (rhbz#691931).
2011-04-18 16:14:27 +02:00
Marek Kasik
84a2b3e353 printers: Don't set reason when setting AcceptJobs
Set reason to NULL when setting AcceptJobs to TRUE (rhbz#691154).
2011-04-05 17:50:18 +02:00
Marek Kasik
c7179b6901 printers: Set longer timeout for installation of printer driver
Don't timeout when installing printer drivers.
2011-03-15 12:03:58 +01:00
Marek Kasik
080dabe3e4 printers: Call cupsGetDevices() asynchronously
This patch makes PpNewPrinterDialog to call DevicesGet method
asynchronously now.
It also adds spinner to the lower left corner with label showing
status of this operation (#644212).
2011-03-14 17:21:39 +01: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