Commit graph

26 commits

Author SHA1 Message Date
Zdenek Dohnal
fb07b65cee printers: Use CUPS dest API for printing test page instead CUPS IPP API
The current usage of CUPS IPP API does not work for temporary queues, because the g-c-c sends the request without creating a local printer first, so the request is sent to non-existing printer.
If you use the destination from cupsGetNamedDest() for printing, CUPS library does the local printer creation internally and printing test page will work even for temporary queues.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2148481
2023-02-16 15:12:27 +00:00
Marek Kasik
092cef515d printers: Fix deleting of printers when exiting
Call sync method to remove a printer when exiting Printers panel.
The deletion could not pass otherwise.

Fixes #2174
2023-01-16 14:32:01 +00:00
zhuyaliang
51760441b3 printers: Add adjust printer task priority button
Add a new  button to the 'PpJobRow',This button can adjust the priority of tasks in the print queue to the highest
2021-11-10 15:10:20 +00:00
Robert Ancell
902f90e5ea printers: Add methods for getting printer name and location
Remove the GObject properties that aren't type safe.
2020-10-29 20:36:48 +00:00
Marek Kasik
c18875c623 printers: Do not cleanup task after getting bus
Use g_steal_pointer() on task in get_bus_cb() in pp-printer.c
to not invalidate a pointer passed to a DBus call.
Cleanup the task in callback of the DBus call.
2020-10-29 20:19:01 +00:00
Robert Ancell
2def271824 printers: Add pp_job_new and associated methods.
The previous code was leaking a string (job title), used an integer pointer
instead of an integer for an id and requited a lot of memory management for a
string array. There was a lot of boilerplate code required for property
management which was not being used much. This is why type safe methods are a
much better idea than GObject properties. :)
2020-10-27 13:03:56 +00:00
Robert Ancell
f8204635ce printers: Fix location where GTask is unreffed 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
b2c5056031 printers: Use g_autoptr 2020-09-22 21:23:04 +00:00
Yuri Chornoivan
e7050ab6f4 Fix minor typos 2020-07-20 10:38:09 +03:00
Robert Ancell
958a7766fd printers: Remove unused finalize methods 2020-07-02 16:20:25 +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
181a496a4e printers: Return a GPtrArray instead of GList
This makes the memory able to be managed with g_autoptr.
This fixes a memory leak where the job list was leaked if the operation was cancelled.
2020-01-21 23:12:14 +00:00
Robert Ancell
092f24d62d printers: Remove unused variables 2019-02-07 11:22:33 +13: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
85604ab4f0 printers: Simplify finalize/dispose methods
Use g_clear_* functions to simplify code and ensure values are set to NULL after freeing.
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
877445cbaf printers: Use g_autoptr for GError handling 2018-09-17 15:19:21 +00:00
Marek Kasik
90e306df20 Printers: Get "job-hold-until" attribute for jobs
Get "job-hold-until" attribute when getting list of jobs. If it has value
"auth-info-required" then get "auth-info-required" attribute of the printer
and store it in PpJob's "auth-info-required" property.

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:03 +01:00
Felipe Borges
614fb9e27a printers: Make sure IPP_STATE_IDLE is defined
This changes are necessary because we don't require cups >= 1.4,
due to downstreams still shipping old cups versions.

The IPP_STATE_IDLE symbol has been introduced in cups 1.7. The
IPP_IDLE constant has been deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=789397
2017-10-24 12:34:54 +02:00
Felipe Borges
995d64292d printers: Introduce pp_printer_print_file_async
An asynchronous wrapper to print files.

https://bugzilla.gnome.org/show_bug.cgi?id=779708
2017-06-14 10:45:25 +02:00
Felipe Borges
5aca01cd65 printers: Remove printers asynchronously
Introduce pp_printer_delete_async ()

https://bugzilla.gnome.org/show_bug.cgi?id=693187
2017-05-26 13:16:36 +02:00
Felipe Borges
1d0ae49685 printers: Introduce pp_printer_get_jobs_async ()
It is a PpPrinter method to query asychronously for printing jobs
information.

It should replace cups_get_jobs_async ()

https://bugzilla.gnome.org/show_bug.cgi?id=779313
2017-03-06 16:05:29 +01:00
Felipe Borges
ca30e0ead9 printers: Use async rename method
pp_printer_rename_async is better than the old printer_rename
utility.

The PpDetailsDialog doesn't need to do anything in the callback
since we are emiting the "printer-changed" signal when the dialog
is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=769114
2017-02-22 17:05:50 +01:00
Martin Hatina
a95bdb91bb printers: Introduce PpPrinter class
Introduce new class that represents printer.

https://bugzilla.gnome.org/show_bug.cgi?id=761539
2016-06-21 13:21:47 +02:00