From 02bbc830fb3323156f845b97b71d2fb2b636fdb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 2 Aug 2022 22:11:52 +0200 Subject: [PATCH] status/network: Rename device menu items NMDeviceWireless sounds an awful lot like NM.DeviceWifi. Rename all device menu items to make it clear that they are indeed menu items, not the device they represent. Part-of: --- js/ui/status/network.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/js/ui/status/network.js b/js/ui/status/network.js index be6ecd122..57eac8f23 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -312,11 +312,11 @@ var NMConnectionSection = class NMConnectionSection extends Signals.EventEmitter } }; -var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection { +var NMDeviceItem = class NMDeviceItem extends NMConnectionSection { constructor(client, device) { super(client); - if (this.constructor === NMConnectionDevice) + if (this.constructor === NMDeviceItem) throw new TypeError(`Cannot instantiate abstract type ${this.constructor.name}`); this._device = device; @@ -471,7 +471,7 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection { } }; -var NMDeviceWired = class extends NMConnectionDevice { +var NMWiredDeviceItem = class extends NMDeviceItem { constructor(client, device) { super(client, device); @@ -514,7 +514,7 @@ var NMDeviceWired = class extends NMConnectionDevice { } }; -var NMDeviceModem = class extends NMConnectionDevice { +var NMModemDeviceItem = class extends NMDeviceItem { constructor(client, device) { super(client, device); @@ -613,7 +613,7 @@ var NMDeviceModem = class extends NMConnectionDevice { } }; -var NMDeviceBluetooth = class extends NMConnectionDevice { +var NMBluetoothDeviceItem = class extends NMDeviceItem { constructor(client, device) { super(client, device); @@ -1272,7 +1272,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog { } }); -var NMDeviceWireless = class extends Signals.EventEmitter { +var NMWirelessDeviceItem = class extends Signals.EventEmitter { constructor(client, device) { super(); @@ -1754,10 +1754,10 @@ class Indicator extends PanelMenu.SystemIndicator { // Device types this._dtypes = { }; - this._dtypes[NM.DeviceType.ETHERNET] = NMDeviceWired; - this._dtypes[NM.DeviceType.WIFI] = NMDeviceWireless; - this._dtypes[NM.DeviceType.MODEM] = NMDeviceModem; - this._dtypes[NM.DeviceType.BT] = NMDeviceBluetooth; + this._dtypes[NM.DeviceType.ETHERNET] = NMWiredDeviceItem; + this._dtypes[NM.DeviceType.WIFI] = NMWirelessDeviceItem; + this._dtypes[NM.DeviceType.MODEM] = NMModemDeviceItem; + this._dtypes[NM.DeviceType.BT] = NMBluetoothDeviceItem; // Connection types this._ctypes = { };