[gnome-packagekit] Support notification filtering



commit 1fd63fe8ef50de0c5482c505595318ffaa08f8ef
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 2 00:34:16 2013 -0500

    Support notification filtering
    
    Add X-GNOME-UsesNotifications keys to the desktop files, so that
    gpk-application and gpk-update-viewer show up in the notification
    panel.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690983
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 data/gpk-application.desktop.in   |    2 +-
 data/gpk-update-viewer.desktop.in |    1 +
 src/gpk-dbus-task.c               |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/data/gpk-application.desktop.in b/data/gpk-application.desktop.in
index ebc6230..73ea8e7 100644
--- a/data/gpk-application.desktop.in
+++ b/data/gpk-application.desktop.in
@@ -9,4 +9,4 @@ Categories=GNOME;GTK;System;
 _Keywords=Updates;Upgrade;Sources;Repositories;Preferences;Install;Store;
 NotShowIn=KDE;
 StartupNotify=true
-
+X-GNOME-UsesNotifications=true
diff --git a/data/gpk-update-viewer.desktop.in b/data/gpk-update-viewer.desktop.in
index ddb2f29..0b2b991 100644
--- a/data/gpk-update-viewer.desktop.in
+++ b/data/gpk-update-viewer.desktop.in
@@ -9,3 +9,4 @@ Categories=GNOME;GTK;System;
 NotShowIn=KDE;
 StartupNotify=true
 NoDisplay=true
+X-GNOME-UsesNotifications=true
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 065c213..44348ae 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -377,6 +377,7 @@ gpk_dbus_task_handle_error (GpkDbusTask *dtask, PkError *error_code)
 
 	/* do the bubble */
 	notification = notify_notification_new (title, message, NULL);
+	notify_notification_set_hint_string (notification, "desktop-entry", "gpk-application");
 	notify_notification_set_timeout (notification, 15000);
 	notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
 	notify_notification_add_action (notification, "show-error-details",



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