GNOME Bugzilla – Bug 627344
Make GtkTargetEntry a boxed type for introspection
Last modified: 2018-02-10 03:32:37 UTC
Created attachment 168271 [details] [review] Make GtkTargetEntry a boxed type Currently, GtkTargetEntry cannot be used from introspected bindings because it has a string field (target) which cannot be assigned to from introspection. A boxed type should be introduced with a convenience constructor to create a new GtkTargetEntry. Patch attached.
Ping. Could someone maybe review the patch/give feedback. I would like this to go in.
I have to admit that I am a bit confused. Why is this an issue for GtkTargetEntry and not for the fifty other struct types in gtkselection.h ?
This conflicts a bit with bug 565665. Maybe GtkTargetEntry.target should be an interned string instead of strdup'd here?
I don't think you need to be confused, I made the patch on a case basis. Also, there is hardly fifty structs in gtkselection.h (and it's only a problem for structs with pointers). Making it const is a problem because you can't bind that at all anymore.
Yes, interning would work. If you want, I can also fix it for the other two structs.
Ping. I'd like a confirmation that I can go ahead with this approach.
We've now made GtkTargetEntry a boxed type. So whats left here is just string interning.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.