[gnome-shell] status/remoteAccess: Move to quick settings



commit 0f1f5bb174068949a59709cfb443eafc7bfe266f
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 27 12:54:24 2022 +0200

    status/remoteAccess: Move to quick settings
    
    And there goes the last icon-only indicator. From now on, some
    actual work will be involved 😱️
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>

 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 c32393cff9..e487f4518e 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 08436d7d11..43435ba485 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();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]