[gnome-shell/wip/lockdown-show-password: 11/11] shellEntry: Don't show "Show Password" menu if entry icon is disabled
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/lockdown-show-password: 11/11] shellEntry: Don't show "Show Password" menu if entry icon is disabled
- Date: Thu, 29 Jul 2021 18:35:27 +0000 (UTC)
commit 5137db9d4bcd2489eaca45399d1f74719ea2a4da
Author: Ray Strode <rstrode redhat com>
Date: Wed Jul 21 14:01:48 2021 -0400
shellEntry: Don't show "Show Password" menu if entry icon is disabled
Right now the Show Password menu is shown unconditionally for password
entries, ignoring the org.gnome.desktop.lockdown disable-show-password
key.
StShellEntry now honors that key for its peek icon, and there's little
reason for the peek icon and the menu to ever be out of sync.
This commit forces the menu and the icon to always be in sync, and
so makes the menu lock down work automatically, too.
js/ui/shellEntry.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index 38f5a836d2..a2010b39e0 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -39,6 +39,10 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
item.connect('activate', this._onPasswordActivated.bind(this));
this.addMenuItem(item);
this._passwordItem = item;
+
+ this._entry.bind_property('show-peek-icon',
+ this._passwordItem, 'visible',
+ GObject.BindingFlags.SYNC_CREATE);
}
open(animate) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]