|
|
4c1248 |
From ba64565bf9be6d827fbbf4dd4de1998b770956ed Mon Sep 17 00:00:00 2001
|
|
|
4c1248 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
4c1248 |
Date: Fri, 27 Sep 2013 16:04:25 +0200
|
|
|
4c1248 |
Subject: [PATCH 2/2] keyring: Cancel active prompts on disable()
|
|
|
4c1248 |
|
|
|
4c1248 |
Since commit 1242a16265d5bf2, we will use a fake prompt which
|
|
|
4c1248 |
cancels alls requests without dialog when the keyring component
|
|
|
4c1248 |
is disabled. However this does only apply to new requests, dialogs
|
|
|
4c1248 |
that are already active when the session mode changes are kept
|
|
|
4c1248 |
open. This is not quite as expected, so cancel the prompt in that
|
|
|
4c1248 |
case.
|
|
|
4c1248 |
|
|
|
4c1248 |
https://bugzilla.gnome.org/show_bug.cgi?id=708910
|
|
|
4c1248 |
---
|
|
|
4c1248 |
js/ui/components/keyring.js | 8 +++++++-
|
|
|
4c1248 |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
4c1248 |
|
|
|
4c1248 |
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
|
|
|
4c1248 |
index 6de3965..5f7813b 100644
|
|
|
4c1248 |
--- a/js/ui/components/keyring.js
|
|
|
4c1248 |
+++ b/js/ui/components/keyring.js
|
|
|
4c1248 |
@@ -246,11 +246,13 @@ const KeyringPrompter = new Lang.Class({
|
|
|
4c1248 |
function() {
|
|
|
4c1248 |
let dialog = this._enabled ? new KeyringDialog()
|
|
|
4c1248 |
: new KeyringDummyDialog();
|
|
|
4c1248 |
- return dialog.prompt;
|
|
|
4c1248 |
+ this._currentPrompt = dialog.prompt;
|
|
|
4c1248 |
+ return this._currentPrompt;
|
|
|
4c1248 |
}));
|
|
|
4c1248 |
this._dbusId = null;
|
|
|
4c1248 |
this._registered = false;
|
|
|
4c1248 |
this._enabled = false;
|
|
|
4c1248 |
+ this._currentPrompt = null;
|
|
|
4c1248 |
},
|
|
|
4c1248 |
|
|
|
4c1248 |
enable: function() {
|
|
|
4c1248 |
@@ -265,6 +267,10 @@ const KeyringPrompter = new Lang.Class({
|
|
|
4c1248 |
|
|
|
4c1248 |
disable: function() {
|
|
|
4c1248 |
this._enabled = false;
|
|
|
4c1248 |
+
|
|
|
4c1248 |
+ if (this._prompter.prompting)
|
|
|
4c1248 |
+ this._currentPrompt.cancel();
|
|
|
4c1248 |
+ this._currentPrompt = null;
|
|
|
4c1248 |
}
|
|
|
4c1248 |
});
|
|
|
4c1248 |
|
|
|
4c1248 |
--
|
|
|
4c1248 |
1.8.4.2
|
|
|
4c1248 |
|