[gnome-power-manager] The composite battery is only fully charged if all batteries are fully charged



commit 13ddc83b6aa890fd88b25dfe537fe7b72a9bddc9
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jul 14 09:59:21 2009 +0100

    The composite battery is only fully charged if all batteries are fully charged

 src/gpm-engine.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gpm-engine.c b/src/gpm-engine.c
index 29874c3..adc3d6e 100644
--- a/src/gpm-engine.c
+++ b/src/gpm-engine.c
@@ -560,7 +560,7 @@ gpm_engine_update_composite_device (GpmEngine *engine, DkpDevice *original_devic
 	guint battery_devices = 0;
 	gboolean is_charging = FALSE;
 	gboolean is_discharging = FALSE;
-	gboolean is_fully_charged = FALSE;
+	gboolean is_fully_charged = TRUE;
 	GPtrArray *array;
 	DkpDevice *device;
 	DkpDeviceState state;
@@ -594,8 +594,8 @@ gpm_engine_update_composite_device (GpmEngine *engine, DkpDevice *original_devic
 			is_charging = TRUE;
 		if (state == DKP_DEVICE_STATE_DISCHARGING)
 			is_discharging = TRUE;
-		if (state == DKP_DEVICE_STATE_FULLY_CHARGED)
-			is_fully_charged = TRUE;
+		if (state != DKP_DEVICE_STATE_FULLY_CHARGED)
+			is_fully_charged = FALSE;
 
 		/* sum up composite */
 		energy_total += energy;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]