unlockDialog: Call AuthPrompt.addCharacter() directly

The additional function UnlockDialog.addCharacter() is only used at one
place, so we can simply remove it and call AuthPrompt.addCharacter()
directly. The AuthPrompt is shown right before that anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1209


(cherry picked from commit fb1bb291eb)
This commit is contained in:
Jonas Dreßler 2020-04-22 19:14:13 +00:00 committed by verdre
parent 05c1a6dce6
commit 63a6c0d6f9

View File

@ -605,7 +605,7 @@ var UnlockDialog = GObject.registerClass({
this._showPrompt(); this._showPrompt();
if (GLib.unichar_isgraph(unichar)) if (GLib.unichar_isgraph(unichar))
this.addCharacter(unichar); this._authPrompt.addCharacter(unichar);
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
} }
@ -835,11 +835,6 @@ var UnlockDialog = GObject.registerClass({
this._authPrompt.cancel(); this._authPrompt.cancel();
} }
addCharacter(unichar) {
this._showPrompt();
this._authPrompt.addCharacter(unichar);
}
finish(onComplete) { finish(onComplete) {
this._ensureAuthPrompt(); this._ensureAuthPrompt();
this._authPrompt.finish(onComplete); this._authPrompt.finish(onComplete);