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 670376 - gdl uses deprecated GRelation API
gdl uses deprecated GRelation API
Status: RESOLVED FIXED
Product: gdl
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-18 22:31 UTC by Alex Valavanis
Modified: 2012-02-26 11:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to replace GRelation with GArray (5.92 KB, patch)
2012-02-19 10:42 UTC, Alex Valavanis
reviewed Details | Review
Patch to replace GRelation with GArray (6.24 KB, patch)
2012-02-25 16:44 UTC, Alex Valavanis
none Details | Review

Description Alex Valavanis 2012-02-18 22:31:31 UTC
The GRelation API is deprecated in glib >= 2.26,[1] and should be replaced with something else.  This causes issues when gdl is built with G_DISABLE_DEPRECATED defined.

[1] http://developer.gnome.org/glib/2.30/glib-Relations-and-Tuples.html
Comment 1 André Klapper 2012-02-19 09:16:00 UTC
Patches welcome. :)
Comment 2 Alex Valavanis 2012-02-19 09:27:55 UTC
I'm having a look into it... maybe I can replace the GRelation with a GArray of structs that contain fields for the nick and type.
Comment 3 Alex Valavanis 2012-02-19 10:42:27 UTC
Created attachment 207971 [details] [review]
Patch to replace GRelation with GArray

Here's a draft patch that still needs testing.  Please could you let me know if I'm working along the right lines?
Comment 4 Johannes Schmid 2012-02-19 15:30:01 UTC
Review of attachment 207971 [details] [review]:

In general this looks good to me and also the coding style is pretty good - thanks!

You can use the gdl/test-dock app for testing if this helps. Probably I will have a look myself later.

::: src/libgdl/gdl-dock-object.c
@@ -899,3 @@
         return;
     
-    /* FIXME: i don't know if GRelation is efficient */

Must have been one of the few people who knew that GRelation exists at all...
Comment 5 Johannes Schmid 2012-02-19 15:30:53 UTC
And of course a git patch (git format-patch) would be preferred...
Comment 6 Alex Valavanis 2012-02-19 22:42:58 UTC
Hi Johannes,

I'm away from home at the moment, and I don't have a good enough network connection available to clone the gdl repo on my laptop.  I'll certainly take care of it next week, when I'm back home, and format a proper patch.

Some testing by ~suv on the Inkscape team shows that my patch causes a crash when opening/closing multiple docked dialogs.[1]  I guess I must have messed something up in the initialisation/value-lookup.

[1] https://bugs.launchpad.net/inkscape/+bug/933058
Comment 7 Alex Valavanis 2012-02-19 22:42:59 UTC
Hi Johannes,

I'm away from home at the moment, and I don't have a good enough network connection available to clone the gdl repo on my laptop.  I'll certainly take care of it next week, when I'm back home, and format a proper patch.

Some testing by ~suv on the Inkscape team shows that my patch causes a crash when opening/closing multiple docked dialogs.[1]  I guess I must have messed something up in the initialisation/value-lookup.

[1] https://bugs.launchpad.net/inkscape/+bug/933058
Comment 8 Alex Valavanis 2012-02-25 16:44:33 UTC
Created attachment 208412 [details] [review]
Patch to replace GRelation with GArray

Here's an updated git patch that hopefully fixes the issues ~suv spotted with the last version.
Comment 9 Johannes Schmid 2012-02-26 11:36:58 UTC
Thanks, looks good now!