Accepting request 813360 from home:qkzhu:branches:GNOME:Factory
- Add gnome-shell-disable-screensaver-user-switch-when-remote.patch: This patch will set the button invisible when the user's can_switch is false (e.g. when the session is remote) or user-switch-enabled is disabled (bsc#1167276 glgo#GNOME/gnome-shell!1215). OBS-URL: https://build.opensuse.org/request/show/813360 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=437
This commit is contained in:
parent
4f01bcbfc4
commit
f3d833863f
@ -0,0 +1,65 @@
|
|||||||
|
From d2cf13eff4f91e60fbceb7e28573d80eb5b908bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chingkai <chuchingkai@gmail.com>
|
||||||
|
Date: Sat, 25 Apr 2020 16:29:16 +0800
|
||||||
|
Subject: [PATCH] unlockDialog: Set Switch User Button via
|
||||||
|
_updateUserSwitchVisibility
|
||||||
|
|
||||||
|
This commit will set the button invisible when the user's can_switch
|
||||||
|
is false (e.g. when the session is remote) or user-switch-enabled is
|
||||||
|
disabled.
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2687
|
||||||
|
---
|
||||||
|
js/ui/unlockDialog.js | 29 ++++++++++++++++++++++++++---
|
||||||
|
1 file changed, 26 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
||||||
|
index f74f4be23..cbcc2e512 100644
|
||||||
|
--- a/js/ui/unlockDialog.js
|
||||||
|
+++ b/js/ui/unlockDialog.js
|
||||||
|
@@ -566,9 +566,17 @@ var UnlockDialog = GObject.registerClass({
|
||||||
|
this._otherUserButton.set_pivot_point(0.5, 0.5);
|
||||||
|
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
|
||||||
|
|
||||||
|
- let screenSaverSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.screensaver' });
|
||||||
|
- screenSaverSettings.bind('user-switch-enabled',
|
||||||
|
- this._otherUserButton, 'visible', Gio.SettingsBindFlags.GET);
|
||||||
|
+ this._screenSaverSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.screensaver' });
|
||||||
|
+
|
||||||
|
+ this._userSwitchEnabledId = 0;
|
||||||
|
+ this._userSwitchEnabledId = this._screenSaverSettings.connect('changed::user-switch-enabled',
|
||||||
|
+ this._updateUserSwitchVisibility.bind(this));
|
||||||
|
+
|
||||||
|
+ this._userLoadedId = 0;
|
||||||
|
+ this._userLoadedId = this._user.connect('notify::is-loaded',
|
||||||
|
+ this._updateUserSwitchVisibility.bind(this));
|
||||||
|
+
|
||||||
|
+ this._updateUserSwitchVisibility();
|
||||||
|
|
||||||
|
// Main Box
|
||||||
|
let mainBox = new St.Widget();
|
||||||
|
@@ -828,6 +836,21 @@ var UnlockDialog = GObject.registerClass({
|
||||||
|
this._gdmClient = null;
|
||||||
|
delete this._gdmClient;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (this._userLoadedId) {
|
||||||
|
+ this._user.disconnect(this._userLoadedId);
|
||||||
|
+ this._userLoadedId = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (this._userSwitchEnabledId) {
|
||||||
|
+ this._screenSaverSettings.disconnect(this._userSwitchEnabledId);
|
||||||
|
+ this._userSwitchEnabledId = 0;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ _updateUserSwitchVisibility() {
|
||||||
|
+ this._otherUserButton.visible = this._userManager.can_switch() &&
|
||||||
|
+ this._screenSaverSettings.get_boolean('user-switch-enabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
cancel() {
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 11 02:44:58 UTC 2020 - QK ZHU <qkzhu@suse.com>
|
||||||
|
|
||||||
|
- Add gnome-shell-disable-screensaver-user-switch-when-remote.patch:
|
||||||
|
This patch will set the button invisible when the user's can_switch
|
||||||
|
is false (e.g. when the session is remote) or user-switch-enabled is
|
||||||
|
disabled (bsc#1167276 glgo#GNOME/gnome-shell!1215).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 4 09:49:43 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
Thu Jun 4 09:49:43 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ Patch4: gnome-shell-fate324570-Make-GDM-background-image-configurable.pa
|
|||||||
Patch5: gnome-shell-jscSLE9267-Remove-sessionList-of-endSessionDialog.patch
|
Patch5: gnome-shell-jscSLE9267-Remove-sessionList-of-endSessionDialog.patch
|
||||||
# PATCH-FIX-UPSTREAM gnome-shell-Get-resource-scale-by-get_resource_scale.patch bsc#1169845 glgo#GNOME/gnome-shell!1206 xwang@suse.com -- Get resource scale by get_resource_scale
|
# PATCH-FIX-UPSTREAM gnome-shell-Get-resource-scale-by-get_resource_scale.patch bsc#1169845 glgo#GNOME/gnome-shell!1206 xwang@suse.com -- Get resource scale by get_resource_scale
|
||||||
Patch6: gnome-shell-Get-resource-scale-by-get_resource_scale.patch
|
Patch6: gnome-shell-Get-resource-scale-by-get_resource_scale.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gnome-shell-disable-screensaver-user-switch-when-remote.patch bsc#1167276 glgo#GNOME/gnome-shell!1215 qkzhu@suse.com -- Set Switch User Button invisible when session is Remote
|
||||||
|
Patch7: gnome-shell-disable-screensaver-user-switch-when-remote.patch
|
||||||
|
|
||||||
## NOTE: Keep SLE-only patches at bottom (starting on 1000).
|
## NOTE: Keep SLE-only patches at bottom (starting on 1000).
|
||||||
# PATCH-FEATURE-SLE gnome-shell-gdm-login-applet.patch fate#314545 dliang@suse.com -- Add an applet on login UI to display suse icon, product name, hostname.
|
# PATCH-FEATURE-SLE gnome-shell-gdm-login-applet.patch fate#314545 dliang@suse.com -- Add an applet on login UI to display suse icon, product name, hostname.
|
||||||
@ -181,6 +183,7 @@ This package contains an optional extensions app for managing GNOME Shell extens
|
|||||||
#patch4 -p1
|
#patch4 -p1
|
||||||
#patch5 -p1
|
#patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
translation-update-upstream
|
translation-update-upstream
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user