polkitAgent: Return GLib.SOURCE_REMOVE on timeout callback

resetDialog is used (also) as GLib timeout function, so while just returning
an undefined value will stop the timeout anyways, it's just cleaner to
use the GSource expected return values

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1203
This commit is contained in:
Marco Trevisan (Treviño) 2020-04-17 17:51:27 +02:00 committed by Marco Trevisan
parent 8d1e4659d1
commit bfa34914db

View File

@ -328,11 +328,13 @@ var AuthenticationDialog = GObject.registerClass({
let resetDialog = () => {
if (this.state != ModalDialog.State.OPENED)
return;
return GLib.SOURCE_REMOVE;
this._passwordEntry.hide();
this._cancelButton.grab_key_focus();
this._okButton.reactive = false;
return GLib.SOURCE_REMOVE;
};
if (delay) {