Pyroom should do enforced linewrapping

Bug #371660 reported by Jürgen Geuter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyRoom
Fix Committed
Medium
Florian Heinle
0.4
Fix Committed
Medium
Florian Heinle

Bug Description

PyRoom doesn't do automatic linewrapping of the word is really long (longer than the width of the line).

There should be a property to force pyroom to wrap the text to the next line (maybe adding a marker to the beginning of the line in case it was forcefully wrapped).

Revision history for this message
Florian Heinle (tiax) wrote :

I believe this is fixed by adding horizontal scrollbars if a word is longer than a line. It would either be useful as an indicator that word should be hyphenated manually or aid in scrolling.

Fixed in Revno: 184

Changed in pyroom:
assignee: nobody → Florian Heinle (tiax)
status: New → Fix Committed
Revision history for this message
Florian Heinle (tiax) wrote :

has also been fixed in 0.4 branch, Revision: #187

Changed in pyroom:
importance: Undecided → Medium
Revision history for this message
Jürgen Geuter (tante) wrote :

horizontal Scrollbars would be a great improvement, though I think a preference for "forced linebreaks" would be nice for some:

In gui.py line 152

self.textbox.set_wrap_mode(gtk.WRAP_WORD)

could be made a conditional

if self.config.warpmode == "char":
        self.textbox.set_wrap_mode(gtk.WRAP_CHAR)
else:
        self.textbox.set_wrap_mode(gtk.WRAP_WORD)

It would of course clutter the Pref Window a bit.

Revision history for this message
Florian Heinle (tiax) wrote :

Hi,

thanks for your post. I've considered and tested this approach but I didn't feel very comfortable with changing text contents and not making it obvious that there's something going on the writer might want to have a look at. From my point of view, something's going wrong when there are words that are longer than lines. But my point of view comes from German language, where we compose extraordinarily long composita. Mostly, that would become a problem of style. Could be that I'm missing some corner cases now, though.

Your point about adding another option to the preferences windows is correct. I'd rather avoid that and stick with the scrollbar approach for now

Revision history for this message
Jürgen Geuter (tante) wrote :

What kind of text does the textbox render, is it html? Then it might be an idea to insert "­" into the text when it gets too long cause that indicates to the HTML parser that the word can be wrapped at this point (and a dash is displayed). Of course those characters would have to be stripped when writing the file to disk, but that shouldn't be a problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.