GtkText & GtkTextView

Dear All,

I have a question about GtkText. I know that it's deprecated, but at
work I have RH 6.2, which comes with GTK+ 1.2.6-7, which doesn't support
GtkTextView. Now, I'm leaving my present job in two months and I'm
somewhat reluctant to upgrade my system at this point, so I apologize in
advance but I'd like to ask a question about GtkText...

What is the best (i.e. fastest) way to clear GtkText? For the moment I
am using

  gtk_text_set_point(GTK_TEXT(widget), 0);
  gtk_text_forward_delete(GTK_TEXT(widget), (guint)

but cleaning the window this way when I move the window takes a
noteceable amount of time, even though the program outputs only about
15-20 lines of text into it. I was thinking about doing something like

  gtk_text_set_point(GTK_TEXT(widget), 0);

which I was hoping would be faster. But then I guess I should get into
the details of the GtkText structure to set the length of the text to
zero. But then I'd probably have to free the memory allocated for the
old text. That's a lot of trouble for a small result, considering that
my next program will use GtkTextView...

So, is there an easy way?



| Dr. Fil Bonjour                   | Fil Bonjour                       |
| UNICAMP, IMECC, DMA - Room 328    | Rua Alberto de Salvo 53           |
| 13081-970 Campinas SP Brazil      | 13084-670 Campinas SP Brazil      |
| Phone: (++55.19) 3788.60.44       | Phone: (+55.19) 3289.77.84        |
| Fax:   (++55.19) 3289.14.66       |                                   |
| Email: bonjour ime unicamp br     | Email: fbonjour uol com br        |
||                                   |

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