GNOME Bugzilla – Bug 680754
deprecate gdk thread functions
Last modified: 2012-08-06 18:01:45 UTC
As discussed in Brno, and on the mailing list. Here are patches that deprecated gdk_threads_init, gdk_threads_enter, gdk_threads_leave and gdk_threads_set_lock_functions.
Created attachment 219788 [details] [review] prepare gdk
Created attachment 219789 [details] [review] prepare gtk
Created attachment 219790 [details] [review] do the deprecation
Review of attachment 219788 [details] [review]: I can verify it appears you've run sed correctly =)
Review of attachment 219789 [details] [review]: Ditto.
Review of attachment 219790 [details] [review]: Not a major GTK+ reviewer so this is just a sanity pass. ::: gdk/gdkthreads.h @@ +85,3 @@ * been defined. Typically gdk_threads_enter() should be used instead of * this macro. + * Add the bit about using g_main_context_invoke()/g_idle_add() that you have in the commit message to here?
(In reply to comment #2) > Created an attachment (id=219789) [details] [review] > prepare gtk Not sure if off-topic, bug just a comment. As you mentioned on bug 652797, AtkMisc should die. And these days I concluded that you were right. Right now the only consumers of atkmisc are gtk+ and at-spi (CORBA one). I think that instead of updating GailMisc it would be better if GailMisc is just removed. Doing that I think that I could just remove AtkMisc (instead of deprecate it), as at-spi (in the case someone is still compiling it) depends on atk1. FWIW, cally doesn't have any atkmisc implementation at all.
Pushed with improved documentation.
This seems to have broken my WebKit build, but I'm not sure yet why: http://ostree.gnome.org/logs/gnomeos-3.6/WebKit/i686/compile.log Is it something to do with the #if !() conditional being hit when GDK_VERSION_MIN_REQUIRED isn't defined?
Created attachment 220398 [details] [review] gdk: Don't hide GDK_THREADS_ENTER()/LEAVE() by default Commit 0ac56e9dcc526d07975feeb1a297640a8452525b added a conditional guard around the headers, but this outright breaks compilation of projects which don't use the newly-introduced GDK_VERSION_MIN_REQUIRED macro, because it defaults to the current stable release. Concretely, this broke WebKitGtk. Instead, hide them if the traditional GDK_DISABLE_DEPRECATED macro is defined.
Word is glade is broken by this too.
(In reply to comment #11) > Word is glade is broken by this too. Yes. The patch from attachment #220398 [details] fixes Glade which previously ended with: Creating library file: .libs/libgladeui-2.dll.a.libs/libgladeui_2_la-glade-named-icon-chooser-dialog.o: In function `cleanup_after_load': c:/dev/gnome.org/gnome-windows/checkout/glade/git/src/gladeui/glade-named-icon-chooser-dialog.c:917: undefined reference to `GDK_THREADS_ENTER' c:/dev/gnome.org/gnome-windows/checkout/glade/git/src/gladeui/glade-named-icon-chooser-dialog.c:925: undefined reference to `GDK_THREADS_LEAVE' .libs/libgladeui_2_la-glade-named-icon-chooser-dialog.o: In function `reload_icons': c:/dev/gnome.org/gnome-windows/checkout/glade/git/src/gladeui/glade-named-icon-chooser-dialog.c:977: undefined reference to `GDK_THREADS_ENTER' c:/dev/gnome.org/gnome-windows/checkout/glade/git/src/gladeui/glade-named-icon-chooser-dialog.c:1025: undefined reference to `GDK_THREADS_LEAVE'
I've reverted the macro part of the patch for now. We can put that back later.
(In reply to comment #13) > I've reverted the macro part of the patch for now. We can put that back later. But...my patch did that in a better way =/ At least, I think hiding them #ifdef GDK_DISABLE_DEPRECATED is correct from a historical perspective of how we've used that define.