|
|
0999a2 |
From 7e94d682985ac4ff422da73b5878f4f005eff67b Mon Sep 17 00:00:00 2001
|
|
|
0999a2 |
From: Mohammed Sadiq <sadiq@sadiqpk.org>
|
|
|
0999a2 |
Date: Tue, 10 Aug 2021 15:22:30 +0530
|
|
|
0999a2 |
Subject: [PATCH] status/network: Use wwan settings panel for GSM/LTE Modems
|
|
|
0999a2 |
|
|
|
0999a2 |
GSM/UMTS/LTE modems now have better support with wwan panel in GNOME
|
|
|
0999a2 |
Settings. So, if the modem supports, open wwan panel, otherwise
|
|
|
0999a2 |
fallback to opening network panel when "Mobile Broadband Settings"
|
|
|
0999a2 |
item is clicked.
|
|
|
0999a2 |
|
|
|
0999a2 |
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/583
|
|
|
0999a2 |
|
|
|
0999a2 |
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1942>
|
|
|
0999a2 |
---
|
|
|
0999a2 |
js/ui/status/network.js | 19 +++++++++++++++++--
|
|
|
0999a2 |
1 file changed, 17 insertions(+), 2 deletions(-)
|
|
|
0999a2 |
|
|
|
0999a2 |
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
|
|
0999a2 |
index f510f90ae..fe82fcb08 100644
|
|
|
0999a2 |
--- a/js/ui/status/network.js
|
|
|
0999a2 |
+++ b/js/ui/status/network.js
|
|
|
0999a2 |
@@ -543,7 +543,11 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
|
|
0999a2 |
constructor(client, device) {
|
|
|
0999a2 |
super(client, device);
|
|
|
0999a2 |
|
|
|
0999a2 |
- this.item.menu.addSettingsAction(_("Mobile Broadband Settings"), 'gnome-network-panel.desktop');
|
|
|
0999a2 |
+ const settingsPanel = this._useWwanPanel()
|
|
|
0999a2 |
+ ? 'gnome-wwan-panel.desktop'
|
|
|
0999a2 |
+ : 'gnome-network-panel.desktop';
|
|
|
0999a2 |
+
|
|
|
0999a2 |
+ this.item.menu.addSettingsAction(_('Mobile Broadband Settings'), settingsPanel);
|
|
|
0999a2 |
|
|
|
0999a2 |
this._mobileDevice = null;
|
|
|
0999a2 |
|
|
|
0999a2 |
@@ -573,8 +577,19 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
|
|
0999a2 |
return NMConnectionCategory.WWAN;
|
|
|
0999a2 |
}
|
|
|
0999a2 |
|
|
|
0999a2 |
+ _useWwanPanel() {
|
|
|
0999a2 |
+ // Currently, wwan panel doesn't support CDMA_EVDO modems
|
|
|
0999a2 |
+ const supportedCaps =
|
|
|
0999a2 |
+ NM.DeviceModemCapabilities.GSM_UMTS |
|
|
|
0999a2 |
+ NM.DeviceModemCapabilities.LTE;
|
|
|
0999a2 |
+ return this._device.current_capabilities & supportedCaps;
|
|
|
0999a2 |
+ }
|
|
|
0999a2 |
+
|
|
|
0999a2 |
_autoConnect() {
|
|
|
0999a2 |
- launchSettingsPanel('network', 'connect-3g', this._device.get_path());
|
|
|
0999a2 |
+ if (this._useWwanPanel())
|
|
|
0999a2 |
+ launchSettingsPanel('wwan', 'show-device', this._device.udi);
|
|
|
0999a2 |
+ else
|
|
|
0999a2 |
+ launchSettingsPanel('network', 'connect-3g', this._device.get_path());
|
|
|
0999a2 |
}
|
|
|
0999a2 |
|
|
|
0999a2 |
_sessionUpdated() {
|
|
|
0999a2 |
--
|
|
|
0999a2 |
2.31.1
|
|
|
0999a2 |
|