[gnome-shell] status/network: Remove reason param from ::activation-failed
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] status/network: Remove reason param from ::activation-failed
- Date: Sun, 7 Aug 2022 22:08:37 +0000 (UTC)
commit 44f0a9560c77f6f8f18387f5bfc4b94dcf645a60
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Aug 1 01:21:50 2022 +0200
status/network: Remove reason param from ::activation-failed
We never used it, so after more than ten years, it seems safe to
assume that we never will.
Plus different items pass different types, which makes it pretty
much impossible to use, even if we wanted to (which apparently
we don't 🤷️)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2406>
js/ui/status/network.js | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index d2802f328e..c35f4bc51a 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -296,9 +296,7 @@ var NMConnectionSection = class NMConnectionSection extends Signals.EventEmitter
return;
item.connect('icon-changed', () => this._iconChanged());
- item.connect('activation-failed', (o, reason) => {
- this.emit('activation-failed', reason);
- });
+ item.connect('activation-failed', () => this.emit('activation-failed'));
item.connect('name-changed', this._sync.bind(this));
let pos = Util.insertSorted(this._connections, connection, this._connectionSortFunction.bind(this));
@@ -386,7 +384,7 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
cancelled the agent dialog */
if (newstate == NM.DeviceState.FAILED &&
reason != NM.DeviceStateReason.NO_SECRETS)
- this.emit('activation-failed', reason);
+ this.emit('activation-failed');
this._sync();
}
@@ -1316,7 +1314,7 @@ var NMDeviceWireless = class extends Signals.EventEmitter {
cancelled the agent dialog */
if (newstate == NM.DeviceState.FAILED &&
reason != NM.DeviceStateReason.NO_SECRETS)
- this.emit('activation-failed', reason);
+ this.emit('activation-failed');
this._sync();
}
@@ -1481,12 +1479,8 @@ var NMWireguardItem = class extends NMConnectionItem {
_connectionStateChanged(ac, newstate, reason) {
if (newstate === NM.ActiveConnectionState.DEACTIVATED &&
- reason !== NM.ActiveConnectionStateReason.NO_SECRETS) {
- // FIXME: if we ever want to show something based on reason,
- // we need to convert from NM.ActiveConnectionStateReason
- // to NM.DeviceStateReason
- this.emit('activation-failed', reason);
- }
+ reason !== NM.ActiveConnectionStateReason.NO_SECRETS)
+ this.emit('activation-failed');
this.emit('icon-changed');
super._connectionStateChanged();
@@ -1553,13 +1547,9 @@ var NMVpnConnectionItem = class extends NMConnectionItem {
}
_connectionStateChanged(ac, newstate, reason) {
- if (newstate == NM.VpnConnectionState.FAILED &&
- reason != NM.VpnConnectionStateReason.NO_SECRETS) {
- // FIXME: if we ever want to show something based on reason,
- // we need to convert from NM.VpnConnectionStateReason
- // to NM.DeviceStateReason
- this.emit('activation-failed', reason);
- }
+ if (newstate === NM.VpnConnectionState.FAILED &&
+ reason !== NM.VpnConnectionStateReason.NO_SECRETS)
+ this.emit('activation-failed');
this.emit('icon-changed');
super._connectionStateChanged();
@@ -1859,7 +1849,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._source.showNotification(this._notification);
}
- _onActivationFailed(_device, _reason) {
+ _onActivationFailed() {
// XXX: nm-applet has no special text depending on reason
// but I'm not sure of this generic message
this._notify('network-error-symbolic',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]