aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-bluetooth.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/indicator-bluetooth.vala')
-rw-r--r--src/indicator-bluetooth.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/indicator-bluetooth.vala b/src/indicator-bluetooth.vala
index 4f3aef8..bfbbc9f 100644
--- a/src/indicator-bluetooth.vala
+++ b/src/indicator-bluetooth.vala
@@ -26,6 +26,9 @@ public class BluetoothIndicator : Indicator.Object
var menu_client = menu.get_client ();
menu_client.add_type_handler_full ("x-canonical-switch", new_switch_cb);
+
+ /* Hide until ready */
+ set_visible (false);
}
private bool new_switch_cb (Dbusmenu.Menuitem newitem, Dbusmenu.Menuitem parent, Dbusmenu.Client client)
@@ -80,6 +83,7 @@ public class BluetoothIndicator : Indicator.Object
private void server_properties_changed_cb ()
{
+ set_visible (proxy.visible);
Indicator.image_helper_update (image, proxy.icon_name);
accessible_description = proxy.accessible_description;
}
@@ -122,6 +126,7 @@ public class Switch : Ido.SwitchMenuItem
[DBus (name = "com.canonical.indicator.bluetooth.service")]
public interface BluetoothService : DBusProxy
{
+ public abstract bool visible { owned get; }
public abstract string icon_name { owned get; }
public abstract string accessible_description { owned get; }
}