GNOME Bugzilla – Bug 693751
[PATCH] Allows to specify notification hints
Last modified: 2013-02-25 23:13:49 UTC
The following patch allows a user to add hints to a given notification as described in the Desktop Notifications Specification [1]. A new command line option --hint allows the user to add an hint to the notification to display. This command line option can be used several times to add several hints. --hint option format is name:value User can also specify hints in 'listen-mode' by using the new 'hints' command. Same format that in the command line is used. A user can pass several hints by separating them with '\n'. This patch is mainly useful for achieving the NotificationSource GNOME goal[2]. Application which use zenity and that have a desktop file can now have their notifications filtered by the user in the Notifications GNOME control panel 'pane' (or whatever it is named :)). All the hints are supported excepted the hints passing a raw image data. I know it is getting late for the feature freeze of GNOME 3.8, but it would be rather nice if we can make this pass for this release. Another note, I don't have commit access to GNOME repositories. [1] http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#hints [2] https://live.gnome.org/GnomeGoals/NotificationSource
Created attachment 235970 [details] [review] Allow to specify notification's hints Desktop Notifications Specification [1] specifies that hints can be used to provide extra data to a notification server. Add a new command line option --hint that allows add a hint to a notification. This option can be used multiple times. The format for the hint parameter is name:value. Also allows to specify hints in 'listen' mode. A new command hints is used for that. The format for a given hint is the same that for the command line option. Several hints can be passed by separating them by '\n'. Hints of value type '(iiibiiay)' are not supported. This value type is used to pass a raw data image as a hint value. This new change is useful for implementing the NotificationSource[2] GNOME Goal. A application using zenity and having a desktop file, can now specify that it is a notification emitter and it's notifications can be filtered in the new Notifications GNOME control panel pane. [1] http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#hints [2] https://live.gnome.org/GnomeGoals/NotificationSource
Created attachment 235981 [details] [review] Allow to specify notification's hints Desktop Notifications Specification [1] specifies that hints can be used to provide extra data to a notification server. A new command line option --hint allows to add a hint to the notification to display. This option can be used multiple times, one for each hint to add. --hint option format is name:value. The new 'hints' command allow to specify hints in 'listen' mode. Same format that in the command line option is used. Several hints can be passed by separating them by '\n'. Hints of value type '(iiibiiay)' are not supported. This value type is used to pass a raw data image as a hint value. This new change is useful for implementing the NotificationSource [2] GNOME Goal. A application using zenity and having a desktop file, can now specify that it is a notification emitter and it's notifications can be filtered in the new Notifications GNOME control panel pane. [1] http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#hints [2] https://live.gnome.org/GnomeGoals/NotificationSource
Thanks for the patch. I will commit after Feb 20 to avoid string freeze. Keep sending patches :)
Commited. Thanks!