GNOME Bugzilla – Bug 624034
TextView freezes when packed in a hbox within a Viewport (if wrap_mode = WRAP_WORD_CHAR)
Last modified: 2014-08-19 10:34:45 UTC
Created attachment 165620 [details] Test case v3 In a program where I packed a bunch of GtkTextView in a horizontal box, and placed them in a GtkViewport, gtk freezes if the GtkTextView wrap_mode is set to GTK_WRAP_WORD_CHAR. See the accompanying test case to see what I mean. The bug report for the program that triggered this program: https://bugzilla.novell.com/show_bug.cgi?id=620513
Probably Pango would have been the better "Product" to assign this bug to.
I should point out that the wrap_mode seems to make more likely the misbehavior in the test case. But, in our real case, it was enough to fix the problem. Setting the hbox homogeneous property as FALSE did the trick -- and we then emulated that property by simply specifying an equal fixed width to its children. This fixed width can be 1, since what we are aiming for is to get hbox to distribute the extra space among the children, which it does in equal doses.
typo: - But, in our real case, it was enough to fix the problem. + But, in our real case, it was NOT enough to fix the problem.
GtkTextView already implements the GtkScrollable interface, so you can directly add it to a GtkScrolledWindow, no need to add it to a GtkViewport.
No. In our product, we wanted to have several widgets -- one of them being GtkTextView -- and we wanted them all to be within a scrollable area. (it was a panel similar to a webpage) This was a several years ago, so I do not recall the details. Anyhow it triggered a crash somewhere within the GTK stack. Might be fixed in GTK3 dunno.