diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js index 3e049e466..c01e09b82 100644 --- a/js/ui/components/keyring.js +++ b/js/ui/components/keyring.js @@ -76,7 +76,7 @@ class KeyringDialog extends ModalDialog.ModalDialog { can_focus: true, x_expand: true, }); - ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true }); + ShellEntry.addContextMenu(this._passwordEntry); this._passwordEntry.clutter_text.connect('activate', this._onPasswordActivate.bind(this)); this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, { @@ -109,7 +109,7 @@ class KeyringDialog extends ModalDialog.ModalDialog { can_focus: true, x_expand: true, }); - ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true }); + ShellEntry.addContextMenu(this._confirmEntry); this._confirmEntry.clutter_text.connect('activate', this._onConfirmActivate.bind(this)); if (rtl) { layout.attach(this._confirmEntry, 0, row, 1, 1); diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 7b30b4c55..ab7cc88da 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -65,8 +65,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog { secret.entry = new St.PasswordEntry(entryParams); else secret.entry = new St.Entry(entryParams); - ShellEntry.addContextMenu(secret.entry, - { isPassword: secret.password }); + ShellEntry.addContextMenu(secret.entry); if (secret.validate) secret.valid = secret.validate(secret); diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 254676cab..e57b2cdc7 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -96,7 +96,7 @@ var AuthenticationDialog = GObject.registerClass({ can_focus: true, x_expand: true, }); - ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true }); + ShellEntry.addContextMenu(this._passwordEntry); this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this)); this._passwordEntry.bind_property('reactive', this._passwordEntry.clutter_text, 'editable', diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index 79a38bf56..53aed6049 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -41,24 +41,6 @@ var EntryMenu = class extends PopupMenu.PopupMenu { this._passwordItem = item; } - get isPassword() { - return this._passwordItem != null; - } - - set isPassword(v) { - if (v == this.isPassword) - return; - - if (v) { - this._makePasswordItem(); - this._entry.input_purpose = Clutter.InputContentPurpose.PASSWORD; - } else { - this._passwordItem.destroy(); - this._passwordItem = null; - this._entry.input_purpose = Clutter.InputContentPurpose.NORMAL; - } - } - open(animate) { this._updatePasteItem(); this._updateCopyItem(); @@ -144,10 +126,9 @@ function addContextMenu(entry, params) { if (entry.menu) return; - params = Params.parse(params, { isPassword: false, actionMode: Shell.ActionMode.POPUP }); + params = Params.parse(params, { actionMode: Shell.ActionMode.POPUP }); entry.menu = new EntryMenu(entry); - entry.menu.isPassword = params.isPassword; entry._menuManager = new PopupMenu.PopupMenuManager(entry, { actionMode: params.actionMode }); entry._menuManager.addMenu(entry.menu); diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index 7157ad085..ca06873c3 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -332,7 +332,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ x_expand: true, }); this._pimEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this)); - ShellEntry.addContextMenu(this._pimEntry, { isPassword: true }); + ShellEntry.addContextMenu(this._pimEntry); if (rtl) { layout.attach(this._pimEntry, 0, 0, 1, 1); @@ -362,7 +362,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ x_expand: true, }); this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this)); - ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true }); + ShellEntry.addContextMenu(this._passwordEntry); this.setInitialKeyFocus(this._passwordEntry); this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, { animate: true,