Bug 120772
Summary: | [GTK] [Meta] GtkActions and Stock Items are deprecated in gtk+ 3.10 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Pena <spena> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | berto, brian.holt, cgarcia, eocanha, mcatanzaro, obzhirov, zan |
Priority: | P2 | Keywords: | Gtk |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 120636, 121686 | ||
Bug Blocks: |
Simon Pena
WebKitGTK+ uses a number of symbols that have been deprecated in gtk+ 3.10: https://developer.gnome.org/gtk3/unstable/DeprecatedObjects.html, more specifically
* GtkActions:
$ fgrep -lr --include=*.{h,c,cpp} --exclude-dir=WebKitBuild GtkAction
Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.h
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.h
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp
Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp
Source/WTF/wtf/gobject/GTypedefs.h
Source/WebKit/gtk/tests/testcontextmenu.c
Source/WebKit/gtk/webkit/webkitglobals.cpp
Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp
Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.h
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/gtk/PopupMenuGtk.h
Source/WebCore/platform/gtk/GtkPopupMenu.cpp
Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp
Source/WebCore/platform/gtk/PopupMenuGtk.cpp
Source/WebCore/platform/gtk/GtkPopupMenu.h
Tools/MiniBrowser/gtk/BrowserWindow.c
* Stock Items:
$ fgrep -lir --include=*.{h,c,cpp} --exclude-dir=WebKitBuild gtk_stock
Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/gtk/webkit/webkitauthenticationdialog.cpp
Source/WebCore/platform/graphics/gtk/ImageGtk.cpp
Source/WebCore/platform/graphics/gtk/IconGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
Source/WebCore/platform/gtk/WebKitAuthenticationWidget.cpp
Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp
Tools/MiniBrowser/gtk/BrowserDownloadsBar.c
Tools/MiniBrowser/gtk/BrowserSettingsDialog.c
Tools/MiniBrowser/gtk/BrowserWindow.c
Tools/GtkLauncher/main.c
(Some of the previous entries are false positives, since they are guarded by GTK_API_VERSION_2, so the proper way to do this would be to actually build against gtk+ 3.10 and check the error messages instead of simply grepping)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alberto Garcia
I would be careful with removing deprecated symbols, I think it's important to check that the dependencies are not bumped because of this, else we would be making the webkitgtk build more difficult for no reason.
Zan Dobersek
This is at the moment breaking debug builds on the 2.2 stable branch, with GTK+ 3.10. As a workaround we could undefine the *_DISABLE_DEPRECATED macros in the case of debug builds.
Anton Obzhirov
I think you can already use GtkActions in current version of GTK. Not sure about stock items.
Anton Obzhirov
(In reply to comment #3)
> I think you can already use GtkActions in current version of GTK. Not sure about stock items.
Sorry I meant I can already remove GtkActions in current version of GTK.
Zan Dobersek
(In reply to comment #2)
> This is at the moment breaking debug builds on the 2.2 stable branch, with GTK+ 3.10. As a workaround we could undefine the *_DISABLE_DEPRECATED macros in the case of debug builds.
Those macro definitions were removed in r155509.
https://trac.webkit.org/r155509
Carlos Garcia Campos
If the problem is that there are compile warnings, I wouldn't worry too much. We don't plan to bump GTK+ requirements, and I wouldn't spend time porting to new API either (I'm not even sure there's a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.
Anton Obzhirov
(In reply to comment #6)
> If the problem is that there are compile warnings, I wouldn't worry too much. We don't plan to bump GTK+ requirements, and I wouldn't spend time porting to new API either (I'm not even sure there's a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.
OK, so I guess it can be postponed for now.
Brian Holt
(In reply to comment #6)
> If the problem is that there are compile warnings, I wouldn't worry too much. We don't plan to bump GTK+ requirements, and I wouldn't spend time porting to new API either (I'm not even sure there's a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.
Its not that there are just compile warning, building WebKit with debug symbols fails:
$ ./autogen.sh --prefix=/opt/gnome3 --libdir=/opt/gnome3/lib64 --enable-debug
Source/WebKit/gtk/webkit/webkitwebview.cpp:1309:53: error: 'GTK_STOCK_CANCEL' was not declared in this scope
Source/WebKit/gtk/webkit/webkitwebview.cpp:1310:53: error: 'GTK_STOCK_OPEN' was not declared in this scope
Zan Dobersek
(In reply to comment #8)
> (In reply to comment #6)
> > If the problem is that there are compile warnings, I wouldn't worry too much. We don't plan to bump GTK+ requirements, and I wouldn't spend time porting to new API either (I'm not even sure there's a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.
>
> Its not that there are just compile warning, building WebKit with debug symbols fails:
> $ ./autogen.sh --prefix=/opt/gnome3 --libdir=/opt/gnome3/lib64 --enable-debug
>
> Source/WebKit/gtk/webkit/webkitwebview.cpp:1309:53: error: 'GTK_STOCK_CANCEL' was not declared in this scope
> Source/WebKit/gtk/webkit/webkitwebview.cpp:1310:53: error: 'GTK_STOCK_OPEN' was not declared in this scope
I removed the disabling of deprecated API under debug builds in r155509.
http://trac.webkit.org/changeset/155509
Carlos Garcia Campos
*** Bug 121686 has been marked as a duplicate of this bug. ***
Enrique OcaƱa
If migrating away from stock icons turns out to be a priority at some point, maybe https://bugs.webkit.org/attachment.cgi?id=218847 (from Bug 121686) might be considered.
Michael Catanzaro
Stock item deprecations are trivial, patches welcome to get rid of those where they exist. No reason to keep a bug open for it without a patch, because they aren't hurting anything.
GtkAction is part of our API, we cannot remove it.
(In reply to comment #9)
> I removed the disabling of deprecated API under debug builds in r155509.
> http://trac.webkit.org/changeset/155509
This is all that matters.