use ac presence to indicate battery charging

SVN revision: 75209
This commit is contained in:
Mike Blumenkrantz 2012-08-13 13:14:44 +00:00
parent 9000c5eb47
commit 84126d9ffd
1 changed files with 1 additions and 3 deletions

View File

@ -311,10 +311,9 @@ _battery_device_update(void)
int charging = 0;
int batnum = 0;
int acnum = 0;
EINA_LIST_FOREACH(device_ac_adapters, l, ac)
if (ac->present) acnum++;
if (ac->present) have_power++;
EINA_LIST_FOREACH(device_batteries, l, bat)
{
@ -322,7 +321,6 @@ _battery_device_update(void)
continue;
have_battery = 1;
batnum++;
if (bat->charging == 1) have_power = 1;
if (full == -1) full = 0;
if (bat->percent >= 0)
full += bat->percent;