[gnome-shell/wip/rstrode/rhel-7.9: 22/86] shellEntry: if password menu item a label when it's created




commit efd3bfdc29a93cf77dc44d9a20d877d88737935e
Author: Ray Strode <rstrode redhat com>
Date:   Wed Aug 21 15:48:33 2019 -0400

    shellEntry: if password menu item a label when it's created
    
    At the moment, the "Show Text" menu item is only given its label
    at the time the menu is opened.  This is because the text might
    be "Hide Text" or "Show Text" depending on state, so the text
    is set up lazily.
    
    That behavior means the menu item can't get added after the
    menu is already shown, which is something we'ree going to need
    in the future to support lockdown of the "Show Text" item.
    
    This commit ensures the menu item is given text when it's first
    created, in addition to when the menu is opened.

 js/ui/shellEntry.js | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index 159357eb39..5ce0a40a0c 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -43,6 +43,7 @@ var EntryMenu = new Lang.Class({
         item.connect('activate', this._onPasswordActivated.bind(this));
         this.addMenuItem(item);
         this._passwordItem = item;
+        this._updatePasswordItem();
     },
 
     get isPassword() {


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