summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-11-14 23:07:25 +0100
committerBastien Nocera <hadess@hadess.net>2014-11-14 23:09:14 +0100
commit2e87407eb91407e64f3d23de07b9dc91735a6a49 (patch)
treea7ffeb9bdc5fc3348052a533896b6296af6e35fe
parent83ebd3eccbff589af0dc6d2f1978338cdfa10833 (diff)
downloadupower-2e87407eb91407e64f3d23de07b9dc91735a6a49.tar.gz
daemon: Use new warning update helper function
Rather than the copy/paste code in commit: b9bd275890387fb35c185f37ec0ea1f2aa857818 This makes sure that the AC status is updated. https://bugs.freedesktop.org/show_bug.cgi?id=86144
-rw-r--r--src/up-daemon.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/up-daemon.c b/src/up-daemon.c
index f1cb5e6..9c97f24 100644
--- a/src/up-daemon.c
+++ b/src/up-daemon.c
@@ -1051,12 +1051,6 @@ up_daemon_device_removed_cb (UpBackend *backend, GObject *native, UpDevice *devi
/* remove from list */
up_device_list_remove (priv->power_devices, G_OBJECT(device));
- /* update our internal state in case a battery was removed; this also
- * ensures that the display device contains up to date information */
- warning_level = up_daemon_get_warning_level_local (daemon);
- if (warning_level != priv->warning_level)
- up_daemon_set_warning_level (daemon, warning_level);
-
/* emit */
object_path = up_device_get_object_path (device);
g_debug ("emitting device-removed: %s", object_path);
@@ -1073,6 +1067,7 @@ up_daemon_device_removed_cb (UpBackend *backend, GObject *native, UpDevice *devi
/* In case a battery was removed */
up_daemon_refresh_battery_devices (daemon);
+ up_daemon_update_warning_level (daemon);
}
#define LOAD_OR_DEFAULT(val, str, def) val = (load_default ? def : up_config_get_uint (daemon->priv->config, str))