GNOME Bugzilla – Bug 695904
[WK2] No spellcheck suggestions in context menu
Last modified: 2013-03-17 11:54:42 UTC
Spellchecking works correctly, but no suggestions are offered in the context menu as usual. Not sure if this is due to some extra package missing or is just broken.
My fault, I forgot to add the spelling guesses to the context menu for editable content.
Created attachment 239023 [details] [review] Patch It adds all the suggestions at the beginning of the context menu, I think this is what wk1 did, right? It can make the context menu very long in some cases, so we could consider using a submenu.
Review of attachment 239023 [details] [review]: ::: src/ephy-window.c @@ +1858,3 @@ + if (webkit_context_menu_item_get_stock_action (item) == WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS) + { + retval = g_list_prepend (retval, g_object_ref (item)); For now I think you can just limit this to, say, 5 entries. Maybe in the future we can add submenus with all the options, but for now having the first few seems enough. @@ +1962,3 @@ + g_object_unref (item); + } + g_list_free (spelling_guess_items); You need to add a separator here if you added one or more spelling guesses.
(In reply to comment #3) > Review of attachment 239023 [details] [review]: > > ::: src/ephy-window.c > @@ +1858,3 @@ > + if (webkit_context_menu_item_get_stock_action (item) == > WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS) > + { > + retval = g_list_prepend (retval, g_object_ref (item)); > > For now I think you can just limit this to, say, 5 entries. Maybe in the future > we can add submenus with all the options, but for now having the first few > seems enough. There's actually MAX_SPELL_CHECK_GUESSES macro set to 4. > @@ +1962,3 @@ > + g_object_unref (item); > + } > + g_list_free (spelling_guess_items); > > You need to add a separator here if you added one or more spelling guesses. Right!
Created attachment 239058 [details] [review] Updated patch
Review of attachment 239058 [details] [review]: Looks good, thanks.