Commit graph

26 commits

Author SHA1 Message Date
Robert Ancell
7c1f84b4d3 printers: Don't pass PpMaintenanceCommand references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:05 +00:00
Robert Ancell
f3bf0080d7 printers: Don't pass GDBusConnection references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:04 +00:00
Robert Ancell
fe91d17b43 printers: Remove nesting on a GVariant iteration 2020-03-30 03:24:58 +00:00
Robert Ancell
2b9815dbf8 printers: Remove unnecessary checks on result of g_variant_get
This always returns a value or hits an assertion.
2020-03-30 03:24:58 +00:00
Robert Ancell
815db8f404 printers: Replace explicit g_variant_unref calls with g_autoptr 2020-03-30 03:24:58 +00:00
Robert Ancell
3a7533da1b printers: Use g_autoptr for the results of D-Bus calls 2020-03-30 03:24:58 +00:00
Robert Ancell
67074b7aea printers: Fix GVariantIter leaks 2020-03-30 03:24:58 +00:00
Robert Ancell
9065850b92 printers: Replace g_variant_iter_next_value with the simpler g_variant_iter_next 2020-03-30 03:24:58 +00:00
Robert Ancell
e9b9966e7d printers: Use g_autoptr with strings 2019-02-05 10:26:15 +13:00
Robert Ancell
47cd15d911 printers: Use self variable to match coding style 2019-01-30 11:33:28 +13:00
Robert Ancell
a3c251301e printers: Don't initialize variable that defaults to correct value 2019-01-30 11:33:28 +13:00
Robert Ancell
4042cb5d33 printers: Replace GObject boilerplace with G_DECLARE_TYPE 2019-01-30 11:33:28 +13:00
Robert Ancell
fb09d9c090 printers: Use g_error_matches where appropriate 2018-12-10 10:13:28 +13:00
Robert Ancell
983857e827 printers: Use g_clear_object with cancellable
Safer than g_object_unref.
Also remove explicit initialization to NULL - all values start as NULL.
2018-11-28 11:48:49 +00:00
Robert Ancell
323fee6d3b printers: Replace deprecated GSimpleAsyncResult with GTask 2018-11-28 11:48:49 +00:00
Robert Ancell
877445cbaf printers: Use g_autoptr for GError handling 2018-09-17 15:19:21 +00:00
Robert Ancell
3f5bc8369b printers: Fix warning about wrong data type 2018-06-26 15:57:20 +12:00
Mario Sanchez Prada
b742936970 printers: Expose the newly added 'Clean' maintenance command to users
Add an extra button "Clean Print Heads" that will be shown when the relevant
maintenance command is available for a printer, to bring this feature back.

Additionally, this commit adds a 'parameters' attribute to PpMaintenanceCommand,
which is needed as the "Clean" command requires to at least be passed "all" as
its single parameter: https://www.cups.org/doc/spec-command.html#Clean

https://bugzilla.gnome.org/show_bug.cgi?id=764620
2017-03-23 13:30:22 +00:00
Marek Kasik
b5b421288c printers: Fix setting of page size
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
2015-06-12 16:23:45 +02:00
Marek Kasik
2d2f20fe53 printers: Use correct type for window id
Window id should be unsigned int and not int. Also the default
value should be 0 instead of the 631 (a copy paste error).

https://bugzilla.gnome.org/show_bug.cgi?id=740115
2014-11-14 14:32:14 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Marek Kasik
72d63e49d1 printers: Don't crash without system-config-printer
Fix error handling in addition of new printer.

https://bugzilla.gnome.org/show_bug.cgi?id=698642
2013-04-24 15:52:42 +02: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
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
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
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