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 748832 - Remove special GdkRectangle case when scanning/reading girepository data
Remove special GdkRectangle case when scanning/reading girepository data
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: libgirepository
2.43.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-05-03 10:53 UTC by Lionel Landwerlin
Modified: 2015-11-05 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scanner/girepository: remove GdkRectangle->CairoRectangleInt automatic conversion (2.19 KB, patch)
2015-05-03 11:00 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2015-05-03 10:53:50 UTC
Following https://bugzilla.gnome.org/show_bug.cgi?id=723394 the property "pointing-to" of GtkPopover became unsettable through Gjs with the following error : 

Gjs-WARNING **: JS ERROR: TypeError: Object is of type cairo.RectangleInt - cannot convert to GdkRectangle

This is because this change made a different between what is returned from introspection data (Cairo.RectangleInt) and when the GObject property gtype is (GdkRectangle).

I'm proposing to simply the current situation by removing this automatic conversion from gobject-introspection, and introducing a ifdef at introspection time in Gdk which will define the GdkRectangle structure to help the parser.
Comment 1 Lionel Landwerlin 2015-05-03 11:00:50 UTC
Created attachment 302796 [details] [review]
scanner/girepository: remove GdkRectangle->CairoRectangleInt automatic conversion
Comment 2 Lionel Landwerlin 2015-05-03 11:06:17 UTC
This GTK+ bug : https://bugzilla.gnome.org/show_bug.cgi?id=748833
Comment 3 Matthias Clasen 2015-05-10 05:02:33 UTC
Review of attachment 302796 [details] [review]:

Looks right to me.
Comment 4 Lionel Landwerlin 2015-05-15 13:21:31 UTC
Should I wait for one of the maintainer to review this patch?
Comment 5 Emmanuele Bassi (:ebassi) 2015-05-15 13:38:51 UTC
Since the GDK patch landed, I think we should land this one as well; we're still in time to catch regressions and revert it.
Comment 6 Lionel Landwerlin 2015-05-15 13:41:48 UTC
Review of attachment 302796 [details] [review]:

Thanks, pushed to master.
Comment 7 Lionel Landwerlin 2015-05-15 13:49:47 UTC
Adding Colin, as recommended by Emmanuele.
Comment 8 Iain Lane 2015-11-05 14:05:13 UTC
This breaks us on Ubuntu where we're using g-i 1.46 with gtk 3.16. pygobject has a test which checks the type of a GdkRectangle (test_class_closure_override_with_aliased_type) which now fails:

  AssertionError: <GdkRectangle at 0x2e3a3c0> is not an instance of <class 'gi.repository.cairo.RectangleInt'>

It seems that this fix was required as a result of 2495edc9fdd604fa9f052b4003a492d2b7230d37 in gtk+ - so is there any way we can conditionalise the code to < 3.17.1?