diff --git a/js/ui/panel.js b/js/ui/panel.js index aaabad1a9..c6c1abc75 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -809,7 +809,12 @@ const AggregateMenu = new Lang.Class({ this.actor.add_child(this._indicators); this._network = new imports.ui.status.network.NMApplet(); - this._bluetooth = new imports.ui.status.bluetooth.Indicator(); + if (Config.HAVE_BLUETOOTH) { + this._bluetooth = new imports.ui.status.bluetooth.Indicator(); + } else { + this._bluetooth = null; + } + this._power = new imports.ui.status.power.Indicator(); this._rfkill = new imports.ui.status.rfkill.Indicator(); this._volume = new imports.ui.status.volume.Indicator(); @@ -819,7 +824,9 @@ const AggregateMenu = new Lang.Class({ this._indicators.add_child(this._screencast.indicators); this._indicators.add_child(this._network.indicators); - this._indicators.add_child(this._bluetooth.indicators); + if (this._bluetooth) { + this._indicators.add_child(this._bluetooth.indicators); + } this._indicators.add_child(this._rfkill.indicators); this._indicators.add_child(this._volume.indicators); this._indicators.add_child(this._power.indicators); @@ -831,7 +838,9 @@ const AggregateMenu = new Lang.Class({ this.menu.addMenuItem(this._brightness.menu); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); this.menu.addMenuItem(this._network.menu); - this.menu.addMenuItem(this._bluetooth.menu); + if (this._bluetooth) { + this.menu.addMenuItem(this._bluetooth.menu); + } this.menu.addMenuItem(this._rfkill.menu); this.menu.addMenuItem(this._power.menu); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());