ALT Linux Bugzilla
– Attachment 19584 Details for
Bug 55932
[gnome-shell] Добавить уведомление о конфликте IP-адресов
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Feature patch
patchfile.patch (text/plain), 3.29 KB, created by
Alex
on 2025-09-18 15:20:05 MSK
(
hide
)
Description:
Feature patch
Filename:
MIME Type:
Creator:
Alex
Created:
2025-09-18 15:20:05 MSK
Size:
3.29 KB
patch
obsolete
>From b8dbaba51e4eda5f336fd4f83670f972caf86bde Mon Sep 17 00:00:00 2001 >From: Alexander Davydzik <paladindev@altlinux.org> >Date: Wed, 16 Jul 2025 17:51:14 +0300 >Subject: [PATCH] network: Different notification description if > activation-failed > >Shows different notification description if activation-failed reason was >IP_CONFIG_UNAVAILABLE > >Also this commit adds int param to NMToggle class which is represents >NM.DeviceStateReason enum. That can be used to show different error >message when activation-failed signal is activated. > >Note: NMVpnToggle always emits signal with NM.DeviceStateReason.NONE >--- > js/ui/status/network.js | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > >diff --git a/js/ui/status/network.js b/js/ui/status/network.js >index 96ca1ad02..b48bef384 100644 >--- a/js/ui/status/network.js >+++ b/js/ui/status/network.js >@@ -1375,7 +1375,9 @@ const NMVpnConnectionItem = GObject.registerClass({ > > const NMToggle = GObject.registerClass({ > Signals: { >- 'activation-failed': {}, >+ 'activation-failed': { >+ param_types: [GObject.TYPE_INT], >+ }, > }, > }, class NMToggle extends QuickMenuToggle { > constructor() { >@@ -1614,7 +1616,7 @@ class NMVpnToggle extends NMToggle { > > const item = new NMVpnConnectionItem(this, connection); > item.connectObject( >- 'activation-failed', () => this.emit('activation-failed'), >+ 'activation-failed', () => this.emit('activation-failed', NM.DeviceStateReason.NONE), > this); > this._addItem(connection, item); > >@@ -1731,7 +1733,7 @@ class NMDeviceToggle extends NMToggle { > cancelled the agent dialog */ > if (newState === NM.DeviceState.FAILED && > reason !== NM.DeviceStateReason.NO_SECRETS) >- this.emit('activation-failed'); >+ this.emit('activation-failed', reason); > } > > _createDeviceMenuItem(_device) { >@@ -2098,7 +2100,7 @@ class Indicator extends SystemIndicator { > > this.quickSettingsItems.forEach(toggle => { > toggle.connectObject( >- 'activation-failed', () => this._onActivationFailed(), >+ 'activation-failed', (_, reason) => this._onActivationFailed(reason), > this); > }); > >@@ -2162,14 +2164,14 @@ class Indicator extends SystemIndicator { > } > } > >- _onActivationFailed() { >+ _onActivationFailed(reason) { > this._notification?.destroy(); > > const source = MessageTray.getSystemSource(); > this._notification = new MessageTray.Notification({ > source, > title: _('Connection failed'), >- body: _('Activation of network connection failed'), >+ body: this._reasonToLocalizedString(reason), > iconName: 'network-error-symbolic', > urgency: MessageTray.Urgency.HIGH, > isTransient: true, >@@ -2180,6 +2182,12 @@ class Indicator extends SystemIndicator { > source.addNotification(this._notification); > } > >+ _reasonToLocalizedString(reason) { >+ if (reason === NM.DeviceStateReason.IP_CONFIG_UNAVAILABLE) >+ return _('IP configuration failed'); >+ return _('Activation of network connection failed'); >+ } >+ > _syncMainConnection() { > this._mainConnection?.disconnectObject(this); > >-- >2.42.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55932
: 19584