[gnome-shell] keyring: Use wiggle effect to inform about new warning message



commit dc578a9e7988d8d04cba68160f525930856199b2
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Mon Jan 20 17:42:09 2020 +0100

    keyring: Use wiggle effect to inform about new warning message
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/942

 js/ui/components/keyring.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
index da7eeec952..46c61ace04 100644
--- a/js/ui/components/keyring.js
+++ b/js/ui/components/keyring.js
@@ -7,8 +7,7 @@ const Dialog = imports.ui.dialog;
 const ModalDialog = imports.ui.modalDialog;
 const ShellEntry = imports.ui.shellEntry;
 const CheckBox = imports.ui.checkBox;
-
-var WORK_SPINNER_ICON_SIZE = 16;
+const Util = imports.misc.util;
 
 var KeyringDialog = GObject.registerClass(
 class KeyringDialog extends ModalDialog.ModalDialog {
@@ -70,6 +69,10 @@ class KeyringDialog extends ModalDialog.ModalDialog {
         this.prompt.connect('notify::warning-visible', () => {
             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);
 
         passwordBox.add_child(warningBox);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]