panel: fix crash when bluetooth is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=707430
This commit is contained in:
parent
081f51b9eb
commit
db07aa42ea
@ -809,7 +809,12 @@ const AggregateMenu = new Lang.Class({
|
|||||||
this.actor.add_child(this._indicators);
|
this.actor.add_child(this._indicators);
|
||||||
|
|
||||||
this._network = new imports.ui.status.network.NMApplet();
|
this._network = new imports.ui.status.network.NMApplet();
|
||||||
|
if (Config.HAVE_BLUETOOTH) {
|
||||||
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
|
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
|
||||||
|
} else {
|
||||||
|
this._bluetooth = null;
|
||||||
|
}
|
||||||
|
|
||||||
this._power = new imports.ui.status.power.Indicator();
|
this._power = new imports.ui.status.power.Indicator();
|
||||||
this._rfkill = new imports.ui.status.rfkill.Indicator();
|
this._rfkill = new imports.ui.status.rfkill.Indicator();
|
||||||
this._volume = new imports.ui.status.volume.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._screencast.indicators);
|
||||||
this._indicators.add_child(this._network.indicators);
|
this._indicators.add_child(this._network.indicators);
|
||||||
|
if (this._bluetooth) {
|
||||||
this._indicators.add_child(this._bluetooth.indicators);
|
this._indicators.add_child(this._bluetooth.indicators);
|
||||||
|
}
|
||||||
this._indicators.add_child(this._rfkill.indicators);
|
this._indicators.add_child(this._rfkill.indicators);
|
||||||
this._indicators.add_child(this._volume.indicators);
|
this._indicators.add_child(this._volume.indicators);
|
||||||
this._indicators.add_child(this._power.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(this._brightness.menu);
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.menu.addMenuItem(this._network.menu);
|
this.menu.addMenuItem(this._network.menu);
|
||||||
|
if (this._bluetooth) {
|
||||||
this.menu.addMenuItem(this._bluetooth.menu);
|
this.menu.addMenuItem(this._bluetooth.menu);
|
||||||
|
}
|
||||||
this.menu.addMenuItem(this._rfkill.menu);
|
this.menu.addMenuItem(this._rfkill.menu);
|
||||||
this.menu.addMenuItem(this._power.menu);
|
this.menu.addMenuItem(this._power.menu);
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
Loading…
Reference in New Issue
Block a user