js: Add caps-lock Warning to the dialogs

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/619
This commit is contained in:
Umang Jain
2019-12-13 17:06:14 +05:30
parent 10da0e9d8f
commit b4f1fc2305
6 changed files with 37 additions and 2 deletions

View File

@@ -126,6 +126,13 @@ class KeyringDialog extends ModalDialog.ModalDialog {
this.prompt.set_password_actor(this._passwordEntry ? this._passwordEntry.clutter_text : null);
this.prompt.set_confirm_actor(this._confirmEntry ? this._confirmEntry.clutter_text : null);
if (this._passwordEntry || this._confirmEntry) {
let entry = this._passwordEntry ? this._passwordEntry : this._confirmEntry;
this._capsLockWarningLabel = new ShellEntry.CapsLockWarning(entry);
layout.attach(this._capsLockWarningLabel, 1, row, 1, 1);
row++;
}
if (this.prompt.choice_visible) {
let choice = new CheckBox.CheckBox();
this.prompt.bind_property('choice-label', choice.getLabelActor(), 'text', GObject.BindingFlags.SYNC_CREATE);