Skip to content

print-notifications: Allow ignoring of events for print jobs

Marek Kašík requested to merge 412-do-not-notify-print-jobs into master

This commit adds DBus interface for ignoring of events related to print jobs. There is DBus method DoNotNotifyJob which takes job id and ignored events as parameters. If a job with the id is processed then the plugin checks whether the current event should be ignored from the notification point of view.

The interface stores the ginored events as flags which values are determined as "1 << value" where value comes from ipp_jstate_t enum. Its values ranges from 3 to 9 so they fit into the 64 bits of the uint64. This allow us to ignore more events at once but this is not used yet.

I did not add the same for printers since we already don't show the notification for removed printer, just for added printer which I think could stay since the addition of printer is asynchronous and can take some time so once the notification is shown the user know that the printer was added.

I'll prepare a branch for gnome-control-center which utilizes the DBus method.

Closes #412

Merge request reports