GNOME Bugzilla – Bug 658343
Mashing Enter in “New Conversation” dialogue does nothing
Last modified: 2011-09-06 17:35:41 UTC
Steps to reproduce: • Contact list: Chat → New Conversation… • Enter a valid ID • Mash enter. Expected results: • The “Chat” button is activated. Actual results: • Nothing happens. Why? empathy_new_message_dialog_response() uses an enum of responses: enum { EMP_NEW_MESSAGE_TEXT, EMP_NEW_MESSAGE_SMS, }; and ignores any responses < EMP_NEW_MESSAGE_TEXT. Neither EmpathyNewMessageDialog nor EmpathyContactSelectorDialog (of which EmpathyNewMessageDialog is a subclass) calls gtk_dialog_set_default_response() nor gtk_widget_grab_default(). Instead, EmpathyContactSelectorDialog connects a callback to ::activate on the entry, which calls gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_ACCEPT); GTK_RESPONSE_ACCEPT < EMP_NEW_MESSAGE_TEXT, so nothing happens. Patch comin’ up.
Created attachment 195769 [details] [review] ContactSelector: mark standard action as the default. This allows Gtk+ to style the button differently to indicate that it will be pressed when the user hits Enter; it also fixes hitting enter in the New Conversation dialog, which does not consider GTK_RESPONSE_ACCEPT to be a reasonable response and ignores it. So we get a bug fix and better styling in exchange for less code!
Review of attachment 195769 [details] [review]: ++
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.