diff options
author | Javier Jardón <javier.jardon@codethink.co.uk> | 2011-07-15 11:43:00 +0200 |
---|---|---|
committer | Javier Jardón <javier.jardon@codethink.co.uk> | 2011-07-15 11:43:00 +0200 |
commit | 8b03674c7f622f790e65cea59343c31865451c43 (patch) | |
tree | 4e681a555d03ee8d6d9b874152ea7952e9e463ea /src | |
parent | 9a7ee8cdc1b7cd4a067a93eed60c7531987cbb2d (diff) | |
download | ayatana-indicator-power-8b03674c7f622f790e65cea59343c31865451c43.tar.gz ayatana-indicator-power-8b03674c7f622f790e65cea59343c31865451c43.tar.bz2 ayatana-indicator-power-8b03674c7f622f790e65cea59343c31865451c43.zip |
Always select a device, doesnt matter Its charging/discharging or not
Fixes https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/810872
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-power.c | 7 |
1 files 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) |