From 73b9effe1291d5938f25978c578c2143ed83dd3b Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 6 Feb 2003 06:53:17 +0000 Subject: add an activate handler to the entry so that hitting return will return an 2003-02-06 Larry Ewing * mail-session.c (pass_activate): add an activate handler to the entry so that hitting return will return an OK response. svn path=/trunk/; revision=19800 --- mail/ChangeLog | 5 +++++ mail/mail-session.c | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 23f92e1541..501e3e15d6 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2003-02-06 Larry Ewing + + * mail-session.c (pass_activate): add an activate handler to the + entry so that hitting return will return an OK response. + 2003-02-05 Dan Winship * main.c (main): s/glade_gnome_init/glade_init/ diff --git a/mail/mail-session.c b/mail/mail-session.c index 6d6ecb29b4..fadf2c2e0f 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -175,6 +175,13 @@ struct _pass_msg { static void do_get_pass(struct _mail_msg *mm); +static void +pass_activate (GtkEntry *entry, void *data) +{ + if (password_dialog) + gtk_dialog_response (password_dialog, GTK_RESPONSE_OK); +} + static void pass_response (GtkDialog *dialog, int button, void *data) { @@ -257,6 +264,7 @@ request_password (struct _pass_msg *m) m->entry = gtk_entry_new (); gtk_entry_set_visibility ((GtkEntry *) m->entry, !m->secret); + g_signal_connect (m->entry, "activate", G_CALLBACK (pass_activate), password_dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (password_dialog)->vbox), m->entry, TRUE, FALSE, 0); gtk_widget_show (m->entry); -- cgit