[rhythmbox] Support Notification Filtering GNOME feature



commit a22c343ee05929f476b3e2d0279fe8d1a36d6bff
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Jan 31 13:55:28 2013 +0100

    Support Notification Filtering GNOME feature
    
    Report that we emit notifications in the desktop files, add desktop-entry
    for filtering and, most important, add music category so that our notifications
    are shown with actions in the lock screen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692941

 data/rhythmbox.desktop.in.in                  |    1 +
 plugins/notification/rb-notification-plugin.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/data/rhythmbox.desktop.in.in b/data/rhythmbox.desktop.in.in
index 7876159..ffb1091 100644
--- a/data/rhythmbox.desktop.in.in
+++ b/data/rhythmbox.desktop.in.in
@@ -17,3 +17,4 @@ X-GNOME-Bugzilla-Product=rhythmbox
 X-GNOME-Bugzilla-Component=general
 X-GNOME-Bugzilla-OtherBinaries=rhythmbox-client;rhythmbox-metadata;
 X-GNOME-Bugzilla-Version= VERSION@
+X-GNOME-UsesNotifications=true
\ No newline at end of file
diff --git a/plugins/notification/rb-notification-plugin.c b/plugins/notification/rb-notification-plugin.c
index d04514d..8e49046 100644
--- a/plugins/notification/rb-notification-plugin.c
+++ b/plugins/notification/rb-notification-plugin.c
@@ -199,6 +199,11 @@ do_notify (RBNotificationPlugin *plugin,
 					      g_variant_new_string (image_uri));
 	}
 
+        if (playback)
+          notify_notification_set_category (notification, "x-gnome.music");
+        notify_notification_set_hint (notification, "desktop-entry",
+                                      g_variant_new_string ("rhythmbox"));
+
 	notify_notification_clear_actions (notification);
 	if (playback && plugin->notify_supports_actions) {
 		if (plugin->notify_supports_icon_buttons) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]