GNOME Bugzilla – Bug 779079
Show number of my jobs only
Last modified: 2017-02-27 15:53:18 UTC
Commit 37e37961e5577da0b4fbff78c4d2a03fa7618779 changed count of active jobs from current user jobs to jobs of all users. This is wrong. We have to show number of jobs of current user only!
Created attachment 346622 [details] [review] printers: Store PpPrinterEntry instances for individual manipulation We were actualizing the whole printers collection everytime something should change. These patch introduces a HashTable keyed by the unique printer.name, which allows us to access individual instances of PpPrinterEntry.
Created attachment 346623 [details] [review] 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.
Review of attachment 346622 [details] [review]: ::: panels/printers/cc-printers-panel.c @@ +498,3 @@ gtk_widget_show_all (content); + + g_hash_table_insert (priv->printer_entries, g_strdup (printer.name), printer_entry); You are leaking the printer.name here. You should specify key_destroy_func.
Review of attachment 346623 [details] [review]: Thank you for the patch. It looks good to me. Wait with its push for the second patch please.
Also prepare a patch where you change the third parameter from 0 to 1 in PpPrinterEntry please.
Created attachment 346820 [details] [review] printers: Store PpPrinterEntry instances for individual manipulation We were actualizing the whole printers collection everytime something should change. These patch introduces a HashTable keyed by the unique printer.name, which allows us to access individual instances of PpPrinterEntry.
Created attachment 346821 [details] [review] printers: Free the PpJobsDialog after closing it Now we can safely pp_jobs_dialog_free () the PpJobsDialog.
Created attachment 346822 [details] [review] printers: Count only current users job Instead of querying for all the jobs, query just for jobs belonging to the current user.
Review of attachment 346820 [details] [review]: Looks good to me now.
Review of attachment 346822 [details] [review]: Thank you for the fix.
Thanks for your reviews! Attachment 346623 [details] pushed as 5302047 - printers: Subscribe to jobs notifications Attachment 346820 [details] pushed as 89ff6a6 - printers: Store PpPrinterEntry instances for individual manipulation Attachment 346822 [details] pushed as fe51a74 - printers: Count only current users job
Review of attachment 346821 [details] [review]: This one too. Thanks.
Attachment 346821 [details] pushed as 5dd8e58 - printers: Free the PpJobsDialog after closing it