[gnome-shell/wip/lockdown-show-password: 2/4] shellEntry: Give password menu item text when it's created



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

    shellEntry: Give password menu item text when it's created
    
    At the moment, the "Show Text" menu item is only given its text
    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 e8989ff09a..e01a53e409 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -38,6 +38,7 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
         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]