From 73f4bb13d0d1f0f4b9c447bd7f5d402a43c03f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 1 Aug 2022 15:13:06 +0200 Subject: [PATCH] status/network: Give bluetooth its own category MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the quick settings future, each device type will use a separate toggle. We still have a long way to go, but start with giving bluetooth its own section/category. Baby steps … Part-of: --- js/ui/status/network.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 5e0c05634..8b08dd56b 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -24,6 +24,7 @@ const NMConnectionCategory = { INVALID: 'invalid', WIRED: 'wired', WIRELESS: 'wireless', + BLUETOOTH: 'bluetooth', WWAN: 'wwan', VPN: 'vpn', }; @@ -564,7 +565,7 @@ var NMBluetoothDeviceItem = class extends NMDeviceItem { } get category() { - return NMConnectionCategory.WWAN; + return NMConnectionCategory.BLUETOOTH; } _getDescription() { @@ -1544,6 +1545,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection { case NMConnectionCategory.WIRED: return 'network-wired-symbolic'; case NMConnectionCategory.WIRELESS: + case NMConnectionCategory.BLUETOOTH: case NMConnectionCategory.WWAN: return 'network-wireless-symbolic'; } @@ -1560,6 +1562,11 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection { return ngettext("%s Wi-Fi Connection", "%s Wi-Fi Connections", nDevices).format(nDevices); + case NMConnectionCategory.BLUETOOTH: + return ngettext( + '%s Bluetooth Connection', + '%s Bluetooth Connections', + nDevices).format(nDevices); case NMConnectionCategory.WWAN: return ngettext("%s Modem Connection", "%s Modem Connections", @@ -1588,7 +1595,7 @@ class Indicator extends PanelMenu.SystemIndicator { this._ctypes = { }; this._ctypes[NM.SETTING_WIRED_SETTING_NAME] = NMConnectionCategory.WIRED; this._ctypes[NM.SETTING_WIRELESS_SETTING_NAME] = NMConnectionCategory.WIRELESS; - this._ctypes[NM.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.WWAN; + this._ctypes[NM.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.BLUETOOTH; this._ctypes[NM.SETTING_CDMA_SETTING_NAME] = NMConnectionCategory.WWAN; this._ctypes[NM.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN; this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN; @@ -1614,6 +1621,7 @@ class Indicator extends PanelMenu.SystemIndicator { const categories = [ NMConnectionCategory.WIRED, NMConnectionCategory.WIRELESS, + NMConnectionCategory.BLUETOOTH, NMConnectionCategory.WWAN, ]; for (let category of categories) {