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 617179 - [Q2] 2.90 development tasks: Remove all structure fields
[Q2] 2.90 development tasks: Remove all structure fields
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.90.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 617188 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-04-29 14:10 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-01-19 13:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Javier Jardón (IRC: jjardon) 2010-04-29 14:10:09 UTC
Move struct member to the local C file, the rest of GTK+ will then also have to use accessors.

See http://live.gnome.org/GTK%2B/3.0/Tasks#Q2
Comment 1 Javier Jardón (IRC: jjardon) 2010-04-29 14:17:09 UTC
Assign to myself as I'm working on this as my GSoC project.
Comment 2 Javier Jardón (IRC: jjardon) 2010-08-02 23:49:34 UTC
*** Bug 617188 has been marked as a duplicate of this bug. ***
Comment 3 Havoc Pennington 2010-09-07 04:04:35 UTC
Javier, a random thing I noticed; a lot of the TextView internals are heavily entangled, and using accessors will probably make the code less readable, and make some of the performance-critical loops in TextView too slow. Some of the stuff in there really does need to be a tight inner loop (especially for huge buffers).

Basically I'd treat textbtree.c, testiter.c, textchild.c, textdisplay.c, textsegment.c, texttag.c or so as one big logical unit where they can use each other's fields directly. There are already textiterprivate.h, texttagprivate.h, textchildprivate.h, textsegment.h, and textbtree.h (btree and segment are private / not installed), so in many cases just moving the gobject structs over to those private headers may be the right thing to do.

There are plenty of places that could use accessors without harm, but I don't think it's really worth trying to pick that apart, I'd just pretend this cluster of private implementation files is conceptually one big file.

Where you might want to draw a line is between view/buffer and all the other more backend-ish goo. For example privatizing GtkTextLayout fields. But it would be some work.
Comment 4 Javier Jardón (IRC: jjardon) 2011-01-19 13:15:15 UTC
Done! :)