Re: Odd GtkTextView behavior



Hi Havoc,

I would imagine it would be a useful fix as from what I can see at the moment there is no way to change the default style of the TextView so that newly inserted characters can use the "current style". This means that when you are typing new text you always have to set the "current style" to each new character, which of course is not good. Is there a way to change the default style of the TextView so that I can do it this way instead of applying tags to the newly typed characters each time.

Thanks for your time

Ian King

Havoc Pennington wrote:

On Thu, 2004-07-08 at 18:51, Ian King [ES] wrote:
I've noticed when using the GtkTextView widget that when it is being used in normal operation, for things such as a word processor or code editor, when the caret is placed at the end of a word and text is entered on the keyboard, the control doesn't print the new text in the style of the previous character. Is this expected behavior or a bug? This can be tested by using the TextView demo launched from gtk-demo.

It is expected, though it's the kind of thing that should probably be
changed in GTK+ 3.0 (i.e. if we ever break the ABI again). Apps such as
gedit track the "current style" and apply it to newly-inserted text
themselves, I believe.

One ABI-compatible patch might be to add a "sticks to newly inserted
text" property to GtkTextTag - don't know if that would work, but if
someone coded the patch and put it in bugzilla it seems like a
reasonable feature. We'd want to cc the gedit guys and other heavy
TextView users on the bug and see if they think it's a useful fix.

Havoc








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