GNOME Bugzilla – Bug 577469
Remove deprecated GTK+ symbols
Last modified: 2010-06-27 08:18:03 UTC
http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B GTK_OBJECT_FLOATING, gtk_box_pack_start_defaults, gtk_object_sink, gtk_widget_ref, gtk_widget_unref Contributors: Some stuff is really only about replacing the calls, some might be more complex. Also make sure that the gtk and glib versions in configure.in are high enough and take a look since which version the new non-deprecated functions are available. http://library.gnome.org is your friend. :-)
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Reopening as GTK_WIDGET_STATE and gtk_button_leave are used. ./gdl/gdl-dock-item.c: GTK_WIDGET_STATE (item)); ./gdl/gdl-dock-item.c: GTK_WIDGET_STATE (widget), l/.libs/libgdl-1.so. ./gdl/gdl-dock-item-grip.c: gtk_button_leave (GTK_BUTTON (grip->_priv->iconify_button));
Created attachment 158522 [details] [review] This patch removes deprecated Gtk+ macros Removed deprecated macros: GTK_WIDGET_DRAWABLE, GTK_WIDGET_REALIZED, GTK_WIDGET_STATE, GTK_WIDGET_VISIBLE, GTK_WIDGET_MAPPED, GTK_WIDGET_NO_WINDOW
Mirsal: Patch is missing a GTK_REQUIRED bump to 2.19.7 in configure.in.
Created attachment 158557 [details] [review] Remove deprecated Gtk+ macros and bump GTK_REQUIRED to 2.19.7
@André: Thanks !
Thanks for the patch! I pushed it to master!
Hmm, but gtk_button_leave is still used: ./gdl/gdl-dock-item-grip.c: gtk_button_leave (GTK_BUTTON (grip->_priv->iconify_button)); http://library.gnome.org/devel/gtk/unstable/GtkButton.html#gtk-button-leave
These are the things where you could silently write a patch and commit it ;)
Right, I forgot about this one, it did not show up when building with -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED I can't write a patch right now, but I'll be happy to do so in a couple of days if noone takes care of it before :)
(In reply to comment #9) > These are the things where you could silently write a patch and commit it ;) Yes, if I knew how to fix it. ;-)
@Mirsal: Does your offer with the patch still stand?
@Johannes: Oops, yeah, I got distracted and I forgot about this. I'm working on it now.
*** Bug 612572 has been marked as a duplicate of this bug. ***
Created attachment 162718 [details] [review] Remove a call to the deprecated gtk_button_leave() function Here is a (somewhat ridiculous) patch that replaces the gtk_button_leave() call that used to work around a gtk+ bug. However, I think that the best thing to do here would be to just remove the gtk_button_leave() call : It is unlikely that anyone would need to listen to the leave event on the grip's iconify button. IMHO the bug that causes widgets not to fire leave-notify events when a widget gets reparented while being under the mouse pointer should be fixed in gtk+ in the first place. Anyway, the code is here in case you think that the iconify button should emit a "leave-notify-event" signal.
Review of attachment 162718 [details] [review]: To be honest, I don't know much about the leave-notify thing but I know that you can see a drawn focus shadow around the button if this is not done. ::: gdl/gdl-dock-item-grip.c @@ +257,3 @@ +#if !GTK_CHECK_VERSION (2, 20, 0) + #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED(widget) This can be omitted as we would use GTK+ 2.20 as minimal. @@ +291,3 @@ + event->crossing.state = modifiers; + + GTK_BUTTON (iconify_button)->in_button = FALSE; I would assume that button->in_button also got GSEAL'd and is a such not available anymore.
It compiles now with GSEAL but the issue in the last comment is still present. Keeping the bug open.
Review of attachment 162718 [details] [review]: I agree that, as a workaround, emitting a ::leave-notify-event directly feels a bit of a hack; unfortunately, I don't think there's much we can do - since the explicit enter/leave methods have been removed. ::: gdl/gdl-dock-item-grip.c @@ +291,3 @@ + event->crossing.state = modifiers; + + GTK_BUTTON (iconify_button)->in_button = FALSE; this should not be needed: gtk_button_leave_notify() will already set in_button = FALSE.
yes, my previous patch uses the iconify button's parent gdk window to synthesize the crossing event whereas its event_window should be used. using: window = GTK_BUTTON (iconify_button)->event_window; everything works as intended and the in_button stuff can be removed, however, it is still a direct access to a GSEALed property and there is no other way to get the event_window from a GtkButton. I'm not sure that adding an accessor for this one is a good idea, though.
oh and by the way, there is another thing I did not get right here : gtk_widget_event should be used instead of g_signal_emit_by_name
Created attachment 164494 [details] [review] Fix the mistakes introduces by my previous patch This patch need a new accessor in gtk+ (see: #616053)
Review of attachment 164494 [details] [review]: Thanks! I think you linked to the wrong bug but should be fine. ::: gdl/gdl-dock-item-grip.c @@ +260,3 @@ } +#if !GTK_CHECK_VERSION (2, 22, 0) Hmm, not sure if I want to do a version for gtk+ 2.x but maybe I will branch one off. Master should depend on gtk+ 3.0.
> +#if !GTK_CHECK_VERSION (2, 22, 0) Uhm. No please, as 2.22 is somewhere in the next months but the accessor exists now, hence a real version (probably something 2.21ish is needed) to be able to compile gdl in the next months until 2.22.0 is released.
You got me wrong. I simply plan to depend on gtk+ 2.9x for the next release and leave the gtk+ 2.0 support to the stable gdl 2.30 series.
Review of attachment 164494 [details] [review]: Committed