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 695904 - [WK2] No spellcheck suggestions in context menu
[WK2] No spellcheck suggestions in context menu
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 678610
 
 
Reported: 2013-03-15 11:57 UTC by Xan Lopez
Modified: 2013-03-17 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (3.04 KB, patch)
2013-03-16 10:53 UTC, Carlos Garcia Campos
reviewed Details | Review
Updated patch (3.71 KB, patch)
2013-03-17 09:44 UTC, Carlos Garcia Campos
committed Details | Review

Description Xan Lopez 2013-03-15 11:57:13 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.
Comment 1 Carlos Garcia Campos 2013-03-16 10:52:34 UTC
My fault, I forgot to add the spelling guesses to the context menu for editable content.
Comment 2 Carlos Garcia Campos 2013-03-16 10:53:48 UTC
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.
Comment 3 Xan Lopez 2013-03-16 12:19:46 UTC
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.
Comment 4 Carlos Garcia Campos 2013-03-17 09:43:52 UTC
(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!
Comment 5 Carlos Garcia Campos 2013-03-17 09:44:14 UTC
Created attachment 239058 [details] [review]
Updated patch
Comment 6 Xan Lopez 2013-03-17 11:31:16 UTC
Review of attachment 239058 [details] [review]:

Looks good, thanks.