From 0189c72f5650e4d3ff605bd359e99b2ad1d06a3f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 26 Oct 2012 18:04:43 +0200 Subject: fix logic error when deciding which primary device to select. --- src/indicator-power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/indicator-power.c b/src/indicator-power.c index 852ccd5..8da9734 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -399,11 +399,11 @@ device_compare_func (gconstpointer ga, gconstpointer gb) state = UP_DEVICE_STATE_CHARGING; if (!ret && (((a_state == state) && a_time) || ((b_state == state) && b_time))) { - if (b_state != state) /* a is charging */ + if (a_state != state) /* b is charging */ { ret = 1; } - if (a_state != state) /* b is charging */ + else if (b_state != state) /* b is charging */ { ret = -1; } -- cgit v1.2.3