After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572181 - Remove deprecated GTK+ symbols
Remove deprecated GTK+ symbols
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
2.25.x
Other Linux
: Normal normal
: 2.26.0
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks: 585692
 
 
Reported: 2009-02-17 18:04 UTC by André Klapper
Modified: 2010-07-19 21:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
replace gtk_object_sink with equivalent (1003 bytes, patch)
2009-02-23 22:55 UTC, Thomas Andersen
committed Details | Review
Replace deprecated GTK_WIDGET_TOPÆEVEL (1.31 KB, patch)
2010-03-22 23:31 UTC, Thomas Andersen
committed Details | Review
0001-Removed-deprecated-GTK-macro.patch (929 bytes, patch)
2010-05-16 16:32 UTC, Pablo Castellano (IRC: pablog)
none Details | Review
0001-Removed-deprecated-GTK-macro.patch (942 bytes, patch)
2010-05-16 16:35 UTC, Pablo Castellano (IRC: pablog)
none Details | Review

Description André Klapper 2009-02-17 18:04:05 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
Comment 1 Adam Schreiber 2009-02-17 18:55:53 UTC
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
Comment 2 André Klapper 2009-02-18 11:38:05 UTC
./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.
Comment 3 Adam Schreiber 2009-02-18 13:32:16 UTC
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"
Comment 4 Stef Walter 2009-02-18 14:26:34 UTC
Should we add those flags automatically when building with --enable-debug or --enable-tests?
Comment 5 André Klapper 2009-02-23 13:51:20 UTC
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
Comment 6 Thomas Andersen 2009-02-23 22:55:09 UTC
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.
Comment 7 Thomas Andersen 2009-02-23 22:58:53 UTC
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".
Comment 8 Adam Schreiber 2009-02-25 15:10:46 UTC
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.
Comment 9 André Klapper 2009-02-25 15:38:25 UTC
Heh, yeah... :-/

Thanks for fixing this (again)!
Comment 10 Thomas Andersen 2009-02-25 21:47:46 UTC
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));
Comment 11 Adam Schreiber 2009-02-25 22:08:33 UTC
Got it.  This is officially the bug that wouldn't die. :P
Comment 12 Thomas Andersen 2009-02-25 22:21:04 UTC
die bug, die, die :)
Comment 13 Thomas Andersen 2010-03-22 23:30:32 UTC
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.
Comment 14 Thomas Andersen 2010-03-22 23:31:30 UTC
Created attachment 156817 [details] [review]
Replace deprecated GTK_WIDGET_TOPÆEVEL
Comment 15 Luis Menina 2010-03-30 19:36:57 UTC
(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...
Comment 16 Pablo Castellano (IRC: pablog) 2010-05-16 16:09:17 UTC
Review of attachment 156817 [details] [review]:

committed by jjardon
Comment 17 Pablo Castellano (IRC: pablog) 2010-05-16 16:09:19 UTC
Review of attachment 156817 [details] [review]:

committed by jjardon
Comment 18 Pablo Castellano (IRC: pablog) 2010-05-16 16:32:50 UTC
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.
Comment 19 Pablo Castellano (IRC: pablog) 2010-05-16 16:35:48 UTC
Created attachment 161175 [details] [review]
0001-Removed-deprecated-GTK-macro.patch

v2. fixed warning
Comment 20 Adam Schreiber 2010-07-19 21:14:12 UTC
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