diff options
author | Javier Jardón <javier.jardon@codethink.co.uk> | 2011-08-11 15:52:41 +0100 |
---|---|---|
committer | Javier Jardón <javier.jardon@codethink.co.uk> | 2011-08-11 15:52:41 +0100 |
commit | 329ed974706f08e269fa22a2ab7274cc1dbfc3a8 (patch) | |
tree | a70747179034890d36cc57328324ac94b5a64d15 /src | |
parent | 68ee93bbc115c0bad5d9ed907f729d9bc0f4d1bc (diff) | |
download | ayatana-indicator-power-329ed974706f08e269fa22a2ab7274cc1dbfc3a8.tar.gz ayatana-indicator-power-329ed974706f08e269fa22a2ab7274cc1dbfc3a8.tar.bz2 ayatana-indicator-power-329ed974706f08e269fa22a2ab7274cc1dbfc3a8.zip |
Only batteries can be primary devices
So only batteries status icons are allowed in the menu title
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-power.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index 42542cb..bfb625b 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -502,6 +502,10 @@ get_primary_device (GVariant *devices) g_debug ("%s: got data from object %s", G_STRFUNC, object_path); + /* not battery */ + if (kind != UP_DEVICE_KIND_BATTERY) + continue; + if (state == UP_DEVICE_STATE_DISCHARGING) { discharging = TRUE; |