[gnome-shell] keyring: Cancel active prompts on disable()
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyring: Cancel active prompts on disable()
- Date: Wed, 9 Oct 2013 15:59:06 +0000 (UTC)
commit 627f3ef36b05bec09a78f0a09acaf55cddd18238
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Sep 27 16:04:25 2013 +0200
keyring: Cancel active prompts on disable()
Since commit 1242a16265d5bf2, we will use a fake prompt which
cancels alls requests without dialog when the keyring component
is disabled. However this does only apply to new requests, dialogs
that are already active when the session mode changes are kept
open. This is not quite as expected, so cancel the prompt in that
case.
https://bugzilla.gnome.org/show_bug.cgi?id=708910
js/ui/components/keyring.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
index e02ae8f..a5f5e1b 100644
--- a/js/ui/components/keyring.js
+++ b/js/ui/components/keyring.js
@@ -246,11 +246,13 @@ const KeyringPrompter = new Lang.Class({
function() {
let dialog = this._enabled ? new KeyringDialog()
: new KeyringDummyDialog();
- return dialog.prompt;
+ this._currentPrompt = dialog.prompt;
+ return this._currentPrompt;
}));
this._dbusId = null;
this._registered = false;
this._enabled = false;
+ this._currentPrompt = null;
},
enable: function() {
@@ -265,6 +267,10 @@ const KeyringPrompter = new Lang.Class({
disable: function() {
this._enabled = false;
+
+ if (this._prompter.prompting)
+ this._currentPrompt.cancel();
+ this._currentPrompt = null;
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]