From 329ed974706f08e269fa22a2ab7274cc1dbfc3a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Thu, 11 Aug 2011 15:52:41 +0100 Subject: Only batteries can be primary devices So only batteries status icons are allowed in the menu title --- src/indicator-power.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/indicator-power.c') 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; -- cgit v1.2.3