aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-01-08 16:38:11 +1300
committerRobert Ancell <robert.ancell@canonical.com>2013-01-08 16:38:11 +1300
commit3cdfd9a3ad6989d42a1cc134f5d2e61e42654676 (patch)
tree41159864f44e2a826c10626c25b4b4ebc0b03c0d
parent54301406603975e44a4ec1f226d8a8b9796354c6 (diff)
downloadayatana-indicator-bluetooth-3cdfd9a3ad6989d42a1cc134f5d2e61e42654676.tar.gz
ayatana-indicator-bluetooth-3cdfd9a3ad6989d42a1cc134f5d2e61e42654676.tar.bz2
ayatana-indicator-bluetooth-3cdfd9a3ad6989d42a1cc134f5d2e61e42654676.zip
Hide items without options
-rw-r--r--src/indicator-bluetooth-service.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/indicator-bluetooth-service.vala b/src/indicator-bluetooth-service.vala
index fb20423..227e5fb 100644
--- a/src/indicator-bluetooth-service.vala
+++ b/src/indicator-bluetooth-service.vala
@@ -216,7 +216,7 @@ public class BluetoothIndicator
visible_item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, enabled);
devices_separator.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, enabled);
foreach (var item in device_items)
- item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, enabled);
+ item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, enabled && item.get_children () != null);
updating_killswitch = false;
}
@@ -312,6 +312,8 @@ private class BluetoothMenuItem : Dbusmenu.Menuitem
child_append (sound_item);
break;
}
+
+ property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, get_children () != null);
}
private void connect_service (string device, bool connect)