shellEntry: Remove isPassword property
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/619
This commit is contained in:
parent
b0b8ab6c73
commit
5adbfdb590
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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',
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user