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 638880 - Need a setter for has_user_ref_count
Need a setter for has_user_ref_count
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-01-07 00:54 UTC by Andrew Cowie
Modified: 2011-02-11 07:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrew Cowie 2011-01-07 00:54:44 UTC
In GTK 2.x we could set a bit in the GtkWindow struct to indicate that we had taken ownership of GTK's Ref to a toplevel, gboolean has_user_ref_count.

My understanding is that this field is for memory-managed language bindings, java-gnome uses this based on guidance from Owen; see the comment at the top of http://research.operationaldynamics.com/bzr/java-gnome/mainline/src/bindings/org/gnome/gtk/GtkWindowOverride.c

It would seem that in a post-GSEAL world, we'll need a public setter to change this field. gtk_window_set_has_user_ref_count(), I guess? Seems a shame to even expose this, but if we don't then please advise how we change the language bindings... otherwise this will be "blocker" for us soon.

Thanks,

AfC
Comment 1 Matthias Clasen 2011-01-07 15:04:01 UTC
ugh, looks like we need a setter then, with heavy "don't use this unless you are AfC" warnings in the docs.
Comment 2 Andrew Cowie 2011-01-08 11:25:54 UTC
Sorry, not trying to be difficult. I did hear someone else mention this on IRC, so at least one other language binding is using this.

But the fact that *everyone* isn't using this does make me wonder, still, whether there a different way you'd prefer us to handle this {shrug}. This is the way Owen wanted us to do it at the time but something may have changed. Let me know.

If you want to give me a private header file to use to invoke it, feel free :)

AfC
Comment 3 Matthias Clasen 2011-01-09 20:07:47 UTC
No need for a private header. Just document this as dangerous and language-binding territory.
Comment 4 Kenneth Prugh 2011-02-11 07:06:25 UTC
Was this supposed to be included in GTK 2.24?