updating appearance of a dialog without gtk_dialog_run?



Hey.

I'm using a dialog to initiate a network action that blocks for a long
time.  I want to update a label on the dialog immediately prior to
getting started with the network crap.  normally I just update a label
with the gtk_label_set_markup() function and see it happen on the
screen.  But, when I call gtk_label_set_markup() and then do
long_blocking_network_operation(), the form doesn't update until the
second function returns which can take a long time.

I'm guessing that this sort of thing...  making the application at least
moderately responsive while a long lived blocking operation happens "in
the background" is handled with threads.  I'd like to avoid using
threads if I can.

I have an idea that involves using a timer to run gtk_dialog_run() for a
very short time, just long enough to update the form before starting the
blocking function.  it would be sort of hackish no doubt.

I'll appreciate any advice given. :) Thanks.

- Ben




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