After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693751 - [PATCH] Allows to specify notification hints
[PATCH] Allows to specify notification hints
Status: RESOLVED FIXED
Product: zenity
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Zenity Maintainers
Zenity Maintainers
Depends on:
Blocks: 690985
 
 
Reported: 2013-02-14 00:33 UTC by Nuno Araujo (IRC: russo79)
Modified: 2013-02-25 23:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow to specify notification's hints (9.78 KB, patch)
2013-02-14 00:35 UTC, Nuno Araujo (IRC: russo79)
none Details | Review
Allow to specify notification's hints (9.76 KB, patch)
2013-02-14 03:29 UTC, Nuno Araujo (IRC: russo79)
none Details | Review

Description Nuno Araujo (IRC: russo79) 2013-02-14 00:33:48 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
Comment 1 Nuno Araujo (IRC: russo79) 2013-02-14 00:35:25 UTC
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
Comment 2 Nuno Araujo (IRC: russo79) 2013-02-14 03:29:41 UTC
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
Comment 3 Arx Cruz 2013-02-15 00:58:49 UTC
Thanks for the patch. 
I will commit after Feb 20 to avoid string freeze.

Keep sending patches :)
Comment 4 Arx Cruz 2013-02-25 23:13:49 UTC
Commited.
Thanks!