network-agent: Allow entries to activate default action

Currently entries' 'activate' signal is ignored, so hitting enter
does not have any effect, even if all required information has been
entered.
Instead, connect to the 'activate' signal so that hitting enter
behaves as if the "OK" button had been pressed.

https://bugzilla.gnome.org/show_bug.cgi?id=659133
This commit is contained in:
Florian Müllner 2011-09-15 10:51:53 +02:00
parent 4e4ce0dd21
commit 92024b7e54

View File

@ -115,6 +115,7 @@ NetworkSecretDialog.prototype = {
initialFocusSet = true;
}
secret.entry.clutter_text.connect('activate', Lang.bind(this, this._onOk));
secret.entry.clutter_text.connect('text-changed', Lang.bind(this, function() {
secret.value = secret.entry.get_text();
if (secret.validate)