GNOME Bugzilla – Bug 572181
Remove deprecated GTK+ symbols
Last modified: 2010-07-19 21:14:12 UTC
http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B ./libseahorse/seahorse-object-widget.h: #define SEAHORSE_OBJECT_WIDGET(obj) (GTK_CHECK_CAST ((obj), SEAHORSE_TYPE_OBJECT_WIDGET, SeahorseObjectWidget)) ./libseahorse/seahorse-object-widget.h: #define SEAHORSE_OBJECT_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_OBJECT_WIDGET, SeahorseObjectWidgetClass)) ./libseahorse/seahorse-object-widget.h: #define SEAHORSE_IS_OBJECT_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_OBJECT_WIDGET)) ./libseahorse/seahorse-object-widget.h: #define SEAHORSE_OBJECT_WIDGET_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), SEAHORSE_TYPE_OBJECT_WIDGET, SeahorseObjectWidgetClass)) ./libseahorse/seahorse-object-widget.h: #define SEAHORSE_IS_OBJECT_WIDGET(obj) (GTK_CHECK_TYPE ((obj), SEAHORSE_TYPE_OBJECT_WIDGET)) ./src/seahorse-keyserver-search.c: gtk_object_sink (GTK_OBJECT (tooltips)); ./libseahorse/seahorse-context.c: gtk_object_sink (GTK_OBJECT (sctx)); ./libseahorse/seahorse-object-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); ./libseahorse/seahorse-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); ./libseahorse/seahorse-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); ./src/seahorse-keyserver-search.c: tooltips = gtk_tooltips_new (); ./src/seahorse-keyserver-search.c: gtk_tooltips_set_tip (tooltips, check, (gchar*)l->data, ""); http://library.gnome.org/devel/gtk/stable/gtk-Types.html#GTK-CHECK-CAST--CAPS http://library.gnome.org/devel/gtk/stable/gtk-Types.html#GTK-CHECK-CLASS-CAST--CAPS http://library.gnome.org/devel/gtk/stable/gtk-Types.html#GTK-CHECK-CLASS-TYPE--CAPS http://library.gnome.org/devel/gtk/stable/gtk-Types.html#GTK-CHECK-GET-CLASS--CAPS http://library.gnome.org/devel/gtk/stable/gtk-Types.html#GTK-CHECK-TYPE--CAPS http://library.gnome.org/devel/gtk/unstable/GtkObject.html#gtk-object-sink http://library.gnome.org/devel/gtk/stable/GtkTooltips.html#gtk-tooltips-new http://library.gnome.org/devel/gtk/stable/GtkTooltips.html#gtk-tooltips-set-tip
Fixed. 2009-02-17 Adam Schreiber <sadam@clemson.edu> * src/seahorse-keyserver-search.c: * gkr/seahorse-gkr-item-properties.c: * libseahorse/seahorse-object-widget.h: Remove deprecated GTK+ symbols Fixes bug #572181
./libseahorse/seahorse-context.c: gtk_object_sink (GTK_OBJECT (sctx)); ./libseahorse/seahorse-object-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); ./libseahorse/seahorse-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); ./libseahorse/seahorse-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); is still missing.
Got it. Thanks. 2009-02-17 Adam Schreiber <sadam@clemson.edu> * libseahorse/seahorse-widget.c: Remove deprecated GTK+ symbols Fixes bug #572181 Oddly, the make command given on l.g.o didn't catch it. make CFLAGS+="-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
Should we add those flags automatically when building with --enable-debug or --enable-tests?
Hmm, checking out the seahorse trunk and grep'ing still brings up ./libseahorse/seahorse-context.c: gtk_object_sink (GTK_OBJECT (sctx)); ./libseahorse/seahorse-object-widget.c: gtk_object_sink (GTK_OBJECT (swidget)); but maybe I'm just too stupid. :-P
Created attachment 129377 [details] [review] replace gtk_object_sink with equivalent Patch replaces the last two occurrences of gtk_object_sink. The patch looks kind of stupid but it makes a point. gtk_object_sink is doing this: void gtk_object_sink (GtkObject *object) { g_return_if_fail (GTK_IS_OBJECT (object)); g_object_ref_sink (object); g_object_unref (object); } So the equivalent really is e.g.: g_object_ref (GTK_OBJECT (swidget)); g_object_ref_sink (GTK_OBJECT (swidget)); g_object_unref (GTK_OBJECT (swidget)); I just wanted to point this out since there have been other replacements of gtk_object_sink in seahorse.
Oh, and the make CFLAGS+="-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" will only make gtk comment out those deprecated symbols. You probably just got new warnings like "implicit declaration of function".
2009-02-25 Adam Schreiber <sadam@clemson.edu> * libseahorse/seahorse-context.c: * libseahorse/seahorse-object-widget.c: * libseahorse/seahorse-widget.c: Remove more deprecated symbols. Patch from Thomas Anderson. Fixes bug #572181 Whomever wrote the goal really should have specified where to get the file specified in step 1.
Heh, yeah... :-/ Thanks for fixing this (again)!
something went wrong when you applied my patch for seahorse-object-widget.c. You still need the following: - gtk_object_sink (GTK_OBJECT (swidget)); + g_object_ref_sink (GTK_OBJECT (swidget));
Got it. This is officially the bug that wouldn't die. :P
die bug, die, die :)
yay, this bug is back. GTK_WIDGET_TOPLEVEL is deprecated. The replacement gtk_widget_is_toplevel only requires gtk 2.18 which is already the minimum specified in configure.in. Seahorse needs other fixes as well but e.g. GTK_WIDGET_REALIZED would need gtk 2.20 to be fixed.
Created attachment 156817 [details] [review] Replace deprecated GTK_WIDGET_TOPÆEVEL
(In reply to comment #8) > Whomever wrote the goal really should have specified where to get the file > specified in step 1. I think it's me, sorry about that. AFAIR, it's because many projects depended on a GLib version different from the latest one, and at that moment I didn't know neither which version of deprecated symbols to propose, nor how to automate the construction of this file. I just used to create it by copy/pasting the deprecated symbols section of the GLib documentation, and changing the symbols a bit to make sure the regexexp would match. At that time, IIRC, there was also a bug making difficult to attach a file on the wiki. And as nobody complained, it just happened that way...
Review of attachment 156817 [details] [review]: committed by jjardon
Created attachment 161174 [details] [review] 0001-Removed-deprecated-GTK-macro.patch seahorse won't compile with lastest GTK version. See: http://build.gnome.org/builders/seahorse-bxlug-sid/builds/905/steps/seahorse%20build/logs/stdio Patch attached.
Created attachment 161175 [details] [review] 0001-Removed-deprecated-GTK-macro.patch v2. fixed warning
Committed. commit be62ac21f22b102aa5404037f008087502a1bdca Author: Pablo Castellano <pablog@src.gnome.org> Date: Sun May 16 18:28:19 2010 +0200 Removed deprecated GTK macro GTK_WIDGET_VISIBLE -> gtk_widget_get_visible