[gnome-settings-daemon] updates: Support notification filtering
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] updates: Support notification filtering
- Date: Wed, 2 Jan 2013 08:59:53 +0000 (UTC)
commit aa4bb7c4a24c46b0d8c6779df5a6ff952e8fa8bd
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 2 00:42:21 2013 -0500
updates: Support notification filtering
Set the desktop-entry hint on all notifications related to
software updates to 'gpk-update-viewer', to give gnome-shell
a chance to apply notification filtering.
https://bugzilla.gnome.org/show_bug.cgi?id=690986
Signed-off-by: Richard Hughes <richard hughsie com>
plugins/updates/gsd-updates-firmware.c | 4 ++++
plugins/updates/gsd-updates-manager.c | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/updates/gsd-updates-firmware.c b/plugins/updates/gsd-updates-firmware.c
index dc972a5..4809710 100644
--- a/plugins/updates/gsd-updates-firmware.c
+++ b/plugins/updates/gsd-updates-firmware.c
@@ -251,6 +251,7 @@ require_restart (GsdUpdatesFirmware *firmware)
/* TRANSLATORS: title of libnotify bubble */
notification = notify_notification_new (_("Additional software was installed"), message, NULL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
@@ -278,6 +279,7 @@ require_replug (GsdUpdatesFirmware *firmware)
/* TRANSLATORS: title of libnotify bubble */
notification = notify_notification_new (_("Additional software was installed"), message, NULL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
@@ -305,6 +307,7 @@ require_nothing (GsdUpdatesFirmware *firmware)
/* TRANSLATORS: title of libnotify bubble */
notification = notify_notification_new (_("Additional software was installed"), message, NULL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
@@ -596,6 +599,7 @@ delay_timeout_cb (gpointer data)
/* TRANSLATORS: title of libnotify bubble */
notification = notify_notification_new (_("Additional firmware required"), string->str, NULL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index faf90aa..d728c71 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -339,6 +339,7 @@ get_distro_upgrades_finished_cb (GObject *object,
notification = notify_notification_new (title,
string->str,
GSD_UPDATES_ICON_NORMAL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
@@ -466,6 +467,7 @@ notify_critical_updates (GsdUpdatesManager *manager, GPtrArray *array)
notification = notify_notification_new (title,
message,
GSD_UPDATES_ICON_URGENT);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);
@@ -527,6 +529,7 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array)
notification = notify_notification_new (title,
message,
GSD_UPDATES_ICON_NORMAL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
@@ -580,6 +583,7 @@ notify_failed_get_updates_maybe (GsdUpdatesManager *manager)
notification = notify_notification_new (title,
message,
GSD_UPDATES_ICON_NORMAL);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, 120*1000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
@@ -1212,6 +1216,7 @@ check_offline_update_cb (gpointer user_data)
notification = notify_notification_new (title,
message,
GSD_UPDATES_ICON_URGENT);
+ notify_notification_set_hint_string (n, "desktop-entry", "gpk-update-viewer");
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, -1);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]