[gnome-power-manager] Mark non-urgent notifications as transient
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Mark non-urgent notifications as transient
- Date: Mon, 27 Dec 2010 18:46:35 +0000 (UTC)
commit eb88842bebcceaf502cc9e19c65c2dbda716694f
Author: Richard Hughes <richard hughsie com>
Date: Mon Dec 27 18:47:06 2010 +0000
Mark non-urgent notifications as transient
src/gpm-manager.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 9a241d6..afa7305 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -528,6 +528,13 @@ gpm_manager_notify (GpmManager *manager, NotifyNotification **notification_class
g_signal_connect (notification, "closed", G_CALLBACK (gpm_manager_notification_closed_cb), notification_class);
g_debug ("notification %p: %s : %s", notification, title, message);
+ /* non-urgent notifications are transient */
+ if (urgency != NOTIFY_URGENCY_CRITICAL) {
+ notify_notification_set_hint (notification,
+ "transient",
+ g_variant_new_boolean (TRUE));
+ }
+
/* try to show */
ret = notify_notification_show (notification, &error);
if (!ret) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]