keyring: Use wiggle effect to inform about new warning message

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/942
This commit is contained in:
Jonas Dreßler 2020-01-20 17:42:09 +01:00 committed by Florian Müllner
parent 040c1638ea
commit dc578a9e79

View File

@ -7,8 +7,7 @@ const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog; const ModalDialog = imports.ui.modalDialog;
const ShellEntry = imports.ui.shellEntry; const ShellEntry = imports.ui.shellEntry;
const CheckBox = imports.ui.checkBox; const CheckBox = imports.ui.checkBox;
const Util = imports.misc.util;
var WORK_SPINNER_ICON_SIZE = 16;
var KeyringDialog = GObject.registerClass( var KeyringDialog = GObject.registerClass(
class KeyringDialog extends ModalDialog.ModalDialog { class KeyringDialog extends ModalDialog.ModalDialog {
@ -70,6 +69,10 @@ class KeyringDialog extends ModalDialog.ModalDialog {
this.prompt.connect('notify::warning-visible', () => { this.prompt.connect('notify::warning-visible', () => {
warning.opacity = this.prompt.warning_visible ? 255 : 0; warning.opacity = this.prompt.warning_visible ? 255 : 0;
}); });
this.prompt.connect('notify::warning', () => {
if (this._passwordEntry && warning !== '')
Util.wiggle(this._passwordEntry);
});
warningBox.add_child(warning); warningBox.add_child(warning);
passwordBox.add_child(warningBox); passwordBox.add_child(warningBox);