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 654669 - Spelling suggestions not offered from Menu key
Spelling suggestions not offered from Menu key
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-15 07:59 UTC by Andrew Cowie
Modified: 2011-07-26 08:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.70 KB, patch)
2011-07-18 04:23 UTC, Danielle Madeley
needs-work Details | Review

Description Andrew Cowie 2011-07-15 07:59:53 UTC
Interestingly, right click brings up "Spelling Suggestions" in the context menu, but if the cursor is over a mispelt word (red squggle and all), pressing Menu on the keyboard brings up a context menu that does not include "Spelling Suggestions".

It would be lovely if the context menu were the same in both cases.

AfC
Comment 1 Guillaume Desmottes 2011-07-15 08:44:19 UTC
Nice catch !
Comment 2 Guillaume Desmottes 2011-07-15 09:01:41 UTC
That's because chat_input_populate_popup_cb() relies on the pointer position to find the word. It should be smarter and do it like GEdit which seems to get this right.
Comment 3 Danielle Madeley 2011-07-18 04:23:37 UTC
Created attachment 192156 [details] [review]
patch

http://cgit.collabora.com/git/user/danni/empathy.git/log/?h=populate-popup-654669

Annoyingly you can't seem to access the event that triggers populate-popup. This fix tracks whether the keyboard or the mouse generated the most recent event so we can decide which way to determine the position.
Comment 4 Xavier Claessens 2011-07-25 12:35:22 UTC
Review of attachment 192156 [details] [review]:

::: libempathy-gtk/empathy-chat.c
@@ +2253,3 @@
+
+	    default:
+		break;

I know this should really never happen, but in that case you leave iter unset. I would either g_assert_if_reached() or set default to GDK_KEY_PRESS case.
Comment 5 Xavier Claessens 2011-07-25 12:36:14 UTC
g_assert_not_reached() even
Comment 6 Emilio Pozuelo Monfort 2011-07-25 13:26:36 UTC
Or g_warn_if_reached() so we don't crash right away (assuming we won't if we continue the execution)
Comment 7 Danielle Madeley 2011-07-26 03:39:53 UTC
Updated, it now defaults to the key-press case and warns when doing so.
Comment 8 Xavier Claessens 2011-07-26 08:00:30 UTC
good, please merge :)
Comment 9 Xavier Claessens 2011-07-26 08:20:20 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.