Re: turn on italics in TextView
- From: cecashon aol com
- To: dougm bravoecho net
- Cc: gtk-app-devel-list gnome org
- Subject: Re: turn on italics in TextView
- Date: Tue, 15 Aug 2017 14:34:20 -0400
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 cause you grief later on along with buggy
code that may not be so easy to debug.
Very glad you got things working well even with a less than good answer. Need to be careful of the pointers
myself.
Eric
GSList *tlist=NULL;
GSList *p=NULL;
tlist=gtk_text_iter_get_tags(&start);
g_print("List %p p %p\n", tlist, p);
for(p=tlist;p;p=p->next)
{
gchar *string=NULL;
g_object_get(G_OBJECT(p->data), "name", &string, NULL);
g_print("p %p %s\n", p, string);
g_free(string);
}
g_print("List %p\n", tlist);
if(tlist!=NULL) g_slist_free(tlist);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]