forked from enlightenment/enlightenment
use ac presence to indicate battery charging
SVN revision: 75209
This commit is contained in:
parent
9000c5eb47
commit
84126d9ffd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue