summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-10-18 13:32:50 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-10-18 13:32:50 +0900
commit929037aaa0dc65d27e2f3881c1b15efe8969dcf5 (patch)
treed2757016dad83602f87eb9ab8e634c55f8a09a8f /src/modules
parentf20765df671af517ab1f4638fda48dc872072fe9 (diff)
battery modules - actually set ac power flag based on ac presence
this should fix T3649 @fix
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/battery/e_mod_main.c8
-rw-r--r--src/modules/sysinfo/batman/batman.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c
index ccc3824..24af2d8 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -289,7 +289,13 @@ _battery_device_update(void)
289 int acnum = 0; 289 int acnum = 0;
290 290
291 EINA_LIST_FOREACH(device_ac_adapters, l, ac) 291 EINA_LIST_FOREACH(device_ac_adapters, l, ac)
292 if (ac->present) acnum++; 292 {
293 if (ac->present)
294 {
295 acnum++;
296 have_power = 1;
297 }
298 }
293 299
294 EINA_LIST_FOREACH(device_batteries, l, bat) 300 EINA_LIST_FOREACH(device_batteries, l, bat)
295 { 301 {
diff --git a/src/modules/sysinfo/batman/batman.c b/src/modules/sysinfo/batman/batman.c
index e231142..cf9ddfa 100644
--- a/src/modules/sysinfo/batman/batman.c
+++ b/src/modules/sysinfo/batman/batman.c
@@ -314,7 +314,13 @@ _batman_device_update(Instance *inst)
314 int acnum = 0; 314 int acnum = 0;
315 315
316 EINA_LIST_FOREACH(batman_device_ac_adapters, l, ac) 316 EINA_LIST_FOREACH(batman_device_ac_adapters, l, ac)
317 if (ac->present) acnum++; 317 {
318 if (ac->present)
319 {
320 acnum++;
321 have_power = 1;
322 }
323 }
318 324
319 EINA_LIST_FOREACH(batman_device_batteries, l, bat) 325 EINA_LIST_FOREACH(batman_device_batteries, l, bat)
320 { 326 {