Hi Doug,
I would consider it a usability bug but not necessarily a textview widget bug.
If you add text, that doesn't have an indent tag, to the start of the line then
it doesn't get indented. I suppose you could check the whole line for an indent
tag but that would go against performance.
Indeed I tried your code from Aug 15 and if you insert a character at the
beginning of the 3rd or 5th line, the indent/margin disappears. Then if
you backspace over that inserted character, the indent/margin re-appears.
I tried this in <3.20 and 3.22. Would you consider this a bug? I've never
re
Indeed, gtk_text_buffer_insert_with_tags_by_name() does what it says. What
I was talking about was (in some future Textview) applying the tag to an
iter, then whenever the insert point was on that iter, it would inherit the
tag properties set there. So typing at that point gets the formatting.
I
Have you tried gtk_text_buffer_insert_with_tags_by_name() to insert text with a
tag at an iter?
What tag combo do you use to get the cursor to bounce around? If I test having
two indent tags on the same line, the first one applied wins out. This is what
I tested with.
Eric
/*
gcc -Wall mo
Heh-heh, yes that for loop does look better :-) I'll use that.
Textview is awesome and will save me thousands of lines of code, but not
being able to apply a tag to an iter -- that has been a big drawback for
me. You can discover a tag at an iter, but only apply/remove it to a
range. It would b
Hi Doug,
I made a bit of a pointer mess there. Not the best of answers or way to go
about iterating through a list. Looking at some GTK code, this is better done
with a for loop. As usual, you don't want to move the pointer you get from
gtk_text_iter_get_tags() and then free it. This will
char *string=NULL;
> g_object_get(G_OBJECT(p->data), "name", &string, NULL);
> g_print("%s\n", string);
> g_free(string);
> if(next!=NULL)p=g_slist_next(p);
> }while(next!=NULL);
>}
xt(p);
}while(next!=NULL);
}
else g_print("No Tag\n");
if(tlist!=NULL) g_slist_free(tlist);
...
-Original Message-
From: Eric Cashon via gtk-app-devel-list
To: dougm
Cc: gtk-app-devel-list
Sent: Tue, Jun 20, 2017 4:48 pm
Subject: Re: turn on italics
Another option is to look at the properties of the tags to get the information
that you need. This might work better than saving globals and matching pointers.
Eric
...
GSList *tlist=NULL;
GSList *next=NULL;
tlist=gtk_text_iter_get_tags(&start);
if(tlist!=NULL)
{
re-painted.
>
> https://developer.gnome.org/gtk3/stable/chap-drawing-model.html
>
> Eric
>
>
>
> -Original Message-
> From: Doug McCasland
> To: cecashon
> Sent: Tue, Jun 13, 2017 4:09 pm
> Subject: Re: turn on italics in TextView
>
> cecashon, than
From: Doug McCasland
To: cecashon
Sent: Tue, Jun 13, 2017 4:09 pm
Subject: Re: turn on italics in TextView
cecashon, thanks so much for your great reply!
I had tried all those calls, but I hadn't put them together as you did, nor did
I apply the tag in the way your code does. And I
Hi Doug,
You can try using the "insert-text" callback to set your italics on the
inserted text. This is what I came up with to test. The signal is connected
after so that the update occurs first. Careful about not changing the location
iter also since there is a warning in the documentation
Hi,
I am trying GTK3 TextView, in C. I know how to apply tags, such as italics,
bold, etc., to a region of text.
But how do I "turn on" a style (italics, bold, etc) while typing in the
buffer? For example, suppose I am typing text and there are no styles set.
Then I want to type in italics. I wan
13 matches
Mail list logo