[seahorse] When enter is pressed don't allow passphrase to complete if no match.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] When enter is pressed don't allow passphrase to complete if no match.
- Date: Thu, 15 Sep 2011 08:07:21 +0000 (UTC)
commit 007580d02e32ccc6165de15c64843bdfa2d0f362
Author: Stef Walter <stefw collabora co uk>
Date: Thu Sep 15 10:00:33 2011 +0200
When enter is pressed don't allow passphrase to complete if no match.
* If confirmed passwords don't match don't allow the <Enter> key
to complete the password prompt.
libseahorse/seahorse-passphrase.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libseahorse/seahorse-passphrase.c b/libseahorse/seahorse-passphrase.c
index 231566d..61faae8 100644
--- a/libseahorse/seahorse-passphrase.c
+++ b/libseahorse/seahorse-passphrase.c
@@ -127,7 +127,9 @@ confirm_callback (GtkWidget *widget, GtkDialog *dialog)
static void
enter_callback (GtkWidget *widget, GtkDialog *dialog)
{
- gtk_dialog_response (dialog, GTK_RESPONSE_ACCEPT);
+ GtkWidget *widg = gtk_dialog_get_widget_for_response (dialog, GTK_RESPONSE_ACCEPT);
+ if (gtk_widget_get_sensitive (widg))
+ gtk_dialog_response (dialog, GTK_RESPONSE_ACCEPT);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]