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 charging = 0;
|
||||||
|
|
||||||
int batnum = 0;
|
int batnum = 0;
|
||||||
int acnum = 0;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(device_ac_adapters, l, ac)
|
EINA_LIST_FOREACH(device_ac_adapters, l, ac)
|
||||||
if (ac->present) acnum++;
|
if (ac->present) have_power++;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(device_batteries, l, bat)
|
EINA_LIST_FOREACH(device_batteries, l, bat)
|
||||||
{
|
{
|
||||||
|
@ -322,7 +321,6 @@ _battery_device_update(void)
|
||||||
continue;
|
continue;
|
||||||
have_battery = 1;
|
have_battery = 1;
|
||||||
batnum++;
|
batnum++;
|
||||||
if (bat->charging == 1) have_power = 1;
|
|
||||||
if (full == -1) full = 0;
|
if (full == -1) full = 0;
|
||||||
if (bat->percent >= 0)
|
if (bat->percent >= 0)
|
||||||
full += bat->percent;
|
full += bat->percent;
|
||||||
|
|
Loading…
Reference in New Issue