Problem forcing display of text



I'm writing an application collects inputs, then reads a lot of data.  As the data is being read, I have a dialog that contains a progress bar (showing percent complete), and a text widget to display runtime messages.

I'm using pthreads.  The code that reads all the data is started as a separate thread.  This thread (the I/O thread) is doing the gtk_text_buffer_insert calls to show the runtime messages.  The progress bar is being updated with a timeout function back in the main thread based on data updated in the I/O thread. 

No problem with the progress bar and I'm confident that the thread code is implemented correctly.

I can't seem to force the data in the text buffer to be displayed in the text widget as it is inserted.  It's there, I just can't see it right away.

Moving the mouse in and out of the window displays some text, but it takes a click in the text widget to get everything displayed once the I/O thread is done.  I don't want to force the user to do any silly stuff like that.

Updating the text widget from the timeout does not help - still requires the window focus change or click to display the text.

It seems like I could send an expose-event or something from the timeout function to refresh the text widget, but I can't figure out how to do it.

I'm kinda new to gtk.  Thanks in advance for any help.

Mickey.



MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.

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