Commit graph

9 commits

Author SHA1 Message Date
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
dfbe1faea2 printers: Update GtkListBox of printers consecutively
Goal of this commit is to not overwhelm UI when a lot of printers is added
to CUPS. You can reproduce this situation when you add e.g. 30 printers using
lpadmin. Th UI stops to respond for some time.

To do so, the printer entries are not deleted every time there is a request
for updating of the list of printers but only new printer entries are added
and printer entries of deleted printers are removed. Other printer
entries are just updated by new method pp_printer_entry_update().
Which, by the way, is almost whole taken from pp_printer_entry_new().

This needed to add sort function for the list of printer entries. It sorts
printers according to their names not taking case into account.

In the similar manner, the filter function was extended to not show printers
which are being deleted. This needs a list of names of deleted printers
which we keep until they are really deleted.
One important thing here is the "reference" object which points to the panel
itself via its "self" key. We pass this object to the pp_printer_delete_async()'s
callback so it knows whether it can remove the printer's name from the list
of deleted printers (once the panel is being destroyed it clears the key itself).
2020-06-22 11:57:57 +00:00
Robert Ancell
13d72a79a7 printers: Replace ifdefs with #pragma once 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
Marek Kasik
873c2c6839 Printers: Add commandline action "show-jobs"
Add action "show-jobs" to printers panel which
gets printer name as a parameter and shows user
jobs dialog.
Syntax for trigerring this action looks like:
"gnome-control-center printers show-jobs my-local-printer".

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-26 14:33:30 +01:00
Marek Kasik
212b8a6504 Printers: Add method for authentication of jobs to PpPrinterEntry
This commit adds method for triggerring of authentication of print jobs
to PpPrinterEntry. This is needed for asking for authentication of jobs
of a printer from the main panel.

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:09 +01:00
Felipe Borges
0d0b42eb50 printers: Hide supply level bar when there is no inklevel data
https://bugzilla.gnome.org/show_bug.cgi?id=779702
2017-06-15 15:39:22 +02:00
Felipe Borges
5302047ff1 printers: Subscribe to jobs notifications
The previous implementation of the panel was unable to individually
update a PpPrinterEntry jobs count and its PpJobsDialog.

These changes make the job notifications trigger updates in the
PpPrinterEntry UIs, keeping track of job events on the go.

https://bugzilla.gnome.org/show_bug.cgi?id=779079
2017-02-27 16:29:43 +01:00
Felipe Borges
37e37961e5 printers: introduce PpPrinterEntry widget
This commit introduces the following regressions:
- no possibility of renaming properties such as printer names,
location, or changing model/driver. This issue is going to be
solved nextly by the introduction of the PpDetailsDialog.

https://bugzilla.gnome.org/show_bug.cgi?id=767600
2017-02-13 19:27:49 +01:00