After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658343 - Mashing Enter in “New Conversation” dialogue does nothing
Mashing Enter in “New Conversation” dialogue does nothing
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Contact List
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-06 10:25 UTC by Will Thompson
Modified: 2011-09-06 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ContactSelector: mark standard action as the default. (2.42 KB, patch)
2011-09-06 10:27 UTC, Will Thompson
committed Details | Review

Description Will Thompson 2011-09-06 10:25:18 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.
Comment 1 Will Thompson 2011-09-06 10:27:02 UTC
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!
Comment 2 Guillaume Desmottes 2011-09-06 16:27:09 UTC
Review of attachment 195769 [details] [review]:

++
Comment 3 Will Thompson 2011-09-06 17:35:41 UTC
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.