SHA256
1
0
forked from pool/gnome-shell
Files
gnome-shell/CVE-2024-36472.patch
Dominique Leuenberger 0561dc4828 - Rebase SLE patches:
+ gnome-shell-gdm-login-applet.patch
  + gnome-shell-domain.patch
  + gnome-shell-fate324570-Make-GDM-background-image-configurable.patch
  + gnome-shell-jsc#SLE-16051-Input-method-recommendation.patch
- Comment out gs-fate318433-prevent-same-account-multi-logins.patch
  Needs to be removed or rebased.

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=584
2024-08-09 07:58:14 +00:00

63 lines
2.3 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff --git a/js/ui/status/network.js b/dev/shm/tw/gnome-shell-js/ui/status/network.js
index c3f0aa0..d9a5a86 100644
--- a/js/ui/status/network.js
+++ b/dev/shm/tw/gnome-shell-js/ui/status/network.js
@@ -1975,6 +1975,7 @@ class Indicator extends SystemIndicator {
this._mainConnection = null;
this._notification = null;
+ this._PortalNotification = null;
this._wiredToggle = new NMWiredToggle();
this._wirelessToggle = new NMWirelessToggle();
@@ -2083,8 +2084,10 @@ class Indicator extends SystemIndicator {
}
_mainConnectionStateChanged() {
- if (this._mainConnection.state === NM.ActiveConnectionState.ACTIVATED)
+ if (this._mainConnection.state === NM.ActiveConnectionState.ACTIVATED) {
this._notification?.destroy();
+ this._PortalNotification?.destroy();
+ }
}
_flushConnectivityQueue() {
@@ -2119,7 +2122,7 @@ class Indicator extends SystemIndicator {
}
}
- async _syncConnectivity() {
+ _syncConnectivity() {
if (this._mainConnection == null ||
this._mainConnection.state !== NM.ActiveConnectionState.ACTIVATED) {
this._flushConnectivityQueue();
@@ -2137,10 +2140,28 @@ class Indicator extends SystemIndicator {
if (!isPortal || Main.sessionMode.isGreeter)
return;
+ let name = this._mainConnection.get_id();
let path = this._mainConnection.get_path();
if (this._connectivityQueue.has(path))
return;
+ this._PortalNotification?.destroy();
+ const source = MessageTray.getSystemSource();
+
+ this._PortalNotification = new MessageTray.Notification({
+ source,
+ title: _('Sign Into WiFi Network'),
+ body: _(name),
+ });
+ this._PortalNotification.connect('activated',
+ () => this._onNotificationActivated(path));
+ this._PortalNotification.connect('destroy',
+ () => (this._PortalNotification = null));
+
+ source.addNotification(this._PortalNotification);
+ }
+
+ async _onNotificationActivated(path) {
let timestamp = global.get_current_time();
if (!this._portalHelperProxy) {
this._portalHelperProxy = new Gio.DBusProxy({