[gnome-settings-daemon] power: Close low-battery notification when plugged in
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Close low-battery notification when plugged in
- Date: Wed, 5 Oct 2011 12:22:04 +0000 (UTC)
commit 4f40b988bf3189b3b3c55325f6813bf628595141
Author: Florian MÃllner <fmuellner gnome org>
Date: Wed Oct 5 02:41:34 2011 +0200
power: Close low-battery notification when plugged in
The notification is not very useful while charging, especially as
notifications are now persistent.
https://bugzilla.gnome.org/show_bug.cgi?id=660942
plugins/power/gsd-power-manager.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index d0fe7c2..e98c3b4 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2147,11 +2147,13 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
{
gboolean tmp;
- /* if we are playing a critical charge sound loop on AC, stop it */
- if (!up_client_get_on_battery (client) &&
- manager->priv->critical_alert_timeout_id > 0) {
- g_debug ("stopping alert loop due to ac being present");
- play_loop_stop (manager);
+ if (!up_client_get_on_battery (client)) {
+ /* if we are playing a critical charge sound loop on AC, stop it */
+ if (manager->priv->critical_alert_timeout_id > 0) {
+ g_debug ("stopping alert loop due to ac being present");
+ play_loop_stop (manager);
+ }
+ notify_close_if_showing (manager->priv->notification_low);
}
/* same state */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]