[gnome-settings-daemon] power: Close existing notifications on resume as the power state is likely different
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Close existing notifications on resume as the power state is likely different
- Date: Wed, 13 Jul 2011 10:43:36 +0000 (UTC)
commit 7b0dfd224970cb24108d6885f7226834b5bf5aba
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 5 09:53:00 2011 +0100
power: Close existing notifications on resume as the power state is likely different
plugins/power/gsd-power-manager.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 6f25b8b..fa0fdb2 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2065,6 +2065,11 @@ upower_notify_resume_cb (UpClient *client,
gboolean ret;
GError *error = NULL;
+ /* close existing notifications on resume, the system power
+ * state is probably different now */
+ notify_close_if_showing (manager->priv->notification_low);
+ notify_close_if_showing (manager->priv->notification_discharging);
+
/* ensure we turn the panel back on after resume */
ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
GNOME_RR_DPMS_ON,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]