printers: Count only current users job

Instead of querying for all the jobs, query just for jobs belonging
to the current user.

https://bugzilla.gnome.org/show_bug.cgi?id=779079
This commit is contained in:
Felipe Borges 2017-02-27 15:31:30 +01:00
parent 89ff6a610e
commit fe51a743c3

View file

@ -397,7 +397,7 @@ pp_printer_entry_update_jobs_count (PpPrinterEntry *self)
gchar *button_label;
gint num_jobs, num_of_jobs;
num_of_jobs = cupsGetJobs (&jobs, self->printer_name, 0, CUPS_WHICHJOBS_ACTIVE);
num_of_jobs = cupsGetJobs (&jobs, self->printer_name, 1, CUPS_WHICHJOBS_ACTIVE);
num_jobs = num_of_jobs < 0 ? 0 : (guint) num_of_jobs;
if (num_of_jobs <= 0)