From 19a2d9cbb7901d6fc3cb2dc3050cbb30a46ccd38 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 19 May 2010 00:01:07 +0000 Subject: [PATCH] workaround for unknown battery states SVN revision: 48990 --- src/modules/battery/e_mod_udev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/battery/e_mod_udev.c b/src/modules/battery/e_mod_udev.c index 73e8dc7..1f3dbd3 100644 --- a/src/modules/battery/e_mod_udev.c +++ b/src/modules/battery/e_mod_udev.c @@ -257,9 +257,9 @@ _battery_udev_battery_update(const char *syspath, Battery *bat) if (test) { if (!strcmp(test, "Charging")) - { + bat->charging = 1; + else if ((!strcmp(test, "Unknown")) && (bat->charge_rate >= 0)) bat->charging = 1; - } else bat->charging = 0; eina_stringshare_del(test); -- 2.7.4