From 0f1f5bb174068949a59709cfb443eafc7bfe266f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 27 Jul 2022 12:54:24 +0200 Subject: [PATCH] status/remoteAccess: Move to quick settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And there goes the last icon-only indicator. From now on, some actual work will be involved 😱️ Part-of: --- js/ui/panel.js | 6 +++--- js/ui/status/remoteAccess.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index c32393cff..e487f4518 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -383,7 +383,6 @@ class AggregateMenu extends PanelMenu.Button { else this._bluetooth = null; - this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet(); this._power = new imports.ui.status.power.Indicator(); this._powerProfiles = new imports.ui.status.powerProfiles.Indicator(); this._rfkill = new imports.ui.status.rfkill.Indicator(); @@ -392,7 +391,6 @@ class AggregateMenu extends PanelMenu.Button { this._system = new imports.ui.status.system.Indicator(); this._nightLight = new imports.ui.status.nightLight.Indicator(); - this._indicators.add_child(this._remoteAccess); this._indicators.add_child(this._nightLight); if (this._network) this._indicators.add_child(this._network); @@ -412,7 +410,6 @@ class AggregateMenu extends PanelMenu.Button { if (this._bluetooth) this.menu.addMenuItem(this._bluetooth.menu); - this.menu.addMenuItem(this._remoteAccess.menu); this.menu.addMenuItem(this._rfkill.menu); this.menu.addMenuItem(this._power.menu); this.menu.addMenuItem(this._powerProfiles.menu); @@ -439,14 +436,17 @@ class QuickSettings extends PanelMenu.Button { this.setMenu(new QuickSettingsMenu(this, N_QUICK_SETTINGS_COLUMNS)); + this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet(); this._location = new imports.ui.status.location.Indicator(); this._thunderbolt = new imports.ui.status.thunderbolt.Indicator(); this._unsafeMode = new UnsafeModeIndicator(); + this._indicators.add_child(this._remoteAccess); this._indicators.add_child(this._thunderbolt); this._indicators.add_child(this._location); this._indicators.add_child(this._unsafeMode); + this._addItems(this._remoteAccess.quickSettingsItems); this._addItems(this._thunderbolt.quickSettingsItems); this._addItems(this._location.quickSettingsItems); this._addItems(this._unsafeMode.quickSettingsItems); diff --git a/js/ui/status/remoteAccess.js b/js/ui/status/remoteAccess.js index 08436d7d1..43435ba48 100644 --- a/js/ui/status/remoteAccess.js +++ b/js/ui/status/remoteAccess.js @@ -5,12 +5,13 @@ const { Atk, Clutter, GLib, GObject, Meta, St } = imports.gi; const Main = imports.ui.main; const PanelMenu = imports.ui.panelMenu; +const {SystemIndicator} = imports.ui.quickSettings; // Minimum amount of time the shared indicator is visible (in micro seconds) const MIN_SHARED_INDICATOR_VISIBLE_TIME_US = 5 * GLib.TIME_SPAN_SECOND; var RemoteAccessApplet = GObject.registerClass( -class RemoteAccessApplet extends PanelMenu.SystemIndicator { +class RemoteAccessApplet extends SystemIndicator { _init() { super._init();