status/bluetooth: Port to quick settings
For now, this is another simple toggle. The icon, state and visibility reflect what the old menu did, and the top bar icon is still only shown when devices are currently connected. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
This commit is contained in:

committed by
Marge Bot

parent
49eaa29f22
commit
2ebdb6e318
@ -378,11 +378,6 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
else
|
||||
this._network = null;
|
||||
|
||||
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._powerProfiles = new imports.ui.status.powerProfiles.Indicator();
|
||||
this._volume = new imports.ui.status.volume.Indicator();
|
||||
@ -391,8 +386,6 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
|
||||
if (this._network)
|
||||
this._indicators.add_child(this._network);
|
||||
if (this._bluetooth)
|
||||
this._indicators.add_child(this._bluetooth);
|
||||
this._indicators.add_child(this._volume);
|
||||
this._indicators.add_child(this._power);
|
||||
this._indicators.add_child(this._powerProfiles);
|
||||
@ -403,9 +396,6 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
if (this._network)
|
||||
this.menu.addMenuItem(this._network.menu);
|
||||
|
||||
if (this._bluetooth)
|
||||
this.menu.addMenuItem(this._bluetooth.menu);
|
||||
|
||||
this.menu.addMenuItem(this._power.menu);
|
||||
this.menu.addMenuItem(this._powerProfiles.menu);
|
||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
@ -429,6 +419,11 @@ class QuickSettings extends PanelMenu.Button {
|
||||
|
||||
this.setMenu(new QuickSettingsMenu(this, N_QUICK_SETTINGS_COLUMNS));
|
||||
|
||||
if (Config.HAVE_BLUETOOTH)
|
||||
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
|
||||
else
|
||||
this._bluetooth = null;
|
||||
|
||||
this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
|
||||
this._location = new imports.ui.status.location.Indicator();
|
||||
this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
|
||||
@ -440,12 +435,16 @@ class QuickSettings extends PanelMenu.Button {
|
||||
this._indicators.add_child(this._thunderbolt);
|
||||
this._indicators.add_child(this._location);
|
||||
this._indicators.add_child(this._nightLight);
|
||||
if (this._bluetooth)
|
||||
this._indicators.add_child(this._bluetooth);
|
||||
this._indicators.add_child(this._rfkill);
|
||||
this._indicators.add_child(this._unsafeMode);
|
||||
|
||||
this._addItems(this._remoteAccess.quickSettingsItems);
|
||||
this._addItems(this._thunderbolt.quickSettingsItems);
|
||||
this._addItems(this._location.quickSettingsItems);
|
||||
if (this._bluetooth)
|
||||
this._addItems(this._bluetooth.quickSettingsItems);
|
||||
this._addItems(this._nightLight.quickSettingsItems);
|
||||
this._addItems(this._rfkill.quickSettingsItems);
|
||||
this._addItems(this._unsafeMode.quickSettingsItems);
|
||||
|
Reference in New Issue
Block a user