[gnome-settings-daemon/gnome-3-2] 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/gnome-3-2] power: Close low-battery notification when plugged in
- Date: Wed, 5 Oct 2011 12:28:04 +0000 (UTC)
commit f3d2081d8340f80a20db1658d63d79e74bd74f6d
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
Conflicts:
plugins/power/gsd-power-manager.c
plugins/power/gsd-power-manager.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index ae7cfb3..2d711e5 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2173,14 +2173,16 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
{
gboolean tmp;
+ if (!up_client_get_on_battery (client)) {
#ifdef HAVE_LIBCANBERRA
- /* 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 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);
+ }
#endif /* HAVE_LIBCANBERRA */
+ notify_close_if_showing (manager->priv->notification_low);
+ }
/* same state */
tmp = up_client_get_lid_is_closed (manager->priv->up_client);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]