From 701c894ca6323b82a124ca446f7902a73746d41c Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 13 Nov 2014 19:20:12 +0100 Subject: [PATCH] daemon: Update display device when battery is removed When removing a battery, make sure to go through the batteries, and update the display device status. https://bugs.freedesktop.org/show_bug.cgi?id=86144 --- src/up-daemon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/up-daemon.c b/src/up-daemon.c index 6dfe990..365a770 100644 --- a/src/up-daemon.c +++ b/src/up-daemon.c @@ -1062,6 +1062,10 @@ up_daemon_device_removed_cb (UpBackend *backend, GObject *native, UpDevice *devi /* finalise the object */ g_object_unref (device); + + /* 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)) -- 2.1.0