Don't disambiguate wired devices

Resolves: https://redhat.atlassian.net/browse/RHEL-173695
This commit is contained in:
Florian Müllner 2026-06-04 13:59:55 +02:00
parent 5653564a82
commit e4f560dff3
No known key found for this signature in database
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From cb7e6319a93211aeb3ad821d5efa2e2aee1e4d2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 6 May 2026 21:29:20 +0200
Subject: [PATCH] status/network: Don't disambiguate wired devices
Upstream disambiguates names to get user-friendlier strings if
possible (like simply "Wired" in the typical one-device case).
In more technical environments however, it is more appropriate
to use consistent identifiers between GUI and CLI, so present
ethernet devices as "Ethernet ($IFACE)".
https://redhat.atlassian.net/browse/RHEL-173695
---
js/ui/status/network.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 6cf195d417..c107df091b 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1913,6 +1913,20 @@ class NMWiredToggle extends NMDeviceToggle {
_createDeviceMenuItem(device) {
return new NMWiredDeviceItem(this._client, device);
}
+
+ _syncDeviceNames() {
+ const devices = [...this._nmDevices];
+ const names = NM.Device.disambiguate_names(devices);
+ this._deviceNames.clear();
+ devices.forEach(
+ (dev, i) => {
+ const iface = dev.get_iface();
+ const name = iface ? `${_('Ethernet')} (${iface})` : names[i];
+
+ this._deviceNames.set(dev, name);
+ this._items.get(dev)?.setDeviceName(name);
+ });
+ }
});
const NMBluetoothToggle = GObject.registerClass(
--
2.54.0

View File

@ -61,6 +61,7 @@ Patch: 0001-theme-Welcome-Illustration.patch
Patch: screenshot-tool.patch
Patch: 0001-Revert-status-keyboard-Limit-the-input-method-indica.patch
Patch: 0001-Revert-Require-gjs-1.81.2-for-build-because-Intl.Seg.patch
Patch: 0001-status-network-Don-t-disambiguate-wired-devices.patch
# Adapt to keyboard layout API changes (RHEL-106779)
Patch: 0001-status-keyboard-Adapt-to-external-source-of-keyboard.patch