GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Gary Kramlich
Hi all, I'm working on a GtkTextBuffer subclass that needs to apply tags to to newly inserted text. I've tried all sort of tricks to make this happen automatically, but I am coming up short. Basically the GtkTextView is editable and I'm trying to allow the user to set a format and then start typ

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Karan Ahuja
What are tags applied to ? In the apply tag function - what are the tags applied to. On 13 Jun 2018 12:34, "Gary Kramlich" wrote: > > Hi all, > > I'm working on a GtkTextBuffer subclass that needs to apply tags to to > newly inserted text. I've tried all sort of tricks to make this happen > auto

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Gary Kramlich
I'm not sure I'm following your question unless you're trying to point out that they're applied to GtkTextIter's that are invalidated once the text is changed. That said, something is happening internally in the `_gtk_text_btree` functions that implements the behavior I'm trying to reproduce. If

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Eric Cashon via gtk-app-devel-list
Hi Gary, Test setting up your callback with g_signal_connect_after. Then the location iter should be at the end of the insert. Then the tag can be applied to the inserted text. Eric //gcc -Wall highlight1.c -o highlight1 `pkg-config --cflags --libs gtk+-3.0` #include static gboolea