[gnome-shell] status/network: Remove WireguardItem



commit 714c0eaea568835c02bf324d4f389d962c909747
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Aug 2 11:50:05 2022 +0200

    status/network: Remove WireguardItem
    
    Wireguard connections are now covered by the VPN item.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2406>

 js/ui/status/network.js | 46 ----------------------------------------------
 1 file changed, 46 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 64f44a93ec..5e0c05634d 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1393,49 +1393,6 @@ var NMWirelessDeviceItem = class extends Signals.EventEmitter {
     }
 };
 
-var NMWireguardItem = class extends NMConnectionItem {
-    _buildUI() {
-        this.labelItem = new PopupMenu.PopupMenuItem('');
-        this.labelItem.connect('activate', this._activate.bind(this));
-
-        this.radioItem = new PopupMenu.PopupSwitchMenuItem(this._connection.get_id(), false);
-        this.radioItem.connect('toggled', this._toggle.bind(this));
-    }
-
-    _sync() {
-        let isActive = this.isActive();
-        this.labelItem.label.text = isActive ? _('Turn Off') : this._section.getConnectLabel();
-        this.radioItem.setToggleState(isActive);
-        this.emit('icon-changed');
-    }
-
-    _connectionStateChanged() {
-        const state = this._activeConnection?.get_state();
-        const reason = this._activeConnection?.get_state_reason();
-
-        if (state === NM.ActiveConnectionState.DEACTIVATED &&
-            reason !== NM.ActiveConnectionStateReason.NO_SECRETS &&
-            reason !== NM.ActiveConnectionStateReason.USER_DISCONNECTED)
-            this.emit('activation-failed');
-
-        this.emit('icon-changed');
-        super._connectionStateChanged();
-    }
-
-    getIndicatorIcon() {
-        if (this._activeConnection) {
-            if (this._activeConnection.state === NM.ActiveConnectionState.UNKNOWN)
-                return '';
-            else if (this._activeConnection.state < NM.ActiveConnectionState.ACTIVATED)
-                return 'network-vpn-acquiring-symbolic';
-            else
-                return 'network-vpn-symbolic';
-        } else {
-            return '';
-        }
-    }
-};
-
 var NMVpnConnectionItem = class extends NMConnectionItem {
     _buildUI() {
         this.labelItem = new PopupMenu.PopupMenuItem('');
@@ -1537,9 +1494,6 @@ var NMVpnSection = class extends NMConnectionSection {
     }
 
     _makeConnectionItem(connection) {
-        if (connection.get_connection_type() === 'wireguard')
-            return new NMWireguardItem(this, connection);
-
         return new NMVpnConnectionItem(this, connection);
     }
 


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