From 3cdfd9a3ad6989d42a1cc134f5d2e61e42654676 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 8 Jan 2013 16:38:11 +1300 Subject: Hide items without options --- src/indicator-bluetooth-service.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3