Re: [gtk-list] Returning control to gtk



Steve Waterworth writes:

> Hi Everybody, I am new to the world of programing in GTK so this
> might be a stupid question but I have yet to find a way to do
> this...

> Inside a callback routine from a button "clicked". I call a number
> of external (an other API) function calls. I want to use a progress
> bar or statusbar messages to let the user know something is
> happening (these API calls can take a long time). However these
> widgets will only get refreshed when my callback exits. So is there
> some call to get GTK to process and update these widgets without
> leaving the callback function?

Your widgets get updated every time you do

         while (gtk_events_pending())
            gtk_main_iteration();

If you do this between your API calls, the process bar will
update.



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