Re: wrong wordwrap behaviour




gale@daedalus.dra.hmg.gb writes:

> The text widget now does word wrap on word boundaries, which is
> good, but the behaviour of the function gtk_text_set_word_wrap is, I
> would argue, wrong.  This function toggles between the text widget
> wrapping whole words and breaking words across lines. The Motif, and
> IMO correct, behaviour is to *always* wrap words on word boundaries
> and for wordwrap itself to be toggled - this used to be the
> behaviour under GTK aswell.

First, if you try fooling around with the default text in testgtk,
toggling word-wrap and changing the width. I think you'll appreciate
why I left the capability to break on characters. Word wrap for
code does not produce good results.

My intention was to have seperate functions

 gtk_text_set_word_wrap (text, word_wrap);
 gtk_text_set_line_wrap (text, line_wrap);

[ I suppose that could be combined into 

   gtk_text_set_wrap (text, GTK_WRAP_[NONE/WORDS/CHARS]) ]

The second could be implemented now easily enough. (And can
be simulated by setting GTK_TEXT (text)->line_wrap = FALSE).

But you would quickly discover why it hasn't been done. Horizontal
scrolling is not yet implemented. ;-)

(You might want to just not show the horizontal scrollbar for now).

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]