[gnome-shell] keyring: Make sure the entries are insensitive after submission
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyring: Make sure the entries are insensitive after submission
- Date: Wed, 26 Dec 2012 03:19:14 +0000 (UTC)
commit fc9225e24af6c8997c680f51bf3fe24db913539c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Dec 21 11:07:56 2012 -0500
keyring: Make sure the entries are insensitive after submission
https://bugzilla.gnome.org/show_bug.cgi?id=690594
js/ui/components/keyring.js | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
index 74c9c38..e4ecd8f 100644
--- a/js/ui/components/keyring.js
+++ b/js/ui/components/keyring.js
@@ -142,6 +142,14 @@ const KeyringDialog = new Lang.Class({
this._messageBox.add(table, { x_fill: true, y_fill: true });
},
+ _updateSensitivity: function(sensitive) {
+ this._passwordEntry.reactive = sensitive;
+ this._passwordEntry.clutter_text.editable = sensitive;
+
+ this._okButton.can_focus = sensitive;
+ this._okButton.reactive = sensitive;
+ },
+
_ensureOpen: function() {
// NOTE: ModalDialog.open() is safe to call if the dialog is
// already open - it just returns true without side-effects
@@ -177,10 +185,12 @@ const KeyringDialog = new Lang.Class({
},
_onPasswordActivate: function() {
- if (this.prompt.confirm_visible)
+ if (this.prompt.confirm_visible) {
+ this._updateSensitivity(true);
this._confirmEntry.grab_key_focus();
- else
+ } else {
this._onContinueButton();
+ }
},
_onConfirmActivate: function() {
@@ -188,6 +198,7 @@ const KeyringDialog = new Lang.Class({
},
_onContinueButton: function() {
+ this._updateSensitivity(false);
this.prompt.complete();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]