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 575131 - Remove deprecated GTK+ symbols
Remove deprecated GTK+ symbols
Status: VERIFIED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
git master
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks: 585692
 
 
Reported: 2009-03-12 19:11 UTC by André Klapper
Modified: 2009-12-21 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkManager Applet remove deprecated GTK+ (1.90 KB, patch)
2009-06-20 17:04 UTC, Sense Hofstede
needs-work Details | Review
nm-applet remove deprecated GTK+ (1.61 KB, patch)
2009-06-24 13:53 UTC, Sense Hofstede
none Details | Review
nm-applet remove deprecated GTK+ (1.63 KB, patch)
2009-06-25 15:38 UTC, Sense Hofstede
reviewed Details | Review
nm-applet dep. GTK+ symbols removed (1.84 KB, patch)
2009-07-05 19:27 UTC, Sense Hofstede
none Details | Review

Description André Klapper 2009-03-12 19:11:30 UTC
See http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B

Potential patch contributors:
See http://library.gnome.org for API documentation.
Also note that a version bump in configure.ac/.in might be required.

Deprecated GTK+ symbols to be replaced:
GtkTooltipsData, gtk_action_block_activate_from, gtk_action_connect_proxy, gtk_action_unblock_activate_from, gtk_status_icon_set_tooltip, gtk_tooltips_data_get, gtk_tooltips_new, gtk_tooltips_set_tip
Comment 1 Sense Hofstede 2009-06-20 17:04:10 UTC
Created attachment 137074 [details] [review]
NetworkManager Applet remove deprecated GTK+
Comment 2 Sense Hofstede 2009-06-20 17:04:41 UTC
Attached is a patch discarding the last deprecated GTK+ symbols on the list in this bug from the NetworkManager Applet. 

Two sections were adapted, both in src/polkit-helpers/polkit-gnome-action.c; I left the deprecated symbols there and used
#if GTK_CHECK_VERSION
to make sure the new symbols aren't used if they aren't there. Maybe it has no use, the GtkToolkit class was introduced in 2.11.3, but I wanted to be sure. I used the check because it was the way the deprecated symbols are handled in applet.c.
Comment 3 Luis Menina 2009-06-24 00:16:52 UTC
(In reply to comment #2)
> Two sections were adapted, both in src/polkit-helpers/polkit-gnome-action.c; I
> left the deprecated symbols there and used
> #if GTK_CHECK_VERSION
> to make sure the new symbols aren't used if they aren't there. Maybe it has no
> use, the GtkToolkit class was introduced in 2.11.3, but I wanted to be sure.

See in configure.ac, there's a check for gtk+-2.0 >= 2.14, so you don't need to check for older versions, which allow you to remove the older code.

The check is needed however for gtk_activatable_set_related_action, unless the maintainer is ok to bump the dependency to gtk+ >= 2.16.
Comment 4 Sense Hofstede 2009-06-24 13:53:48 UTC
Created attachment 137314 [details] [review]
nm-applet remove deprecated GTK+

The patch now only works with GTK+ 2.14 and above.
Comment 5 Luis Menina 2009-06-24 21:37:42 UTC
Please correct the indentation, the whole code uses spaces, and you're using tabs. That means that indentation is broken for people that don't have the right tabs = n spaces equivalence. Just click on your attached patch to see the result.
Comment 6 Sense Hofstede 2009-06-25 15:38:33 UTC
Created attachment 137372 [details] [review]
nm-applet remove deprecated GTK+

My apologizes for the much bug noise this all creates. I hope I got it right this time, I think I messed too much with Gedit's indentation settings before creating the previous patch. 
This one was created on a fresh Git clone and with the space/indention settings left intact.
Comment 7 Luis Menina 2009-06-25 20:49:43 UTC
Oh, don't worry about that, these are small mistakes everyone does when starting to contribute ;-). The patch looks good to me, we just need a maintainer's authorization to commit it, now... Thank you sense for your work !
Comment 8 Dan Williams 2009-07-01 18:27:45 UTC
Looking at the patch, it touches just src/polkit-helpers/polkit-gnome-action.c.  The thing is, that file should *only* be built on systems that are running a very old version of PolicyKit (ie, PK 0.6).  Like Fedora Core 8, Ubuntu 8.04, etc.  These systems are unlikely to be running a current version of GTK.

Thus, this code has to maintain compatibility with GTK 2.10, which doesn't have gtk_widget_set_tooltip_text() for example.  So we should probably protect that conversion to gtk_widget_set_tooltip_text() with a GTK_CHECK_VERSION too.

Sound OK?  Thanks for the patch, just a little bit more then we can commit :)
Comment 9 Sense Hofstede 2009-07-05 19:27:07 UTC
Created attachment 137890 [details] [review]
nm-applet dep. GTK+ symbols removed

This patch should do the trick! I have only tested it on Intrepid with GTK+ 2.16, maybe it requires some additional testing on older systems.
Comment 10 Javier Jardón (IRC: jjardon) 2009-10-09 09:47:27 UTC
Could some networkmanager developer review the sense patch?

Thank you!
Comment 11 Dan Williams 2009-10-16 04:07:38 UTC
I believe this code is actually completely removed with 0.8, for which we are requiring a recent GTK anyway.  So fixed there.  Thanks!