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 634277 - Update to gtk/gtktoolitemgroup.c due to use of to-be-deprecated GLib API
Update to gtk/gtktoolitemgroup.c due to use of to-be-deprecated GLib API
Status: RESOLVED DUPLICATE of bug 634882
Product: gtk+
Classification: Platform
Component: Widget: Other
2.23.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-11-08 06:24 UTC by Fan, Chun-wei
Modified: 2010-11-15 06:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The updates to gtk/gtktoolitemgroup.c (970 bytes, patch)
2010-11-08 06:24 UTC, Fan, Chun-wei
none Details | Review
Updated patch for gtk/gtktoolitemgroup.c (869 bytes, patch)
2010-11-08 15:37 UTC, Fan, Chun-wei
needs-work Details | Review

Description Fan, Chun-wei 2010-11-08 06:24:59 UTC
Created attachment 174046 [details] [review]
The updates to gtk/gtktoolitemgroup.c

As of GLib 2.27.2, and the upcoming 2.28 and future releases will deprecate g_source_get_current_time, the patch attempts to address that issue by checking the GLib version used (the new code is not usable in GLib 2.26.0 so far).

This is a rough estimate on the code involved by this change, so any comments are welcome.

Thanks
Comment 1 Christian Persch 2010-11-08 11:21:55 UTC
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION > 27) || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION == 27 && GLIB_MICRO_VERSION > 1))

There's the GLIB_CHECK_VERSION macro for that.

Why not just bump the glib req in configure ?
Comment 2 Fan, Chun-wei 2010-11-08 15:37:16 UTC
Created attachment 174063 [details] [review]
Updated patch for gtk/gtktoolitemgroup.c

Thanks Christian for the point...

About the configure part, I would probably not be able to sort that out as I am too familiar with autotools, so perhaps on my side updating the code will be easier
Comment 3 Fan, Chun-wei 2010-11-08 15:39:49 UTC
Sorry, I typed wrongly: it should read  I would probably not be able to sort that out as I am *not* too familiar with autotools

Thanks

> Thanks Christian for the point...
> 
> About the configure part, I would probably not be able to sort that out as I am
> too familiar with autotools, so perhaps on my side updating the code will be
> easier
Comment 4 Javier Jardón (IRC: jjardon) 2010-11-08 15:48:54 UTC
Review of attachment 174063 [details] [review]:

As chpe said, simply bump the Glib required version in configure.ac, so we don't have to use conditional #ifdef code
Comment 5 Matthias Clasen 2010-11-09 17:34:19 UTC
The glib dep has been bumped already.
Comment 6 Javier Jardón (IRC: jjardon) 2010-11-09 18:38:25 UTC
Reopening as this patch is for the gtk-2-24 branch, not master
Comment 7 Fan, Chun-wei 2010-11-15 06:14:02 UTC
Due to changes in GLib 2.27.x, I have posted another patch of changes in bug 634882. Sorry.

*** This bug has been marked as a duplicate of bug 634882 ***