WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120772
[GTK] [Meta] GtkActions and Stock Items are deprecated in gtk+ 3.10
https://bugs.webkit.org/show_bug.cgi?id=120772
Summary
[GTK] [Meta] GtkActions and Stock Items are deprecated in gtk+ 3.10
Simon Pena
Reported
2013-09-05 07:39:24 PDT
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
Comment 1
2013-09-09 03:06:37 PDT
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
Comment 2
2013-09-11 00:15:59 PDT
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
Comment 3
2013-09-11 02:30:36 PDT
I think you can already use GtkActions in current version of GTK. Not sure about stock items.
Anton Obzhirov
Comment 4
2013-09-11 02:31:39 PDT
(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
Comment 5
2013-09-11 03:00:40 PDT
(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
Comment 6
2013-09-20 08:41:41 PDT
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
Comment 7
2013-09-20 08:53:09 PDT
(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
Comment 8
2013-09-24 09:02:34 PDT
(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
Comment 9
2013-09-24 09:16:30 PDT
(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
Comment 10
2013-12-10 03:13:42 PST
***
Bug 121686
has been marked as a duplicate of this bug. ***
Enrique Ocaña
Comment 11
2013-12-10 03:42:36 PST
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
Comment 12
2016-01-08 11:24:28 PST
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug