import gnome-shell-40.4-2.el9
This commit is contained in:
commit
0f58808657
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/gnome-shell-40.4.tar.xz
|
1
.gnome-shell.metadata
Normal file
1
.gnome-shell.metadata
Normal file
@ -0,0 +1 @@
|
||||
41d5d915c880f6a62bf82354b01eba39be72d6d1 SOURCES/gnome-shell-40.4.tar.xz
|
63
SOURCES/0001-Update-generated-stylesheets.patch
Normal file
63
SOURCES/0001-Update-generated-stylesheets.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From 678cdd9e0da851da78527fa827d71a80273510b0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@redhat.com>
|
||||
Date: Tue, 15 Jun 2021 00:41:59 +0200
|
||||
Subject: [PATCH] Update generated stylesheets
|
||||
|
||||
---
|
||||
data/theme/gnome-shell-high-contrast.css | 7 +++++++
|
||||
data/theme/gnome-shell.css | 7 +++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-high-contrast.css b/data/theme/gnome-shell-high-contrast.css
|
||||
index 64ff440..1d3e917 100644
|
||||
--- a/data/theme/gnome-shell-high-contrast.css
|
||||
+++ b/data/theme/gnome-shell-high-contrast.css
|
||||
@@ -1243,6 +1243,9 @@ StScrollBar {
|
||||
margin: 0; }
|
||||
#panel .panel-button .app-menu-icon {
|
||||
-st-icon-style: symbolic; }
|
||||
+ #panel .panel-button .panel-logo-icon {
|
||||
+ padding-right: .4em;
|
||||
+ icon-size: 1em; }
|
||||
#panel #panelActivities.panel-button {
|
||||
-natural-hpadding: 18px; }
|
||||
#panel.unlock-screen .panel-button:hover, #panel.unlock-screen .panel-button:active, #panel.unlock-screen .panel-button:overview, #panel.unlock-screen .panel-button:focus, #panel.unlock-screen .panel-button:checked, #panel.login-screen .panel-button:hover, #panel.login-screen .panel-button:active, #panel.login-screen .panel-button:overview, #panel.login-screen .panel-button:focus, #panel.login-screen .panel-button:checked, #panel:overview .panel-button:hover, #panel:overview .panel-button:active, #panel:overview .panel-button:overview, #panel:overview .panel-button:focus, #panel:overview .panel-button:checked {
|
||||
@@ -2060,6 +2063,10 @@ StScrollBar {
|
||||
.login-dialog-message {
|
||||
text-align: center; }
|
||||
|
||||
+.login-dialog-message-hint, .login-dialog-message {
|
||||
+ color: #bebeb6;
|
||||
+ min-height: 2.75em; }
|
||||
+
|
||||
.login-dialog-user-selection-box {
|
||||
padding: 100px 0px; }
|
||||
|
||||
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
|
||||
index 81e42ac..7320fc5 100644
|
||||
--- a/data/theme/gnome-shell.css
|
||||
+++ b/data/theme/gnome-shell.css
|
||||
@@ -1243,6 +1243,9 @@ StScrollBar {
|
||||
margin: 0; }
|
||||
#panel .panel-button .app-menu-icon {
|
||||
-st-icon-style: symbolic; }
|
||||
+ #panel .panel-button .panel-logo-icon {
|
||||
+ padding-right: .4em;
|
||||
+ icon-size: 1em; }
|
||||
#panel #panelActivities.panel-button {
|
||||
-natural-hpadding: 18px; }
|
||||
#panel.unlock-screen .panel-button:hover, #panel.unlock-screen .panel-button:active, #panel.unlock-screen .panel-button:overview, #panel.unlock-screen .panel-button:focus, #panel.unlock-screen .panel-button:checked, #panel.login-screen .panel-button:hover, #panel.login-screen .panel-button:active, #panel.login-screen .panel-button:overview, #panel.login-screen .panel-button:focus, #panel.login-screen .panel-button:checked, #panel:overview .panel-button:hover, #panel:overview .panel-button:active, #panel:overview .panel-button:overview, #panel:overview .panel-button:focus, #panel:overview .panel-button:checked {
|
||||
@@ -2060,6 +2063,10 @@ StScrollBar {
|
||||
.login-dialog-message {
|
||||
text-align: center; }
|
||||
|
||||
+.login-dialog-message-hint, .login-dialog-message {
|
||||
+ color: #bebeb6;
|
||||
+ min-height: 2.75em; }
|
||||
+
|
||||
.login-dialog-user-selection-box {
|
||||
padding: 100px 0px; }
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From afa3fc7be62cf70c9f6c6954e9cf5b49581269fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Wed, 20 May 2015 16:44:00 +0200
|
||||
Subject: [PATCH] app: Fall back to window title instead of WM_CLASS
|
||||
|
||||
It's a bad fallback as it's clearly window-specific (rather than
|
||||
app-specific), but it likely looks prettier when we fail to associate
|
||||
a .desktop file ...
|
||||
---
|
||||
src/shell-app.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/shell-app.c b/src/shell-app.c
|
||||
index 62ba2ec73..dc0e1c732 100644
|
||||
--- a/src/shell-app.c
|
||||
+++ b/src/shell-app.c
|
||||
@@ -293,7 +293,7 @@ shell_app_get_name (ShellApp *app)
|
||||
const char *name = NULL;
|
||||
|
||||
if (window)
|
||||
- name = meta_window_get_wm_class (window);
|
||||
+ name = meta_window_get_title (window);
|
||||
if (!name)
|
||||
name = C_("program", "Unknown");
|
||||
return name;
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,36 @@
|
||||
From c18b7b7819f17f5d14be1ba2760653f3d93b81b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Mon, 1 Feb 2021 18:26:00 +0100
|
||||
Subject: [PATCH] extensionDownloader: Refuse to override system extensions
|
||||
|
||||
The website allows to "update" system extensions by installing the
|
||||
upstream version into the user's home directory.
|
||||
|
||||
Prevent that by refusing to download and install extensions that are
|
||||
already installed system-wide.
|
||||
---
|
||||
js/ui/extensionDownloader.js | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js
|
||||
index 6a3b2b488..471ddab14 100644
|
||||
--- a/js/ui/extensionDownloader.js
|
||||
+++ b/js/ui/extensionDownloader.js
|
||||
@@ -17,6 +17,14 @@ var REPOSITORY_URL_UPDATE = 'https://extensions.gnome.org/update-info/';
|
||||
let _httpSession;
|
||||
|
||||
function installExtension(uuid, invocation) {
|
||||
+ const oldExt = Main.extensionManager.lookup(uuid);
|
||||
+ if (oldExt && oldExt.type === ExtensionUtils.ExtensionType.SYSTEM) {
|
||||
+ log('extensionDownloader: Trying to replace system extension %s'.format(uuid));
|
||||
+ invocation.return_dbus_error('org.gnome.Shell.InstallError',
|
||||
+ 'System extensions cannot be replaced');
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
let params = { uuid,
|
||||
shell_version: Config.PACKAGE_VERSION };
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
29
SOURCES/0001-loginDialog-make-info-messages-themed.patch
Normal file
29
SOURCES/0001-loginDialog-make-info-messages-themed.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From cf4d6eac54e0614fe95a34a88c5c07283d49599b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 26 Jun 2017 14:35:05 -0400
|
||||
Subject: [PATCH] loginDialog: make info messages themed
|
||||
|
||||
They were lacking a definition before leading them to
|
||||
show up invisible.
|
||||
---
|
||||
data/theme/gnome-shell-sass/widgets/_login-dialog.scss | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/widgets/_login-dialog.scss b/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
|
||||
index 1789beca9..84539342d 100644
|
||||
--- a/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
|
||||
+++ b/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
|
||||
@@ -93,6 +93,10 @@
|
||||
.login-dialog-banner { color: darken($osd_fg_color,10%); }
|
||||
.login-dialog-button-box { width: 23em; spacing: 5px; }
|
||||
.login-dialog-message { text-align: center; }
|
||||
+.login-dialog-message-hint, .login-dialog-message {
|
||||
+ color: darken($osd_fg_color, 20%);
|
||||
+ min-height: 2.75em;
|
||||
+}
|
||||
.login-dialog-user-selection-box { padding: 100px 0px; }
|
||||
.login-dialog-not-listed-label {
|
||||
padding-left: 2px;
|
||||
--
|
||||
2.31.1
|
||||
|
38
SOURCES/0001-main-Dump-stack-on-segfaults-by-default.patch
Normal file
38
SOURCES/0001-main-Dump-stack-on-segfaults-by-default.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From f54c3f9f66001c210e10fda6aa17b9218fb67dc1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 29 Oct 2020 18:21:06 +0100
|
||||
Subject: [PATCH] main: Dump stack on segfaults by default
|
||||
|
||||
---
|
||||
src/main.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index 5d07a4301..ed0b78dcc 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -38,6 +38,7 @@ static int caught_signal = 0;
|
||||
#define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
|
||||
#define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
|
||||
|
||||
+#define DEFAULT_SHELL_DEBUG SHELL_DEBUG_BACKTRACE_SEGFAULTS
|
||||
enum {
|
||||
SHELL_DEBUG_BACKTRACE_WARNINGS = 1,
|
||||
SHELL_DEBUG_BACKTRACE_SEGFAULTS = 2,
|
||||
@@ -279,8 +280,11 @@ shell_init_debug (const char *debug_env)
|
||||
{ "backtrace-segfaults", SHELL_DEBUG_BACKTRACE_SEGFAULTS },
|
||||
};
|
||||
|
||||
- _shell_debug = g_parse_debug_string (debug_env, keys,
|
||||
- G_N_ELEMENTS (keys));
|
||||
+ if (debug_env)
|
||||
+ _shell_debug = g_parse_debug_string (debug_env, keys,
|
||||
+ G_N_ELEMENTS (keys));
|
||||
+ else
|
||||
+ _shell_debug = DEFAULT_SHELL_DEBUG;
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.31.1
|
||||
|
56
SOURCES/0001-panel-add-an-icon-to-the-ActivitiesButton.patch
Normal file
56
SOURCES/0001-panel-add-an-icon-to-the-ActivitiesButton.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From b5db4d318546654f4e9c1e4999fa00456441f105 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 15 Jan 2014 16:45:34 -0500
|
||||
Subject: [PATCH] panel: add an icon to the ActivitiesButton
|
||||
|
||||
Requested by brand
|
||||
---
|
||||
data/theme/gnome-shell-sass/widgets/_panel.scss | 5 +++++
|
||||
js/ui/panel.js | 11 ++++++++++-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/widgets/_panel.scss b/data/theme/gnome-shell-sass/widgets/_panel.scss
|
||||
index 1f4650773..5f323cbc8 100644
|
||||
--- a/data/theme/gnome-shell-sass/widgets/_panel.scss
|
||||
+++ b/data/theme/gnome-shell-sass/widgets/_panel.scss
|
||||
@@ -85,6 +85,11 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
|
||||
// dimensions of the icon are hardcoded
|
||||
}
|
||||
|
||||
+ .panel-logo-icon {
|
||||
+ padding-right: .4em;
|
||||
+ icon-size: 1em;
|
||||
+ }
|
||||
+
|
||||
&#panelActivities {
|
||||
-natural-hpadding: $base_padding * 3;
|
||||
}
|
||||
diff --git a/js/ui/panel.js b/js/ui/panel.js
|
||||
index 1474886ef..ad11f4ba2 100644
|
||||
--- a/js/ui/panel.js
|
||||
+++ b/js/ui/panel.js
|
||||
@@ -390,11 +390,20 @@ class ActivitiesButton extends PanelMenu.Button {
|
||||
|
||||
this.name = 'panelActivities';
|
||||
|
||||
+ const box = new St.BoxLayout();
|
||||
+ this.add_child(box);
|
||||
+ const iconFile = Gio.File.new_for_path('/usr/share/icons/hicolor/scalable/apps/start-here.svg');
|
||||
+ this._icon = new St.Icon({
|
||||
+ gicon: new Gio.FileIcon({ file: iconFile }),
|
||||
+ style_class: 'panel-logo-icon',
|
||||
+ });
|
||||
+ box.add_child(this._icon);
|
||||
+
|
||||
/* Translators: If there is no suitable word for "Activities"
|
||||
in your language, you can use the word for "Overview". */
|
||||
this._label = new St.Label({ text: _("Activities"),
|
||||
y_align: Clutter.ActorAlign.CENTER });
|
||||
- this.add_actor(this._label);
|
||||
+ box.add_child(this._label);
|
||||
|
||||
this.label_actor = this._label;
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 1e4e9248ef6bcdd95ec3b91c8c8e94c4587a876b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 3 Jul 2015 13:54:36 -0400
|
||||
Subject: [PATCH] screenShield: unblank when inserting smartcard
|
||||
|
||||
If a user inserts the smartcard when the screen is locked/blanked
|
||||
we should ask them their pin right away.
|
||||
|
||||
At the moment they have to wiggle the mouse or do some other
|
||||
action to get the screen to unblank.
|
||||
---
|
||||
js/ui/screenShield.js | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
|
||||
index 9a64fc32c..bc1a0fba7 100644
|
||||
--- a/js/ui/screenShield.js
|
||||
+++ b/js/ui/screenShield.js
|
||||
@@ -85,8 +85,10 @@ var ScreenShield = class {
|
||||
this._smartcardManager = SmartcardManager.getSmartcardManager();
|
||||
this._smartcardManager.connect('smartcard-inserted',
|
||||
(manager, token) => {
|
||||
- if (this._isLocked && token.UsedToLogin)
|
||||
+ if (this._isLocked && token.UsedToLogin) {
|
||||
+ this._wakeUpScreen();
|
||||
this._activateDialog();
|
||||
+ }
|
||||
});
|
||||
|
||||
this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager();
|
||||
--
|
||||
2.31.1
|
||||
|
66
SOURCES/0001-st-texture-cache-purge-on-resume.patch
Normal file
66
SOURCES/0001-st-texture-cache-purge-on-resume.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 483f0340bb64767bd8d6d95788058270dfdb5def Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 12:54:32 -0500
|
||||
Subject: [PATCH] st-texture-cache: purge on resume
|
||||
|
||||
With the proprietary nvidia driver, textures get garbled on suspend,
|
||||
so the texture cache needs to evict all textures in that situation.
|
||||
---
|
||||
js/ui/main.js | 6 +++++-
|
||||
src/st/st-texture-cache.c | 10 ++++++++++
|
||||
src/st/st-texture-cache.h | 1 +
|
||||
3 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/main.js b/js/ui/main.js
|
||||
index 979fcefa5..dbf3a32d3 100644
|
||||
--- a/js/ui/main.js
|
||||
+++ b/js/ui/main.js
|
||||
@@ -249,7 +249,11 @@ function _initializeUI() {
|
||||
return true;
|
||||
});
|
||||
|
||||
- global.display.connect('gl-video-memory-purged', loadTheme);
|
||||
+ global.display.connect('gl-video-memory-purged', () => {
|
||||
+ let cache = St.TextureCache.get_default();
|
||||
+ cache.clear();
|
||||
+ loadTheme();
|
||||
+ });
|
||||
|
||||
// Provide the bus object for gnome-session to
|
||||
// initiate logouts.
|
||||
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
|
||||
index b7b547a78..583c3f7d2 100644
|
||||
--- a/src/st/st-texture-cache.c
|
||||
+++ b/src/st/st-texture-cache.c
|
||||
@@ -130,6 +130,16 @@ st_texture_cache_class_init (StTextureCacheClass *klass)
|
||||
G_TYPE_NONE, 1, G_TYPE_FILE);
|
||||
}
|
||||
|
||||
+/* Evicts all cached textures */
|
||||
+void
|
||||
+st_texture_cache_clear (StTextureCache *cache)
|
||||
+{
|
||||
+ g_return_if_fail (ST_IS_TEXTURE_CACHE (cache));
|
||||
+
|
||||
+ g_hash_table_remove_all (cache->priv->keyed_cache);
|
||||
+ g_signal_emit (cache, signals[ICON_THEME_CHANGED], 0);
|
||||
+}
|
||||
+
|
||||
/* Evicts all cached textures for named icons */
|
||||
static void
|
||||
st_texture_cache_evict_icons (StTextureCache *cache)
|
||||
diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
|
||||
index 55d84952d..948915c30 100644
|
||||
--- a/src/st/st-texture-cache.h
|
||||
+++ b/src/st/st-texture-cache.h
|
||||
@@ -53,6 +53,7 @@ typedef enum {
|
||||
} StTextureCachePolicy;
|
||||
|
||||
StTextureCache* st_texture_cache_get_default (void);
|
||||
+void st_texture_cache_clear (StTextureCache *cache);
|
||||
|
||||
ClutterActor *
|
||||
st_texture_cache_load_sliced_image (StTextureCache *cache,
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 7e94d682985ac4ff422da73b5878f4f005eff67b Mon Sep 17 00:00:00 2001
|
||||
From: Mohammed Sadiq <sadiq@sadiqpk.org>
|
||||
Date: Tue, 10 Aug 2021 15:22:30 +0530
|
||||
Subject: [PATCH] status/network: Use wwan settings panel for GSM/LTE Modems
|
||||
|
||||
GSM/UMTS/LTE modems now have better support with wwan panel in GNOME
|
||||
Settings. So, if the modem supports, open wwan panel, otherwise
|
||||
fallback to opening network panel when "Mobile Broadband Settings"
|
||||
item is clicked.
|
||||
|
||||
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/583
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1942>
|
||||
---
|
||||
js/ui/status/network.js | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
||||
index f510f90ae..fe82fcb08 100644
|
||||
--- a/js/ui/status/network.js
|
||||
+++ b/js/ui/status/network.js
|
||||
@@ -543,7 +543,11 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
||||
constructor(client, device) {
|
||||
super(client, device);
|
||||
|
||||
- this.item.menu.addSettingsAction(_("Mobile Broadband Settings"), 'gnome-network-panel.desktop');
|
||||
+ const settingsPanel = this._useWwanPanel()
|
||||
+ ? 'gnome-wwan-panel.desktop'
|
||||
+ : 'gnome-network-panel.desktop';
|
||||
+
|
||||
+ this.item.menu.addSettingsAction(_('Mobile Broadband Settings'), settingsPanel);
|
||||
|
||||
this._mobileDevice = null;
|
||||
|
||||
@@ -573,8 +577,19 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
||||
return NMConnectionCategory.WWAN;
|
||||
}
|
||||
|
||||
+ _useWwanPanel() {
|
||||
+ // Currently, wwan panel doesn't support CDMA_EVDO modems
|
||||
+ const supportedCaps =
|
||||
+ NM.DeviceModemCapabilities.GSM_UMTS |
|
||||
+ NM.DeviceModemCapabilities.LTE;
|
||||
+ return this._device.current_capabilities & supportedCaps;
|
||||
+ }
|
||||
+
|
||||
_autoConnect() {
|
||||
- launchSettingsPanel('network', 'connect-3g', this._device.get_path());
|
||||
+ if (this._useWwanPanel())
|
||||
+ launchSettingsPanel('wwan', 'show-device', this._device.udi);
|
||||
+ else
|
||||
+ launchSettingsPanel('network', 'connect-3g', this._device.get_path());
|
||||
}
|
||||
|
||||
_sessionUpdated() {
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 34a7bfdade939e39c2a01cc1b0737a7bdccddd5b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 14 Mar 2017 17:04:36 +0100
|
||||
Subject: [PATCH] windowMenu: Bring back workspaces submenu for static
|
||||
workspaces
|
||||
|
||||
When the titlebar context menu was moved to the shell, the submenu for
|
||||
moving to a specific workspace was intentionally left out; some people
|
||||
are quite attached to it though, so bring it back when static workspaces
|
||||
are used.
|
||||
---
|
||||
js/ui/windowMenu.js | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
|
||||
index bb6a8df7b..3449f759d 100644
|
||||
--- a/js/ui/windowMenu.js
|
||||
+++ b/js/ui/windowMenu.js
|
||||
@@ -116,6 +116,23 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
|
||||
window.change_workspace(workspace.get_neighbor(dir));
|
||||
});
|
||||
}
|
||||
+
|
||||
+ let { workspaceManager } = global;
|
||||
+ let nWorkspaces = workspaceManager.n_workspaces;
|
||||
+ if (nWorkspaces > 1 && !Meta.prefs_get_dynamic_workspaces()) {
|
||||
+ item = new PopupMenu.PopupSubMenuMenuItem(_("Move to another workspace"));
|
||||
+ this.addMenuItem(item);
|
||||
+
|
||||
+ let currentIndex = workspaceManager.get_active_workspace_index();
|
||||
+ for (let i = 0; i < nWorkspaces; i++) {
|
||||
+ let index = i;
|
||||
+ let name = Meta.prefs_get_workspace_name(i);
|
||||
+ let subitem = item.menu.addAction(name, () => {
|
||||
+ window.change_workspace_by_index(index, false);
|
||||
+ });
|
||||
+ subitem.setSensitive(currentIndex != i);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
333
SOURCES/add-power-profiles-menu.patch
Normal file
333
SOURCES/add-power-profiles-menu.patch
Normal file
@ -0,0 +1,333 @@
|
||||
From 2103c5fcf994bb6aebd978553b338436e85fa7ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Wed, 7 Jul 2021 22:05:25 +0200
|
||||
Subject: [PATCH 1/2] status/powerProfiles: Add power mode selection
|
||||
|
||||
Settings' power panel gained support for switchable power profiles
|
||||
in GNOME 40. It's useful to have that functionality more readily
|
||||
available, so expose it in the system status menu as well.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3944
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1907>
|
||||
---
|
||||
.../net.hadess.PowerProfiles.xml | 76 ++++++++++++
|
||||
.../gnome-shell-dbus-interfaces.gresource.xml | 1 +
|
||||
js/js-resources.gresource.xml | 1 +
|
||||
js/ui/panel.js | 4 +
|
||||
js/ui/status/powerProfiles.js | 111 ++++++++++++++++++
|
||||
po/POTFILES.in | 1 +
|
||||
6 files changed, 194 insertions(+)
|
||||
create mode 100644 data/dbus-interfaces/net.hadess.PowerProfiles.xml
|
||||
create mode 100644 js/ui/status/powerProfiles.js
|
||||
|
||||
diff --git a/data/dbus-interfaces/net.hadess.PowerProfiles.xml b/data/dbus-interfaces/net.hadess.PowerProfiles.xml
|
||||
new file mode 100644
|
||||
index 000000000..fce04a86d
|
||||
--- /dev/null
|
||||
+++ b/data/dbus-interfaces/net.hadess.PowerProfiles.xml
|
||||
@@ -0,0 +1,76 @@
|
||||
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
+
|
||||
+<node>
|
||||
+
|
||||
+ <!--
|
||||
+ net.hadess.PowerProfiles:
|
||||
+ @short_description: Power Profiles daemon
|
||||
+
|
||||
+ The power-profiles-daemon API is meant to be used by parts of the OS or
|
||||
+ desktop environment to switch system power profiles based on user choice,
|
||||
+ or user intent.
|
||||
+
|
||||
+ OS components would typically use the "Profiles" property to construct
|
||||
+ their UI (2 or 3 profiles available), and monitor the "ActiveProfile"
|
||||
+ and the "PerformanceInhibited" properties to update that UI. The UI
|
||||
+ would try to set the "ActiveProfile" property if the user selected
|
||||
+ a different one.
|
||||
+
|
||||
+ Note that the reason why the project exists and how it is different from
|
||||
+ existing projects is explained <ulink href=" https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/blob/master/README.md">
|
||||
+ in the project's README file</ulink>.
|
||||
+
|
||||
+ The object path will be "/net/hadess/PowerProfiles".
|
||||
+ -->
|
||||
+ <interface name="net.hadess.PowerProfiles">
|
||||
+ <!--
|
||||
+ ActiveProfile:
|
||||
+
|
||||
+ The type of the currently active profile. It might change automatically
|
||||
+ if the "performance" profile was selected but it got inhibited, in which
|
||||
+ case the "PerformanceInhibited" property will reflect the reason.
|
||||
+ -->
|
||||
+ <property name="ActiveProfile" type="s" access="readwrite"/>
|
||||
+
|
||||
+ <!--
|
||||
+ PerformanceInhibited:
|
||||
+
|
||||
+ This will be set if the performance power profile is unavailable, with
|
||||
+ the value being used to identify the reason for unavailability. As new
|
||||
+ reasons can be added, it is recommended that front-ends show a generic
|
||||
+ reason if they do not recognise the value. Possible values are:
|
||||
+ - "lap-detected" (the computer is sitting on the user's lap)
|
||||
+ - "high-operating-temperature" (the computer is close to overheating)
|
||||
+ - "" (the empty string, if not inhibited)
|
||||
+ -->
|
||||
+ <property name="PerformanceInhibited" type="s" access="read"/>
|
||||
+
|
||||
+ <!--
|
||||
+ Profiles:
|
||||
+
|
||||
+ An array of key-pair values representing each profile. The key named
|
||||
+ "Driver" (s) identifies the power-profiles-daemon backend code used to
|
||||
+ implement the profile.
|
||||
+
|
||||
+ The key named "Profile" (s) will be one of:
|
||||
+ - "power-saver" (battery saving profile)
|
||||
+ - "balanced" (the default profile)
|
||||
+ - "performance" (a profile that does not care about noise or battery consumption)
|
||||
+
|
||||
+ Only one of each type of profile will be listed, with the daemon choosing the
|
||||
+ more appropriate "driver" for each profile type.
|
||||
+ -->
|
||||
+ <property name="Profiles" type="aa{sv}" access="read"/>
|
||||
+
|
||||
+ <!--
|
||||
+ Actions:
|
||||
+
|
||||
+ An array of strings listing each one of the "actions" implemented in
|
||||
+ the running daemon. This is used by API users to figure out whether
|
||||
+ particular functionality is available in a version of the daemon.
|
||||
+ -->
|
||||
+ <property name="Actions" type="as" access="read"/>
|
||||
+
|
||||
+ </interface>
|
||||
+</node>
|
||||
diff --git a/data/gnome-shell-dbus-interfaces.gresource.xml b/data/gnome-shell-dbus-interfaces.gresource.xml
|
||||
index e7972f6cb..6682c462d 100644
|
||||
--- a/data/gnome-shell-dbus-interfaces.gresource.xml
|
||||
+++ b/data/gnome-shell-dbus-interfaces.gresource.xml
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gnome/shell/dbus-interfaces">
|
||||
+ <file preprocess="xml-stripblanks">net.hadess.PowerProfiles.xml</file>
|
||||
<file preprocess="xml-stripblanks">net.hadess.SensorProxy.xml</file>
|
||||
<file preprocess="xml-stripblanks">net.reactivated.Fprint.Device.xml</file>
|
||||
<file preprocess="xml-stripblanks">net.reactivated.Fprint.Manager.xml</file>
|
||||
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
|
||||
index b2c603a55..7a94e2ff1 100644
|
||||
--- a/js/js-resources.gresource.xml
|
||||
+++ b/js/js-resources.gresource.xml
|
||||
@@ -134,6 +134,7 @@
|
||||
<file>ui/status/nightLight.js</file>
|
||||
<file>ui/status/network.js</file>
|
||||
<file>ui/status/power.js</file>
|
||||
+ <file>ui/status/powerProfiles.js</file>
|
||||
<file>ui/status/rfkill.js</file>
|
||||
<file>ui/status/volume.js</file>
|
||||
<file>ui/status/bluetooth.js</file>
|
||||
diff --git a/js/ui/panel.js b/js/ui/panel.js
|
||||
index ad11f4ba2..84668e96e 100644
|
||||
--- a/js/ui/panel.js
|
||||
+++ b/js/ui/panel.js
|
||||
@@ -693,6 +693,7 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
|
||||
this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
|
||||
this._power = new imports.ui.status.power.Indicator();
|
||||
+ this._powerProfiles = new imports.ui.status.powerProfiles.Indicator();
|
||||
this._rfkill = new imports.ui.status.rfkill.Indicator();
|
||||
this._volume = new imports.ui.status.volume.Indicator();
|
||||
this._brightness = new imports.ui.status.brightness.Indicator();
|
||||
@@ -712,6 +713,7 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
this._indicators.add_child(this._rfkill);
|
||||
this._indicators.add_child(this._volume);
|
||||
this._indicators.add_child(this._power);
|
||||
+ this._indicators.add_child(this._powerProfiles);
|
||||
|
||||
this.menu.addMenuItem(this._volume.menu);
|
||||
this.menu.addMenuItem(this._brightness.menu);
|
||||
@@ -726,6 +728,7 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
this.menu.addMenuItem(this._location.menu);
|
||||
this.menu.addMenuItem(this._rfkill.menu);
|
||||
this.menu.addMenuItem(this._power.menu);
|
||||
+ this.menu.addMenuItem(this._powerProfiles.menu);
|
||||
this.menu.addMenuItem(this._nightLight.menu);
|
||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
this.menu.addMenuItem(this._system.menu);
|
||||
@@ -733,6 +736,7 @@ class AggregateMenu extends PanelMenu.Button {
|
||||
menuLayout.addSizeChild(this._location.menu.actor);
|
||||
menuLayout.addSizeChild(this._rfkill.menu.actor);
|
||||
menuLayout.addSizeChild(this._power.menu.actor);
|
||||
+ menuLayout.addSizeChild(this._powerProfiles.menu.actor);
|
||||
menuLayout.addSizeChild(this._system.menu.actor);
|
||||
}
|
||||
});
|
||||
diff --git a/js/ui/status/powerProfiles.js b/js/ui/status/powerProfiles.js
|
||||
new file mode 100644
|
||||
index 000000000..f6bc5835b
|
||||
--- /dev/null
|
||||
+++ b/js/ui/status/powerProfiles.js
|
||||
@@ -0,0 +1,111 @@
|
||||
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
+/* exported Indicator */
|
||||
+
|
||||
+const { Gio, GObject } = imports.gi;
|
||||
+
|
||||
+const Main = imports.ui.main;
|
||||
+const PanelMenu = imports.ui.panelMenu;
|
||||
+const PopupMenu = imports.ui.popupMenu;
|
||||
+
|
||||
+const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||
+
|
||||
+const BUS_NAME = 'net.hadess.PowerProfiles';
|
||||
+const OBJECT_PATH = '/net/hadess/PowerProfiles';
|
||||
+
|
||||
+const PowerProfilesIface = loadInterfaceXML('net.hadess.PowerProfiles');
|
||||
+const PowerProfilesProxy = Gio.DBusProxy.makeProxyWrapper(PowerProfilesIface);
|
||||
+
|
||||
+const PROFILE_LABELS = {
|
||||
+ 'performance': _('Performance Mode'),
|
||||
+ 'balanced': _('Balanced Power'),
|
||||
+ 'power-saver': _('Power Saver'),
|
||||
+};
|
||||
+const PROFILE_ICONS = {
|
||||
+ 'performance': 'power-profile-performance-symbolic',
|
||||
+ 'balanced': 'power-profile-balanced-symbolic',
|
||||
+ 'power-saver': 'power-profile-power-saver-symbolic',
|
||||
+};
|
||||
+
|
||||
+var Indicator = GObject.registerClass(
|
||||
+class Indicator extends PanelMenu.SystemIndicator {
|
||||
+ _init() {
|
||||
+ super._init();
|
||||
+
|
||||
+ this._profileItems = new Map();
|
||||
+ this._updateProfiles = true;
|
||||
+
|
||||
+ this._proxy = new PowerProfilesProxy(Gio.DBus.system, BUS_NAME, OBJECT_PATH,
|
||||
+ (proxy, error) => {
|
||||
+ if (error) {
|
||||
+ log(error.message);
|
||||
+ } else {
|
||||
+ this._proxy.connect('g-properties-changed',
|
||||
+ (p, properties) => {
|
||||
+ const propertyNames = properties.deep_unpack();
|
||||
+ this._updateProfiles = 'Profiles' in propertyNames;
|
||||
+ this._sync();
|
||||
+ });
|
||||
+ }
|
||||
+ this._sync();
|
||||
+ });
|
||||
+
|
||||
+ this._item = new PopupMenu.PopupSubMenuMenuItem('', true);
|
||||
+
|
||||
+ this._profileSection = new PopupMenu.PopupMenuSection();
|
||||
+ this._item.menu.addMenuItem(this._profileSection);
|
||||
+ this._item.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
+ this._item.menu.addSettingsAction(_('Power Settings'),
|
||||
+ 'gnome-power-panel.desktop');
|
||||
+ this.menu.addMenuItem(this._item);
|
||||
+
|
||||
+ Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||
+ this._sessionUpdated();
|
||||
+ this._sync();
|
||||
+ }
|
||||
+
|
||||
+ _sessionUpdated() {
|
||||
+ const sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
|
||||
+ this.menu.setSensitive(sensitive);
|
||||
+ }
|
||||
+
|
||||
+ _sync() {
|
||||
+ this._item.visible = this._proxy.g_name_owner !== null;
|
||||
+
|
||||
+ if (!this._item.visible)
|
||||
+ return;
|
||||
+
|
||||
+ if (this._updateProfiles) {
|
||||
+ this._profileSection.removeAll();
|
||||
+ this._profileItems.clear();
|
||||
+
|
||||
+ const profiles = this._proxy.Profiles
|
||||
+ .map(p => p.Profile.unpack())
|
||||
+ .reverse();
|
||||
+ for (const profile of profiles) {
|
||||
+ const label = PROFILE_LABELS[profile];
|
||||
+ if (!label)
|
||||
+ continue;
|
||||
+
|
||||
+ const item = new PopupMenu.PopupMenuItem(label);
|
||||
+ item.connect('activate',
|
||||
+ () => (this._proxy.ActiveProfile = profile));
|
||||
+ this._profileItems.set(profile, item);
|
||||
+ this._profileSection.addMenuItem(item);
|
||||
+ }
|
||||
+ this._updateProfiles = false;
|
||||
+ }
|
||||
+
|
||||
+ for (const [profile, item] of this._profileItems) {
|
||||
+ item.setOrnament(profile === this._proxy.ActiveProfile
|
||||
+ ? PopupMenu.Ornament.DOT
|
||||
+ : PopupMenu.Ornament.NONE);
|
||||
+ }
|
||||
+
|
||||
+ const perfItem = this._profileItems.get('performance');
|
||||
+ if (perfItem)
|
||||
+ perfItem.sensitive = this._proxy.PerformanceInhibited === '';
|
||||
+
|
||||
+ this._item.label.text = PROFILE_LABELS[this._proxy.ActiveProfile];
|
||||
+ this._item.icon.icon_name = PROFILE_ICONS[this._proxy.ActiveProfile];
|
||||
+ }
|
||||
+});
|
||||
diff --git a/po/POTFILES.in b/po/POTFILES.in
|
||||
index cb279c1ee..727cb01a8 100644
|
||||
--- a/po/POTFILES.in
|
||||
+++ b/po/POTFILES.in
|
||||
@@ -61,6 +61,7 @@ js/ui/status/location.js
|
||||
js/ui/status/network.js
|
||||
js/ui/status/nightLight.js
|
||||
js/ui/status/power.js
|
||||
+js/ui/status/powerProfiles.js
|
||||
js/ui/status/remoteAccess.js
|
||||
js/ui/status/rfkill.js
|
||||
js/ui/status/system.js
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 0f8a2e2c6c3119492670efce5aff1224f2c3c47f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Fri, 6 Aug 2021 21:04:24 +0200
|
||||
Subject: [PATCH 2/2] powerProfiles: Tweak profile names
|
||||
|
||||
After some more discussion, we settled on slightly different
|
||||
profile names.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4530
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1939>
|
||||
---
|
||||
js/ui/status/powerProfiles.js | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/js/ui/status/powerProfiles.js b/js/ui/status/powerProfiles.js
|
||||
index f6bc5835b..61205bbc6 100644
|
||||
--- a/js/ui/status/powerProfiles.js
|
||||
+++ b/js/ui/status/powerProfiles.js
|
||||
@@ -16,9 +16,9 @@ const PowerProfilesIface = loadInterfaceXML('net.hadess.PowerProfiles');
|
||||
const PowerProfilesProxy = Gio.DBusProxy.makeProxyWrapper(PowerProfilesIface);
|
||||
|
||||
const PROFILE_LABELS = {
|
||||
- 'performance': _('Performance Mode'),
|
||||
- 'balanced': _('Balanced Power'),
|
||||
- 'power-saver': _('Power Saver'),
|
||||
+ 'performance': C_('Power profile', 'Performance'),
|
||||
+ 'balanced': C_('Power profile', 'Balanced'),
|
||||
+ 'power-saver': C_('Power profile', 'Power Saver'),
|
||||
};
|
||||
const PROFILE_ICONS = {
|
||||
'performance': 'power-profile-performance-symbolic',
|
||||
--
|
||||
2.31.1
|
||||
|
176
SOURCES/disable-unlock-entry-until-question.patch
Normal file
176
SOURCES/disable-unlock-entry-until-question.patch
Normal file
@ -0,0 +1,176 @@
|
||||
From 6739f213965c2b6a41c21b446095f393f9d86e43 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 30 Sep 2015 12:51:24 -0400
|
||||
Subject: [PATCH 1/3] authPrompt: don't fade out auth messages if user types
|
||||
password up front
|
||||
|
||||
Right now we fade out any stale auth messages as soon as the user starts
|
||||
typing. This behavior doesn't really make sense if the user is typing up
|
||||
front, before a password is asked.
|
||||
---
|
||||
js/gdm/authPrompt.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index 4844b9ee0..149e5ad4a 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -179,7 +179,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
|
||||
[this._textEntry, this._passwordEntry].forEach(entry => {
|
||||
entry.clutter_text.connect('text-changed', () => {
|
||||
- if (!this._userVerifier.hasPendingMessages)
|
||||
+ if (!this._userVerifier.hasPendingMessages && this._queryingService && !this._preemptiveAnswer)
|
||||
this._fadeOutMessage();
|
||||
});
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 2b84c3d611120ae2f60386d5c637b84d1958398d Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 30 Sep 2015 14:36:33 -0400
|
||||
Subject: [PATCH 2/3] authPrompt: don't spin unless answering question
|
||||
|
||||
---
|
||||
js/gdm/authPrompt.js | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index 149e5ad4a..c5643d046 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -243,13 +243,14 @@ var AuthPrompt = GObject.registerClass({
|
||||
this.verificationStatus = AuthPromptStatus.VERIFICATION_IN_PROGRESS;
|
||||
this.updateSensitivity(false);
|
||||
|
||||
- if (shouldSpin)
|
||||
- this.startSpinning();
|
||||
+ if (this._queryingService) {
|
||||
+ if (shouldSpin)
|
||||
+ this.startSpinning();
|
||||
|
||||
- if (this._queryingService)
|
||||
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
||||
- else
|
||||
+ } else {
|
||||
this._preemptiveAnswer = this._entry.text;
|
||||
+ }
|
||||
|
||||
this.emit('next');
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 56360c872e01b0554b4d8b53dddba5407d4e889b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 5 Oct 2015 15:26:18 -0400
|
||||
Subject: [PATCH 3/3] authPrompt: stop accepting preemptive answer if user
|
||||
stops typing
|
||||
|
||||
We only want to allow the user to type the preemptive password in
|
||||
one smooth motion. If they start to type, and then stop typing,
|
||||
we should discard their preemptive password as expired.
|
||||
|
||||
Typing ahead the password is just a convenience for users who don't
|
||||
want to manually lift the shift before typing their passwords, after
|
||||
all.
|
||||
---
|
||||
js/gdm/authPrompt.js | 37 ++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index c5643d046..84c608b2f 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -1,7 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported AuthPrompt */
|
||||
|
||||
-const { Clutter, GLib, GObject, Pango, Shell, St } = imports.gi;
|
||||
+const { Clutter, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
const Batch = imports.gdm.batch;
|
||||
@@ -63,6 +63,8 @@ var AuthPrompt = GObject.registerClass({
|
||||
this._defaultButtonWellActor = null;
|
||||
this._cancelledRetries = 0;
|
||||
|
||||
+ this._idleMonitor = Meta.IdleMonitor.get_core();
|
||||
+
|
||||
let reauthenticationOnly;
|
||||
if (this._mode == AuthPromptMode.UNLOCK_ONLY)
|
||||
reauthenticationOnly = true;
|
||||
@@ -119,6 +121,11 @@ var AuthPrompt = GObject.registerClass({
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+ }
|
||||
+
|
||||
this._userVerifier.destroy();
|
||||
this._userVerifier = null;
|
||||
}
|
||||
@@ -250,6 +257,11 @@ var AuthPrompt = GObject.registerClass({
|
||||
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
||||
} else {
|
||||
this._preemptiveAnswer = this._entry.text;
|
||||
+
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
this.emit('next');
|
||||
@@ -429,6 +441,11 @@ var AuthPrompt = GObject.registerClass({
|
||||
}
|
||||
|
||||
setQuestion(question) {
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+ }
|
||||
+
|
||||
this._entry.hint_text = question;
|
||||
|
||||
this._entry.show();
|
||||
@@ -530,6 +547,19 @@ var AuthPrompt = GObject.registerClass({
|
||||
this._updateEntry(false);
|
||||
}
|
||||
|
||||
+ _onUserStoppedTypePreemptiveAnswer() {
|
||||
+ if (!this._preemptiveAnswerWatchId ||
|
||||
+ this._preemptiveAnswer ||
|
||||
+ this._queryingService)
|
||||
+ return;
|
||||
+
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+
|
||||
+ this._entry.text = '';
|
||||
+ this.updateSensitivity(false);
|
||||
+ }
|
||||
+
|
||||
reset() {
|
||||
let oldStatus = this.verificationStatus;
|
||||
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
||||
@@ -537,6 +567,11 @@ var AuthPrompt = GObject.registerClass({
|
||||
this.cancelButton.can_focus = this._hasCancelButton;
|
||||
this._preemptiveAnswer = null;
|
||||
|
||||
+ if (this._preemptiveAnswerWatchId)
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = this._idleMonitor.add_idle_watch(500,
|
||||
+ this._onUserStoppedTypePreemptiveAnswer.bind(this));
|
||||
+
|
||||
if (this._userVerifier)
|
||||
this._userVerifier.cancel();
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
114
SOURCES/enforce-smartcard-at-unlock.patch
Normal file
114
SOURCES/enforce-smartcard-at-unlock.patch
Normal file
@ -0,0 +1,114 @@
|
||||
From d2c12a372ea0ccbe6ba682c553d8b83b3253169f Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 28 Sep 2015 10:57:02 -0400
|
||||
Subject: [PATCH 1/3] smartcardManager: add way to detect if user logged using
|
||||
(any) token
|
||||
|
||||
If a user uses a token at login time, we need to make sure they continue
|
||||
to use the token at unlock time.
|
||||
|
||||
As a prerequisite for addressing that problem we need to know up front
|
||||
if a user logged in with a token at all.
|
||||
|
||||
This commit adds the necessary api to detect that case.
|
||||
---
|
||||
js/misc/smartcardManager.js | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/js/misc/smartcardManager.js b/js/misc/smartcardManager.js
|
||||
index d9b6ff474..26f9f5aaa 100644
|
||||
--- a/js/misc/smartcardManager.js
|
||||
+++ b/js/misc/smartcardManager.js
|
||||
@@ -111,5 +111,12 @@ var SmartcardManager = class {
|
||||
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+ loggedInWithToken() {
|
||||
+ if (this._loginToken)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
};
|
||||
Signals.addSignalMethods(SmartcardManager.prototype);
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 98393eef884edc9e685b712c71356751acdd552f Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 28 Sep 2015 19:56:53 -0400
|
||||
Subject: [PATCH 2/3] gdm: only unlock with smartcard, if smartcard used for
|
||||
login
|
||||
|
||||
If a smartcard is used for login, we need to make sure the smartcard
|
||||
gets used for unlock, too.
|
||||
---
|
||||
js/gdm/util.js | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
||||
index 72561daab..6b92e3564 100644
|
||||
--- a/js/gdm/util.js
|
||||
+++ b/js/gdm/util.js
|
||||
@@ -149,7 +149,6 @@ var ShellUserVerifier = class {
|
||||
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
||||
this._settings.connect('changed',
|
||||
this._updateDefaultService.bind(this));
|
||||
- this._updateDefaultService();
|
||||
|
||||
this._fprintManager = new FprintManagerProxy(Gio.DBus.system,
|
||||
'net.reactivated.Fprint',
|
||||
@@ -166,6 +165,8 @@ var ShellUserVerifier = class {
|
||||
this.smartcardDetected = false;
|
||||
this._checkForSmartcard();
|
||||
|
||||
+ this._updateDefaultService();
|
||||
+
|
||||
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
||||
this._checkForSmartcard.bind(this));
|
||||
this._smartcardRemovedId = this._smartcardManager.connect('smartcard-removed',
|
||||
@@ -527,7 +528,9 @@ var ShellUserVerifier = class {
|
||||
}
|
||||
|
||||
_updateDefaultService() {
|
||||
- if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
+ if (this._smartcardManager.loggedInWithToken())
|
||||
+ this._defaultService = SMARTCARD_SERVICE_NAME;
|
||||
+ else if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
this._defaultService = PASSWORD_SERVICE_NAME;
|
||||
else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
|
||||
this._defaultService = SMARTCARD_SERVICE_NAME;
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 57ca969a0af6f65e71dc1158163b9c826bdb7079 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 28 Sep 2015 19:57:36 -0400
|
||||
Subject: [PATCH 3/3] gdm: update default service when smartcard inserted
|
||||
|
||||
Early on at start up we may not know if a smartcard is
|
||||
available. Make sure we reupdate the default service
|
||||
after we get a smartcard insertion event.
|
||||
---
|
||||
js/gdm/util.js | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
||||
index 6b92e3564..e62114cb1 100644
|
||||
--- a/js/gdm/util.js
|
||||
+++ b/js/gdm/util.js
|
||||
@@ -420,6 +420,8 @@ var ShellUserVerifier = class {
|
||||
else if (this._preemptingService == SMARTCARD_SERVICE_NAME)
|
||||
this._preemptingService = null;
|
||||
|
||||
+ this._updateDefaultService();
|
||||
+
|
||||
this.emit('smartcard-status-changed');
|
||||
}
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
184
SOURCES/fix-some-js-warnings.patch
Normal file
184
SOURCES/fix-some-js-warnings.patch
Normal file
@ -0,0 +1,184 @@
|
||||
From 05a5f4641c8ad6337ccb46e63abcaf27dd7eb852 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 9 Jun 2020 19:42:21 +0200
|
||||
Subject: [PATCH 1/4] popupMenu: Guard against non-menu-item children
|
||||
|
||||
This avoid a harmless but annoying warning.
|
||||
---
|
||||
js/ui/popupMenu.js | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
|
||||
index 11528560d..144c600d7 100644
|
||||
--- a/js/ui/popupMenu.js
|
||||
+++ b/js/ui/popupMenu.js
|
||||
@@ -773,7 +773,8 @@ var PopupMenuBase = class {
|
||||
}
|
||||
|
||||
_getMenuItems() {
|
||||
- return this.box.get_children().map(a => a._delegate).filter(item => {
|
||||
+ const children = this.box.get_children().filter(a => a._delegate !== undefined);
|
||||
+ return children.map(a => a._delegate).filter(item => {
|
||||
return item instanceof PopupBaseMenuItem || item instanceof PopupMenuSection;
|
||||
});
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From e5b2c2b3cfd0443fa83fd1f6f56f65fefa5186c3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 9 Jun 2020 19:48:06 +0200
|
||||
Subject: [PATCH 2/4] st/shadow: Check pipeline when painting
|
||||
|
||||
We shouldn't simply assume that st_shadow_helper_update() has been
|
||||
called before paint() or that the pipeline was created successfully.
|
||||
---
|
||||
src/st/st-shadow.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c
|
||||
index ab3eaa856..d53808698 100644
|
||||
--- a/src/st/st-shadow.c
|
||||
+++ b/src/st/st-shadow.c
|
||||
@@ -296,9 +296,10 @@ st_shadow_helper_paint (StShadowHelper *helper,
|
||||
ClutterActorBox *actor_box,
|
||||
guint8 paint_opacity)
|
||||
{
|
||||
- _st_paint_shadow_with_opacity (helper->shadow,
|
||||
- framebuffer,
|
||||
- helper->pipeline,
|
||||
- actor_box,
|
||||
- paint_opacity);
|
||||
+ if (helper->pipeline != NULL)
|
||||
+ _st_paint_shadow_with_opacity (helper->shadow,
|
||||
+ framebuffer,
|
||||
+ helper->pipeline,
|
||||
+ actor_box,
|
||||
+ paint_opacity);
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 0f7656d85af51339d14217b9a673442a18df3de8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 8 Jul 2021 19:10:05 +0200
|
||||
Subject: [PATCH 3/4] messageTray: Always remove destroyed banners
|
||||
|
||||
Currently we only mark the banner as removed if it is destroyed
|
||||
while in SHOWN or SHOWING state, but not if we're already HIDING
|
||||
(for example in response to `NotificationBanner::done-displaying`).
|
||||
|
||||
If this happens, we'll try to destroy the notification again at
|
||||
the end of the transition, which leads to (harmless but annoying)
|
||||
log spam since Notifications were turned into GObjects (that are
|
||||
disposed when destroyed).
|
||||
|
||||
Address this by always marking destroyed banners as removed, while
|
||||
still only triggering a state update while shown (or in the process
|
||||
of being shown).
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4457
|
||||
---
|
||||
js/ui/messageTray.js | 23 +++++++++++++----------
|
||||
1 file changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
|
||||
index 1dab00a70..ccf56fc5b 100644
|
||||
--- a/js/ui/messageTray.js
|
||||
+++ b/js/ui/messageTray.js
|
||||
@@ -1022,17 +1022,20 @@ var MessageTray = GObject.registerClass({
|
||||
}
|
||||
|
||||
_onNotificationDestroy(notification) {
|
||||
- if (this._notification == notification && (this._notificationState == State.SHOWN || this._notificationState == State.SHOWING)) {
|
||||
- this._updateNotificationTimeout(0);
|
||||
- this._notificationRemoved = true;
|
||||
- this._updateState();
|
||||
- return;
|
||||
- }
|
||||
+ this._notificationRemoved = this._notification === notification;
|
||||
|
||||
- let index = this._notificationQueue.indexOf(notification);
|
||||
- if (index != -1) {
|
||||
- this._notificationQueue.splice(index, 1);
|
||||
- this.emit('queue-changed');
|
||||
+ if (this._notificationRemoved) {
|
||||
+ if (this._notificationState === State.SHOWN ||
|
||||
+ this._notificationState === State.SHOWING) {
|
||||
+ this._updateNotificationTimeout(0);
|
||||
+ this._updateState();
|
||||
+ }
|
||||
+ } else {
|
||||
+ const index = this._notificationQueue.indexOf(notification);
|
||||
+ if (index !== -1) {
|
||||
+ this._notificationQueue.splice(index, 1);
|
||||
+ this.emit('queue-changed');
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 8652836521d0729ce230268c7b448cdb393d5b47 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 8 Jul 2021 19:23:38 +0200
|
||||
Subject: [PATCH 4/4] shellInfo: Don't destroy source on undo
|
||||
|
||||
Destroying the source from an action callback will result in the
|
||||
notification being destroyed twice:
|
||||
|
||||
- source.destroy() destroys all its notifications
|
||||
|
||||
- a notification destroys itself after an action
|
||||
was activated
|
||||
|
||||
This results in unwanted log spam when attempting to dispose the
|
||||
notification for a second time.
|
||||
|
||||
There is actually no good reason for destroying the source explicitly,
|
||||
as sources already self-destruct with their last notification.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4457
|
||||
---
|
||||
js/ui/overview.js | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
diff --git a/js/ui/overview.js b/js/ui/overview.js
|
||||
index 529779ea8..c71b11389 100644
|
||||
--- a/js/ui/overview.js
|
||||
+++ b/js/ui/overview.js
|
||||
@@ -25,16 +25,6 @@ var OVERVIEW_ACTIVATION_TIMEOUT = 0.5;
|
||||
var ShellInfo = class {
|
||||
constructor() {
|
||||
this._source = null;
|
||||
- this._undoCallback = null;
|
||||
- }
|
||||
-
|
||||
- _onUndoClicked() {
|
||||
- if (this._undoCallback)
|
||||
- this._undoCallback();
|
||||
- this._undoCallback = null;
|
||||
-
|
||||
- if (this._source)
|
||||
- this._source.destroy();
|
||||
}
|
||||
|
||||
setMessage(text, options) {
|
||||
@@ -64,9 +54,8 @@ var ShellInfo = class {
|
||||
notification.update(text, null, { clear: true });
|
||||
}
|
||||
|
||||
- this._undoCallback = undoCallback;
|
||||
if (undoCallback)
|
||||
- notification.addAction(_("Undo"), this._onUndoClicked.bind(this));
|
||||
+ notification.addAction(_('Undo'), () => undoCallback());
|
||||
|
||||
this._source.showNotification(notification);
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
244
SOURCES/gdm-networking.patch
Normal file
244
SOURCES/gdm-networking.patch
Normal file
@ -0,0 +1,244 @@
|
||||
From 1eb9fef5e18d56bbe7a6422303ff8e31fe677759 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Mon, 7 Jun 2021 17:49:57 +0200
|
||||
Subject: [PATCH 1/5] status/network: Disable modem connection when windows
|
||||
aren't allowed
|
||||
|
||||
The item launches the corresponding Settings panel when activated, which
|
||||
doesn't work when windows are disabled by the session mode. Rather than
|
||||
failing silently, turn the item insensitive.
|
||||
---
|
||||
js/ui/status/network.js | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
||||
index 5487fde40..6e7878d20 100644
|
||||
--- a/js/ui/status/network.js
|
||||
+++ b/js/ui/status/network.js
|
||||
@@ -563,6 +563,10 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
||||
this._iconChanged();
|
||||
});
|
||||
}
|
||||
+
|
||||
+ this._sessionUpdatedId =
|
||||
+ Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||
+ this._sessionUpdated();
|
||||
}
|
||||
|
||||
get category() {
|
||||
@@ -573,6 +577,10 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
||||
launchSettingsPanel('network', 'connect-3g', this._device.get_path());
|
||||
}
|
||||
|
||||
+ _sessionUpdated() {
|
||||
+ this._autoConnectItem.sensitive = Main.sessionMode.hasWindows;
|
||||
+ }
|
||||
+
|
||||
destroy() {
|
||||
if (this._operatorNameId) {
|
||||
this._mobileDevice.disconnect(this._operatorNameId);
|
||||
@@ -582,6 +590,10 @@ var NMDeviceModem = class extends NMConnectionDevice {
|
||||
this._mobileDevice.disconnect(this._signalQualityId);
|
||||
this._signalQualityId = 0;
|
||||
}
|
||||
+ if (this._sessionUpdatedId) {
|
||||
+ Main.sessionMode.disconnect(this._sessionUpdatedId);
|
||||
+ this._sessionUpdatedId = 0;
|
||||
+ }
|
||||
|
||||
super.destroy();
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 0288558940c0090dca0873daeaa33e8d20cdbb0f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Mon, 7 Jun 2021 18:28:32 +0200
|
||||
Subject: [PATCH 2/5] status/network: Only list wifi networks that can be
|
||||
activated
|
||||
|
||||
Setting up a connection for an Enterprise WPA(2) encrypted wireless
|
||||
network requires Settings. That's not available when windows are
|
||||
disabled via the session mode, so filter out affected entries.
|
||||
---
|
||||
js/ui/status/network.js | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
||||
index 6e7878d20..36915dbc1 100644
|
||||
--- a/js/ui/status/network.js
|
||||
+++ b/js/ui/status/network.js
|
||||
@@ -1,6 +1,6 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported NMApplet */
|
||||
-const { Clutter, Gio, GLib, GObject, NM, St } = imports.gi;
|
||||
+const { Clutter, Gio, GLib, GObject, Meta, NM, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
@@ -816,6 +816,11 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
||||
GLib.source_remove(this._scanTimeoutId);
|
||||
this._scanTimeoutId = 0;
|
||||
}
|
||||
+
|
||||
+ if (this._syncVisibilityId) {
|
||||
+ Meta.later_remove(this._syncVisibilityId);
|
||||
+ this._syncVisibilityId = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
_onScanTimeout() {
|
||||
@@ -1149,9 +1154,32 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
||||
this._itemBox.insert_child_at_index(network.item, newPos);
|
||||
}
|
||||
|
||||
+ this._queueSyncItemVisibility();
|
||||
this._syncView();
|
||||
}
|
||||
|
||||
+ _queueSyncItemVisibility() {
|
||||
+ if (this._syncVisibilityId)
|
||||
+ return;
|
||||
+
|
||||
+ this._syncVisibilityId = Meta.later_add(
|
||||
+ Meta.LaterType.BEFORE_REDRAW,
|
||||
+ () => {
|
||||
+ const { hasWindows } = Main.sessionMode;
|
||||
+ const { WPA2_ENT, WPA_ENT } = NMAccessPointSecurity;
|
||||
+
|
||||
+ for (const network of this._networks) {
|
||||
+ const [firstAp] = network.accessPoints;
|
||||
+ network.item.visible =
|
||||
+ hasWindows ||
|
||||
+ network.connections.length > 0 ||
|
||||
+ (firstAp._secType !== WPA2_ENT && firstAp._secType !== WPA_ENT);
|
||||
+ }
|
||||
+ this._syncVisibilityId = 0;
|
||||
+ return GLib.SOURCE_REMOVE;
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
_accessPointRemoved(device, accessPoint) {
|
||||
let res = this._findExistingNetwork(accessPoint);
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From eb9620bc134ef8e7732f5e64b93ac9ea5bba2092 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 8 Jun 2021 00:17:48 +0200
|
||||
Subject: [PATCH 3/5] status/network: Consider network-control action
|
||||
|
||||
NetworkManager installs a `network-control` polkit action that can
|
||||
be used to disallow network configuration, except that we happily
|
||||
ignore it. Add it to the conditions that turn a network section
|
||||
insensitive.
|
||||
---
|
||||
js/ui/status/network.js | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
||||
index 36915dbc1..e238fdfe7 100644
|
||||
--- a/js/ui/status/network.js
|
||||
+++ b/js/ui/status/network.js
|
||||
@@ -1,6 +1,6 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported NMApplet */
|
||||
-const { Clutter, Gio, GLib, GObject, Meta, NM, St } = imports.gi;
|
||||
+const { Clutter, Gio, GLib, GObject, Meta, NM, Polkit, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
@@ -1750,11 +1750,21 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
this._client.connect('connection-removed', this._connectionRemoved.bind(this));
|
||||
|
||||
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||
+ try {
|
||||
+ this._configPermission = await Polkit.Permission.new(
|
||||
+ 'org.freedesktop.NetworkManager.network-control', null, null);
|
||||
+ } catch (e) {
|
||||
+ log('No permission to control network connections: %s'.format(e.toString()));
|
||||
+ this._configPermission = null;
|
||||
+ }
|
||||
this._sessionUpdated();
|
||||
}
|
||||
|
||||
_sessionUpdated() {
|
||||
- let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
|
||||
+ const sensitive =
|
||||
+ !Main.sessionMode.isLocked &&
|
||||
+ !Main.sessionMode.isGreeter &&
|
||||
+ this._configPermission && this._configPermission.allowed;
|
||||
this.menu.setSensitive(sensitive);
|
||||
}
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 2392810bb7e3d48fb33c4d6de39f5be2eca58988 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 10 Jun 2021 23:12:27 +0200
|
||||
Subject: [PATCH 4/5] sessionMode: Enable networkAgent on login screen
|
||||
|
||||
We will soon enable the network sections in the status menu on the
|
||||
login screen, so enable the network agent to handle authentication
|
||||
requests (like wifi/VPN passwords).
|
||||
---
|
||||
js/ui/sessionMode.js | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
|
||||
index aa69fd115..4d4fb2444 100644
|
||||
--- a/js/ui/sessionMode.js
|
||||
+++ b/js/ui/sessionMode.js
|
||||
@@ -47,7 +47,9 @@ const _modes = {
|
||||
isGreeter: true,
|
||||
isPrimary: true,
|
||||
unlockDialog: imports.gdm.loginDialog.LoginDialog,
|
||||
- components: ['polkitAgent'],
|
||||
+ components: Config.HAVE_NETWORKMANAGER
|
||||
+ ? ['networkAgent', 'polkitAgent']
|
||||
+ : ['polkitAgent'],
|
||||
panel: {
|
||||
left: [],
|
||||
center: ['dateMenu'],
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From b5fedfd846f271bf28be02ce5cd8517af7a3bc0a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 8 Jun 2021 00:19:26 +0200
|
||||
Subject: [PATCH 5/5] status/network: Do not disable on login screen
|
||||
|
||||
We currently disable all network items on both the lock- and login
|
||||
screen. While it makes sense to be very restrictive on the lock screen,
|
||||
there are some (fringe) use cases for being more permissive on the
|
||||
login screen (like remote home directories only accessible via VPN).
|
||||
|
||||
There's precedence with the power-off/restart actions to be less
|
||||
restrictive on the login screen, and since we started respecting
|
||||
the `network-control` polkit action, it's possible to restore the
|
||||
old behavior if desired.
|
||||
---
|
||||
js/ui/status/network.js | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
||||
index e238fdfe7..f510f90ae 100644
|
||||
--- a/js/ui/status/network.js
|
||||
+++ b/js/ui/status/network.js
|
||||
@@ -1763,7 +1763,6 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
_sessionUpdated() {
|
||||
const sensitive =
|
||||
!Main.sessionMode.isLocked &&
|
||||
- !Main.sessionMode.isGreeter &&
|
||||
this._configPermission && this._configPermission.allowed;
|
||||
this.menu.setSensitive(sensitive);
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
38
SOURCES/gnome-shell-favourite-apps-firefox.patch
Normal file
38
SOURCES/gnome-shell-favourite-apps-firefox.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From a2e62e671260576d23f18c22c10a48ac4a8504af Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Wed, 17 Sep 2014 07:11:12 +0200
|
||||
Subject: [PATCH] Replace Web with Firefox in default favorites
|
||||
|
||||
---
|
||||
data/org.gnome.shell.gschema.xml.in | 2 +-
|
||||
js/ui/appFavorites.js | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
|
||||
index cd6a2356d..b8a13a9cc 100644
|
||||
--- a/data/org.gnome.shell.gschema.xml.in
|
||||
+++ b/data/org.gnome.shell.gschema.xml.in
|
||||
@@ -50,7 +50,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
- <default>[ 'org.gnome.Epiphany.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
+ <default>[ 'firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js
|
||||
index a876727ed..24ce16f81 100644
|
||||
--- a/js/ui/appFavorites.js
|
||||
+++ b/js/ui/appFavorites.js
|
||||
@@ -52,6 +52,7 @@ const RENAMED_DESKTOP_IDS = {
|
||||
'gnotski.desktop': 'org.gnome.Klotski.desktop',
|
||||
'gtali.desktop': 'org.gnome.Tali.desktop',
|
||||
'iagno.desktop': 'org.gnome.Reversi.desktop',
|
||||
+ 'mozilla-firefox.desktop': 'firefox.desktop',
|
||||
'nautilus.desktop': 'org.gnome.Nautilus.desktop',
|
||||
'org.gnome.gnome-2048.desktop': 'org.gnome.TwentyFortyEight.desktop',
|
||||
'org.gnome.taquin.desktop': 'org.gnome.Taquin.desktop',
|
||||
--
|
||||
2.30.1
|
||||
|
25
SOURCES/gnome-shell-favourite-apps-terminal.patch
Normal file
25
SOURCES/gnome-shell-favourite-apps-terminal.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 1e699b55f3dc84b2ddbc5acd03424240eddbe06c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 9 Mar 2017 14:44:32 +0100
|
||||
Subject: [PATCH 3/3] appFavorites: Add terminal
|
||||
|
||||
---
|
||||
data/org.gnome.shell.gschema.xml.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
|
||||
index 35ddaf4a9..d5ea1e35f 100644
|
||||
--- a/data/org.gnome.shell.gschema.xml.in
|
||||
+++ b/data/org.gnome.shell.gschema.xml.in
|
||||
@@ -50,7 +50,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
- <default>[ 'firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop' ]</default>
|
||||
+ <default>[ 'firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop', 'org.gnome.Terminal.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
--
|
||||
2.31.1
|
||||
|
26
SOURCES/gnome-shell-favourite-apps-yelp.patch
Normal file
26
SOURCES/gnome-shell-favourite-apps-yelp.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 4e21aed64d48ddd22e40a3605084379b2fa7f1cb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 9 Mar 2017 14:44:03 +0100
|
||||
Subject: [PATCH 2/3] Add 'yelp' to default favorites
|
||||
|
||||
Help should be easily available, so add it to the default favorites.
|
||||
---
|
||||
data/org.gnome.shell.gschema.xml.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
|
||||
index b8a13a9cc..35ddaf4a9 100644
|
||||
--- a/data/org.gnome.shell.gschema.xml.in
|
||||
+++ b/data/org.gnome.shell.gschema.xml.in
|
||||
@@ -50,7 +50,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
- <default>[ 'firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
+ <default>[ 'firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
--
|
||||
2.31.1
|
||||
|
487
SOURCES/support-choicelist-extension.patch
Normal file
487
SOURCES/support-choicelist-extension.patch
Normal file
@ -0,0 +1,487 @@
|
||||
From 0994cc8fe87cfc9d78221e2e6df074257124a81d Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 18 Jul 2017 12:58:14 -0400
|
||||
Subject: [PATCH 1/2] gdm: add AuthList control
|
||||
|
||||
Ultimately, we want to add support for GDM's new ChoiceList
|
||||
PAM extension. That extension allows PAM modules to present
|
||||
a list of choices to the user. Before we can support that
|
||||
extension, however, we need to have a list control in the
|
||||
login-screen/unlock screen. This commit adds that control.
|
||||
|
||||
For the most part, it's a copy-and-paste of the gdm userlist,
|
||||
but with less features. It lacks API specific to the users,
|
||||
lacks the built in timed login indicator, etc. It does feature
|
||||
a label heading.
|
||||
---
|
||||
js/gdm/authList.js | 193 ++++++++++++++++++++++++++++++++++
|
||||
js/js-resources.gresource.xml | 1 +
|
||||
2 files changed, 194 insertions(+)
|
||||
create mode 100644 js/gdm/authList.js
|
||||
|
||||
diff --git a/js/gdm/authList.js b/js/gdm/authList.js
|
||||
new file mode 100644
|
||||
index 000000000..e4475dc20
|
||||
--- /dev/null
|
||||
+++ b/js/gdm/authList.js
|
||||
@@ -0,0 +1,193 @@
|
||||
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
+/*
|
||||
+ * Copyright 2017 Red Hat, Inc
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2, or (at your option)
|
||||
+ * any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+/* exported AuthList */
|
||||
+
|
||||
+const { Clutter, GObject, Meta, St } = imports.gi;
|
||||
+
|
||||
+const SCROLL_ANIMATION_TIME = 500;
|
||||
+
|
||||
+const AuthListItem = GObject.registerClass({
|
||||
+ Signals: { 'activate': {} },
|
||||
+}, class AuthListItem extends St.Button {
|
||||
+ _init(key, text) {
|
||||
+ this.key = key;
|
||||
+ const label = new St.Label({
|
||||
+ style_class: 'auth-list-item-label',
|
||||
+ y_align: Clutter.ActorAlign.CENTER,
|
||||
+ });
|
||||
+ label.text = text;
|
||||
+
|
||||
+ super._init({
|
||||
+ style_class: 'login-dialog-user-list-item',
|
||||
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||
+ can_focus: true,
|
||||
+ child: label,
|
||||
+ reactive: true,
|
||||
+ x_align: St.Align.START,
|
||||
+ x_fill: true,
|
||||
+ });
|
||||
+
|
||||
+ this.connect('key-focus-in',
|
||||
+ () => this._setSelected(true));
|
||||
+ this.connect('key-focus-out',
|
||||
+ () => this._setSelected(false));
|
||||
+ this.connect('notify::hover',
|
||||
+ () => this._setSelected(this.hover));
|
||||
+
|
||||
+ this.connect('clicked', this._onClicked.bind(this));
|
||||
+ }
|
||||
+
|
||||
+ _onClicked() {
|
||||
+ this.emit('activate');
|
||||
+ }
|
||||
+
|
||||
+ _setSelected(selected) {
|
||||
+ if (selected) {
|
||||
+ this.add_style_pseudo_class('selected');
|
||||
+ this.grab_key_focus();
|
||||
+ } else {
|
||||
+ this.remove_style_pseudo_class('selected');
|
||||
+ }
|
||||
+ }
|
||||
+});
|
||||
+
|
||||
+var AuthList = GObject.registerClass({
|
||||
+ Signals: {
|
||||
+ 'activate': { param_types: [GObject.TYPE_STRING] },
|
||||
+ 'item-added': { param_types: [AuthListItem.$gtype] },
|
||||
+ },
|
||||
+}, class AuthList extends St.BoxLayout {
|
||||
+ _init() {
|
||||
+ super._init({
|
||||
+ vertical: true,
|
||||
+ style_class: 'login-dialog-auth-list-layout',
|
||||
+ });
|
||||
+
|
||||
+ this.label = new St.Label({ style_class: 'prompt-dialog-headline' });
|
||||
+ this.add_child(this.label);
|
||||
+
|
||||
+ this._scrollView = new St.ScrollView({
|
||||
+ style_class: 'login-dialog-user-list-view',
|
||||
+ });
|
||||
+ this._scrollView.set_policy(
|
||||
+ St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
||||
+ this.add_child(this._scrollView);
|
||||
+
|
||||
+ this._box = new St.BoxLayout({
|
||||
+ vertical: true,
|
||||
+ style_class: 'login-dialog-user-list',
|
||||
+ pseudo_class: 'expanded',
|
||||
+ });
|
||||
+
|
||||
+ this._scrollView.add_actor(this._box);
|
||||
+ this._items = {};
|
||||
+
|
||||
+ this.connect('key-focus-in', this._moveFocusToItems.bind(this));
|
||||
+ }
|
||||
+
|
||||
+ _moveFocusToItems() {
|
||||
+ let hasItems = Object.keys(this._items).length > 0;
|
||||
+
|
||||
+ if (!hasItems)
|
||||
+ return;
|
||||
+
|
||||
+ if (global.stage.get_key_focus() !== this)
|
||||
+ return;
|
||||
+
|
||||
+ let focusSet = this.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
|
||||
+ if (!focusSet) {
|
||||
+ Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
+ this._moveFocusToItems();
|
||||
+ return false;
|
||||
+ });
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ _onItemActivated(activatedItem) {
|
||||
+ this.emit('activate', activatedItem.key);
|
||||
+ }
|
||||
+
|
||||
+ scrollToItem(item) {
|
||||
+ let box = item.get_allocation_box();
|
||||
+
|
||||
+ let adjustment = this._scrollView.get_vscroll_bar().get_adjustment();
|
||||
+
|
||||
+ let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
|
||||
+ adjustment.ease(value, {
|
||||
+ duration: SCROLL_ANIMATION_TIME,
|
||||
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ jumpToItem(item) {
|
||||
+ let box = item.get_allocation_box();
|
||||
+
|
||||
+ let adjustment = this._scrollView.get_vscroll_bar().get_adjustment();
|
||||
+
|
||||
+ let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
|
||||
+
|
||||
+ adjustment.set_value(value);
|
||||
+ }
|
||||
+
|
||||
+ getItem(key) {
|
||||
+ let item = this._items[key];
|
||||
+
|
||||
+ if (!item)
|
||||
+ return null;
|
||||
+
|
||||
+ return item;
|
||||
+ }
|
||||
+
|
||||
+ addItem(key, text) {
|
||||
+ this.removeItem(key);
|
||||
+
|
||||
+ let item = new AuthListItem(key, text);
|
||||
+ this._box.add(item, { x_fill: true });
|
||||
+
|
||||
+ this._items[key] = item;
|
||||
+
|
||||
+ item.connect('activate', this._onItemActivated.bind(this));
|
||||
+
|
||||
+ // Try to keep the focused item front-and-center
|
||||
+ item.connect('key-focus-in', () => this.scrollToItem(item));
|
||||
+
|
||||
+ this._moveFocusToItems();
|
||||
+
|
||||
+ this.emit('item-added', item);
|
||||
+ }
|
||||
+
|
||||
+ removeItem(key) {
|
||||
+ let item = this._items[key];
|
||||
+
|
||||
+ if (!item)
|
||||
+ return;
|
||||
+
|
||||
+ item.destroy();
|
||||
+ delete this._items[key];
|
||||
+ }
|
||||
+
|
||||
+ numItems() {
|
||||
+ return Object.keys(this._items).length;
|
||||
+ }
|
||||
+
|
||||
+ clear() {
|
||||
+ this.label.text = '';
|
||||
+ this._box.destroy_all_children();
|
||||
+ this._items = {};
|
||||
+ }
|
||||
+});
|
||||
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
|
||||
index e65e0e9cf..b2c603a55 100644
|
||||
--- a/js/js-resources.gresource.xml
|
||||
+++ b/js/js-resources.gresource.xml
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gnome/shell">
|
||||
+ <file>gdm/authList.js</file>
|
||||
<file>gdm/authPrompt.js</file>
|
||||
<file>gdm/batch.js</file>
|
||||
<file>gdm/loginDialog.js</file>
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 79c8beffbdabc7d0948bb7335f67ada441e68b4e Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 17 Jul 2017 16:48:03 -0400
|
||||
Subject: [PATCH 2/2] gdmUtil: enable support for GDM's ChoiceList PAM
|
||||
extension
|
||||
|
||||
This commit hooks up support for GDM's ChoiceList PAM extension.
|
||||
---
|
||||
js/gdm/authPrompt.js | 69 +++++++++++++++++++++++++++++++++++++++++++
|
||||
js/gdm/loginDialog.js | 5 ++++
|
||||
js/gdm/util.js | 28 ++++++++++++++++++
|
||||
js/ui/unlockDialog.js | 7 +++++
|
||||
4 files changed, 109 insertions(+)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index 84c608b2f..b25897ea7 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -4,6 +4,7 @@
|
||||
const { Clutter, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
+const AuthList = imports.gdm.authList;
|
||||
const Batch = imports.gdm.batch;
|
||||
const GdmUtil = imports.gdm.util;
|
||||
const OVirt = imports.gdm.oVirt;
|
||||
@@ -75,6 +76,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
|
||||
this._userVerifier.connect('ask-question', this._onAskQuestion.bind(this));
|
||||
this._userVerifier.connect('show-message', this._onShowMessage.bind(this));
|
||||
+ this._userVerifier.connect('show-choice-list', this._onShowChoiceList.bind(this));
|
||||
this._userVerifier.connect('verification-failed', this._onVerificationFailed.bind(this));
|
||||
this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
|
||||
this._userVerifier.connect('reset', this._onReset.bind(this));
|
||||
@@ -107,6 +109,27 @@ var AuthPrompt = GObject.registerClass({
|
||||
capsLockPlaceholder, 'visible',
|
||||
GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN);
|
||||
|
||||
+ this._authList = new AuthList.AuthList();
|
||||
+ this._authList.set({
|
||||
+ x_expand: true,
|
||||
+ x_align: Clutter.ActorAlign.START,
|
||||
+ visible: false,
|
||||
+ });
|
||||
+ this._authList.connect('activate', (list, key) => {
|
||||
+ this._authList.reactive = false;
|
||||
+ this._authList.ease({
|
||||
+ opacity: 0,
|
||||
+ duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
|
||||
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
+ onComplete: () => {
|
||||
+ this._authList.clear();
|
||||
+ this._authList.hide();
|
||||
+ this._userVerifier.selectChoice(this._queryingService, key);
|
||||
+ },
|
||||
+ });
|
||||
+ });
|
||||
+ this.add_child(this._authList);
|
||||
+
|
||||
this._message = new St.Label({
|
||||
opacity: 0,
|
||||
styleClass: 'login-dialog-message',
|
||||
@@ -303,6 +326,20 @@ var AuthPrompt = GObject.registerClass({
|
||||
this.emit('prompted');
|
||||
}
|
||||
|
||||
+ _onShowChoiceList(userVerifier, serviceName, promptMessage, choiceList) {
|
||||
+ if (this._queryingService)
|
||||
+ this.clear();
|
||||
+
|
||||
+ this._queryingService = serviceName;
|
||||
+
|
||||
+ if (this._preemptiveAnswer)
|
||||
+ this._preemptiveAnswer = null;
|
||||
+
|
||||
+ this.setChoiceList(promptMessage, choiceList);
|
||||
+ this.updateSensitivity(true);
|
||||
+ this.emit('prompted');
|
||||
+ }
|
||||
+
|
||||
_onCredentialManagerAuthenticated() {
|
||||
if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED)
|
||||
this.reset();
|
||||
@@ -438,6 +475,8 @@ var AuthPrompt = GObject.registerClass({
|
||||
clear() {
|
||||
this._entry.text = '';
|
||||
this.stopSpinning();
|
||||
+ this._authList.clear();
|
||||
+ this._authList.hide();
|
||||
}
|
||||
|
||||
setQuestion(question) {
|
||||
@@ -448,10 +487,39 @@ var AuthPrompt = GObject.registerClass({
|
||||
|
||||
this._entry.hint_text = question;
|
||||
|
||||
+ this._authList.hide();
|
||||
this._entry.show();
|
||||
this._entry.grab_key_focus();
|
||||
}
|
||||
|
||||
+ _fadeInChoiceList() {
|
||||
+ this._authList.set({
|
||||
+ opacity: 0,
|
||||
+ visible: true,
|
||||
+ reactive: false,
|
||||
+ });
|
||||
+ this._authList.ease({
|
||||
+ opacity: 255,
|
||||
+ duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
|
||||
+ transition: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
+ onComplete: () => (this._authList.reactive = true),
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ setChoiceList(promptMessage, choiceList) {
|
||||
+ this._authList.clear();
|
||||
+ this._authList.label.text = promptMessage;
|
||||
+ for (let key in choiceList) {
|
||||
+ let text = choiceList[key];
|
||||
+ this._authList.addItem(key, text);
|
||||
+ }
|
||||
+
|
||||
+ this._entry.hide();
|
||||
+ if (this._message.text == '')
|
||||
+ this._message.hide();
|
||||
+ this._fadeInChoiceList();
|
||||
+ }
|
||||
+
|
||||
getAnswer() {
|
||||
let text;
|
||||
|
||||
@@ -487,6 +555,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
else
|
||||
this._message.remove_style_class_name('login-dialog-message-hint');
|
||||
|
||||
+ this._message.show();
|
||||
if (message) {
|
||||
this._message.remove_all_transitions();
|
||||
this._message.text = message;
|
||||
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
||||
index d2a82b43d..41dd99646 100644
|
||||
--- a/js/gdm/loginDialog.js
|
||||
+++ b/js/gdm/loginDialog.js
|
||||
@@ -418,6 +418,11 @@ var LoginDialog = GObject.registerClass({
|
||||
this._userManager = AccountsService.UserManager.get_default();
|
||||
this._gdmClient = new Gdm.Client();
|
||||
|
||||
+ try {
|
||||
+ this._gdmClient.set_enabled_extensions([Gdm.UserVerifierChoiceList.interface_info().name]);
|
||||
+ } catch (e) {
|
||||
+ }
|
||||
+
|
||||
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||
|
||||
this._settings.connect('changed::%s'.format(GdmUtil.BANNER_MESSAGE_KEY),
|
||||
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
||||
index e62114cb1..3f327400f 100644
|
||||
--- a/js/gdm/util.js
|
||||
+++ b/js/gdm/util.js
|
||||
@@ -238,6 +238,10 @@ var ShellUserVerifier = class {
|
||||
this._disconnectSignals();
|
||||
this._userVerifier.run_dispose();
|
||||
this._userVerifier = null;
|
||||
+ if (this._userVerifierChoiceList) {
|
||||
+ this._userVerifierChoiceList.run_dispose();
|
||||
+ this._userVerifierChoiceList = null;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,6 +272,10 @@ var ShellUserVerifier = class {
|
||||
}
|
||||
}
|
||||
|
||||
+ selectChoice(serviceName, key) {
|
||||
+ this._userVerifierChoiceList.call_select_choice(serviceName, key, this._cancellable, null);
|
||||
+ }
|
||||
+
|
||||
answerQuery(serviceName, answer) {
|
||||
if (!this.hasPendingMessages) {
|
||||
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
|
||||
@@ -456,6 +464,11 @@ var ShellUserVerifier = class {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (this._client.get_user_verifier_choice_list)
|
||||
+ this._userVerifierChoiceList = this._client.get_user_verifier_choice_list();
|
||||
+ else
|
||||
+ this._userVerifierChoiceList = null;
|
||||
+
|
||||
this.reauthenticating = true;
|
||||
this._connectSignals();
|
||||
this._beginVerification();
|
||||
@@ -474,6 +487,11 @@ var ShellUserVerifier = class {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (this._client.get_user_verifier_choice_list)
|
||||
+ this._userVerifierChoiceList = this._client.get_user_verifier_choice_list();
|
||||
+ else
|
||||
+ this._userVerifierChoiceList = null;
|
||||
+
|
||||
this._connectSignals();
|
||||
this._beginVerification();
|
||||
this._hold.release();
|
||||
@@ -499,6 +517,9 @@ var ShellUserVerifier = class {
|
||||
this._signalIds.push(id);
|
||||
id = this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
|
||||
this._signalIds.push(id);
|
||||
+
|
||||
+ if (this._userVerifierChoiceList)
|
||||
+ this._userVerifierChoiceList.connect('choice-query', this._onChoiceListQuery.bind(this));
|
||||
}
|
||||
|
||||
_disconnectSignals() {
|
||||
@@ -581,6 +602,13 @@ var ShellUserVerifier = class {
|
||||
this._startService(FINGERPRINT_SERVICE_NAME);
|
||||
}
|
||||
|
||||
+ _onChoiceListQuery(client, serviceName, promptMessage, list) {
|
||||
+ if (!this.serviceIsForeground(serviceName))
|
||||
+ return;
|
||||
+
|
||||
+ this.emit('show-choice-list', serviceName, promptMessage, list.deep_unpack());
|
||||
+ }
|
||||
+
|
||||
_onInfo(client, serviceName, info) {
|
||||
if (this.serviceIsForeground(serviceName)) {
|
||||
this._queueMessage(serviceName, info, MessageType.INFO);
|
||||
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
||||
index 8ddae8b03..33fbbdd8e 100644
|
||||
--- a/js/ui/unlockDialog.js
|
||||
+++ b/js/ui/unlockDialog.js
|
||||
@@ -484,6 +484,13 @@ var UnlockDialog = GObject.registerClass({
|
||||
|
||||
this._gdmClient = new Gdm.Client();
|
||||
|
||||
+ try {
|
||||
+ this._gdmClient.set_enabled_extensions([
|
||||
+ Gdm.UserVerifierChoiceList.interface_info().name,
|
||||
+ ]);
|
||||
+ } catch (e) {
|
||||
+ }
|
||||
+
|
||||
this._adjustment = new St.Adjustment({
|
||||
actor: this,
|
||||
lower: 0,
|
||||
--
|
||||
2.31.1
|
||||
|
1602
SPECS/gnome-shell.spec
Normal file
1602
SPECS/gnome-shell.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user