Re: Slow loading using GtkTextBuffer/TextView



On Thu, 08 Aug 2002 12:22:52 +0200 "Janus N. T" <j nus person dk> wrote:
I am loading a file into memory with g_file_get_contents and then
converting it to utf8. Then I set the text to be contents of a
GtkTextBuffer like this:
gtk_text_buffer_set_text(buffer, utf8, length);

This all works fast and each function return almost immediately. But
when I create a new GtkTextView with the GtkTextBuffer mentioned above
and shows it, it is still not finished loading the file it seems. Or,
the GtkTextView is extremely slow on updating it's contents. I am not
sure if I have made myself clear here ... but does anyone know a way to
quickly fill a GtkTextBuffer/TextView with a lot of data?

I use
gtk_text_buffer_insert_at_cursor(doc->buffer,data,-1);

but I have no idea if this is faster...

regards,
        Olivier
-- 
"Non-Microsoft email programs are not designed to replicate viruses"
(quote from the Microsoft knowledge database)




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