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 From 7d558ffe8277e88dab2c4367b496fbf98a257cc1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 29 Oct 2012 11:59:09 +0100 Subject: copyediting: fix comment text --- src/indicator-power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/indicator-power.c b/src/indicator-power.c index 8da9734..4118dcc 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -403,7 +403,7 @@ device_compare_func (gconstpointer ga, gconstpointer gb) { ret = 1; } - else if (b_state != state) /* b is charging */ + else if (b_state != state) /* a is charging */ { ret = -1; } -- cgit v1.2.3