From 8b03674c7f622f790e65cea59343c31865451c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 15 Jul 2011 11:43:00 +0200 Subject: Always select a device, doesnt matter Its charging/discharging or not Fixes https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/810872 --- src/indicator-power.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/indicator-power.c b/src/indicator-power.c index a81b791..8180d38 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -498,9 +498,6 @@ get_primary_device (GVariant *devices) g_debug ("%s: got data from object %s", G_STRFUNC, object_path); - if (primary_device == NULL && kind == UP_DEVICE_KIND_BATTERY) - primary_device = device; - if (state == UP_DEVICE_STATE_DISCHARGING) { discharging = TRUE; @@ -519,6 +516,10 @@ get_primary_device (GVariant *devices) primary_device_charging = device; } } + else + { + primary_device = device; + } } if (discharging) -- cgit v1.2.3