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
This commit is contained in:
Bastien Nocera 2014-11-13 19:20:12 +01:00
parent 4fdb9cee21
commit 83ebd3eccb

View file

@ -1070,6 +1070,9 @@ 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);
}
#define LOAD_OR_DEFAULT(val, str, def) val = (load_default ? def : up_config_get_uint (daemon->priv->config, str))