[Webkit-unassigned] [Bug 198787] [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 12 08:43:48 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=198787
--- Comment #8 from Ludovico de Nittis <ludovico.denittis at collabora.com> ---
(In reply to Michael Catanzaro from comment #5)
> Comment on attachment 371953 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371953&action=review
>
> Yeah but hardcoding the icon names should work just fine with older versions
> of GTK, so I think this newer version is fine.
>
> Now, the function should no longer be called
> gtkStockIDFromContextMenuAction, since that's clearly no longer what the
> function does.
>
> But... the GtkAction API actually does work with stock IDs. It's not
> documented to accept icon names. So I really don't think this is right. I
> think the only correct way to get rid of the stock items here would be to
> just remove this function entirely and always pass nullptr for the stock ID
> instead, at the cost of no longer having icons in the context menu in
> whatever weird non-default environments still allow those.
>
> Or we could leave them as-is. The GtkAction we are creating is deprecated
> anyway, but we can't get rid of that because it's part of the API. So
> getting rid of deprecated stock items when creating a deprecated GtkAction
> doesn't seem as clear a win as your other patches, where you were able to
> fully replace use of deprecated APIs with non-deprecated ones.
>
> Either way is OK with me.
>
> > Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp:75
> > case ContextMenuItemTagSpellingGuess:
> > - return nullptr;
> > case ContextMenuItemTagIgnoreSpelling:
> > - return GTK_STOCK_NO;
> > case ContextMenuItemTagLearnSpelling:
> > - return GTK_STOCK_OK;
> > + return nullptr;
>
> I would move these down to the bottom of the list, with the others that
> return nullptr.
Thank you for the review.
I've uploaded a new patch where I removed the function entirely.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190612/ea5c6e94/attachment.html>
More information about the webkit-unassigned
mailing list