Compare commits

..

1 Commits

Author SHA1 Message Date
Ray Strode
0a935b13b8 shellEntry: Support lockdown of "Show Text" menu in password entries
Some deployments require being able to prevent users from showing
the password they're currently typing.

This commit adds support for that kind of lockdown.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/687
2019-12-21 03:49:22 +01:00
11 changed files with 2298 additions and 2398 deletions

19
NEWS
View File

@@ -1,22 +1,3 @@
3.35.3
======
* Add discrete GPU support for NVidia drivers [Bastien; #1810]
* Fix DND of window previews with tablet devices [Carlos; !897]
* Update pad OSD actions dynamically on mode changes [Carlos; !898]
* st: Add dedicated PasswordEntry widget [Umang; !619]
* Allow stand-alone builds of gnome-extensions tool [Florian; !877]
* extension-tool: Don't treat missing .js handler as error [Chuck; !905]
* Disallow top bar menus without top bar [Florian; #2002]
* Misc. bug fixes and cleanups [Georges, Florian, Robert, Umang; !901,
#789937, !909, !910, !911, !913, !916]
Contributors:
Michael Catanzaro, Chuck, Carlos Garnacho, Umang Jain, Robert Mader,
Florian Müllner, Georges Basile Stavracas Neto, Bastien Nocera
Translators:
Fabio Tomat [fur], Fran Dieguez [gl], Jordi Mas [ca], Daniel Mustieles [es]
3.35.2 3.35.2
====== ======
* Fix unredirection after cancelled animations [Florian; #1788] * Fix unredirection after cancelled animations [Florian; #1788]

View File

@@ -1,17 +1,24 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported addContextMenu CapsLockWarning */ /* exported addContextMenu CapsLockWarning */
const { Clutter, GObject, Pango, Shell, St } = imports.gi; const { Clutter, Gio, GObject, Pango, Shell, St } = imports.gi;
const BoxPointer = imports.ui.boxpointer; const BoxPointer = imports.ui.boxpointer;
const Main = imports.ui.main; const Main = imports.ui.main;
const Params = imports.misc.params; const Params = imports.misc.params;
const PopupMenu = imports.ui.popupMenu; const PopupMenu = imports.ui.popupMenu;
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
const DISABLE_SHOW_PASSWORD_KEY = 'disable-show-password';
var EntryMenu = class extends PopupMenu.PopupMenu { var EntryMenu = class extends PopupMenu.PopupMenu {
constructor(entry) { constructor(entry) {
super(entry, 0, St.Side.TOP); super(entry, 0, St.Side.TOP);
this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
this._lockdownSettings.connect(`changed::${DISABLE_SHOW_PASSWORD_KEY}`,
this._applyLockdownSettings.bind(this));
this._entry = entry; this._entry = entry;
this._clipboard = St.Clipboard.get_default(); this._clipboard = St.Clipboard.get_default();
@@ -39,6 +46,20 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
item.connect('activate', this._onPasswordActivated.bind(this)); item.connect('activate', this._onPasswordActivated.bind(this));
this.addMenuItem(item); this.addMenuItem(item);
this._passwordItem = item; this._passwordItem = item;
this._applyLockdownSettings();
}
_applyLockdownSettings() {
if (!this._passwordItem)
return;
let passwordDisabled = this._lockdownSettings.get_boolean(DISABLE_SHOW_PASSWORD_KEY);
this._passwordItem.visible = !passwordDisabled;
this._entry.show_peek_icon = !passwordDisabled;
if (passwordDisabled)
this._entry.password_visible = false;
} }
open(animate) { open(animate) {

View File

@@ -117,18 +117,11 @@ class InputSourceSwitcher extends SwitcherPopup.SwitcherList {
let box = new St.BoxLayout({ vertical: true }); let box = new St.BoxLayout({ vertical: true });
let bin = new St.Bin({ style_class: 'input-source-switcher-symbol' }); let bin = new St.Bin({ style_class: 'input-source-switcher-symbol' });
let symbol = new St.Label({ let symbol = new St.Label({ text: item.shortName });
text: item.shortName,
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
});
bin.set_child(symbol); bin.set_child(symbol);
box.add_child(bin); box.add_child(bin);
let text = new St.Label({ let text = new St.Label({ text: item.displayName });
text: item.displayName,
x_align: Clutter.ActorAlign.CENTER,
});
box.add_child(text); box.add_child(text);
this.addItem(box, text); this.addItem(box, text);

View File

@@ -86,10 +86,7 @@ class SwitchMonitorSwitcher extends SwitcherPopup.SwitcherList {
icon_size: APP_ICON_SIZE }); icon_size: APP_ICON_SIZE });
box.add_child(icon); box.add_child(icon);
let text = new St.Label({ let text = new St.Label({ text: item.label });
text: item.label,
x_align: Clutter.ActorAlign.CENTER,
});
box.add_child(text); box.add_child(text);
this.addItem(box, text); this.addItem(box, text);

View File

@@ -1315,7 +1315,12 @@ var WindowManager = class {
opacity: 0, opacity: 0,
duration: MINIMIZE_WINDOW_ANIMATION_TIME, duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._minimizeWindowDone(shellwm, actor), onStopped: isFinished => {
if (isFinished)
this._minimizeWindowDone(shellwm, actor);
else
this._minimizeWindowOverwritten(shellwm, actor);
},
}); });
} else { } else {
let xDest, yDest, xScale, yScale; let xDest, yDest, xScale, yScale;

View File

@@ -1,5 +1,5 @@
project('gnome-shell', 'c', project('gnome-shell', 'c',
version: '3.35.3', version: '3.35.2',
meson_version: '>= 0.47.0', meson_version: '>= 0.47.0',
license: 'GPLv2+' license: 'GPLv2+'
) )
@@ -25,7 +25,7 @@ gio_req = '>= 2.56.0'
gi_req = '>= 1.49.1' gi_req = '>= 1.49.1'
gjs_req = '>= 1.63.2' gjs_req = '>= 1.63.2'
gtk_req = '>= 3.15.0' gtk_req = '>= 3.15.0'
mutter_req = '>= 3.35.3' mutter_req = '>= 3.35.2'
polkit_req = '>= 0.100' polkit_req = '>= 0.100'
schemas_req = '>= 3.33.1' schemas_req = '>= 3.33.1'
startup_req = '>= 0.11' startup_req = '>= 0.11'

1369
po/ca.po

File diff suppressed because it is too large Load Diff

1034
po/es.po

File diff suppressed because it is too large Load Diff

875
po/fur.po

File diff suppressed because it is too large Load Diff

1343
po/gl.po

File diff suppressed because it is too large Load Diff

View File

@@ -164,7 +164,11 @@ st_password_entry_init (StPasswordEntry *entry)
NULL); NULL);
st_entry_set_secondary_icon (ST_ENTRY (entry), priv->peek_password_icon); st_entry_set_secondary_icon (ST_ENTRY (entry), priv->peek_password_icon);
priv->show_peek_icon = TRUE; priv->peek_password_icon = g_object_new (ST_TYPE_ICON,
"style-class", "peek-password",
"icon-name", "eye-not-looking-symbolic",
NULL);
st_entry_set_secondary_icon (ST_ENTRY (entry), priv->peek_password_icon);
clutter_text = st_entry_get_clutter_text (ST_ENTRY (entry)); clutter_text = st_entry_get_clutter_text (ST_ENTRY (entry));
clutter_text_set_password_char (CLUTTER_TEXT (clutter_text), BLACK_CIRCLE); clutter_text_set_password_char (CLUTTER_TEXT (clutter_text), BLACK_CIRCLE);