Re: [gtk-list] Re: Q: automatic function on program startup



csmall@scooter.o.i.net wrote:
> 
> Eduardo Perez wrote:
> > Many thanks for your interest, but I'm afraid this is not what I'm
> > looking for.
> >
> > I need to make some calculations after the first window is shown, second
> > window must be shown when calculations end; calculations show their
> > progress on the first window.
> >
> > It's something like a progress window when a program starts while
> > getting ready, then main window appears.
> 
> OK, so something like this pseudo code?
> 
> show_window_1();
> while(!finished) {
>   finished = do_my_special_calcs();
>   update_window_1();
> }
> show_window_2();
> 
> Now, you are going to have some problems here, if your calculations are
> *that* intense that it will be a while for them to complete, poor old
> gtk_main() won't get a lookin, which is a Bad Thing.  It means important
> stuff like window redrawing will not happen.  I am unsure if there is a
> like a release() command where you give up some cycles every now and then
> for gtk_main to do its thing.
> 
> I can see some troubles with these calculations.
> 
>   - Craig
> 
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

The truth is that my calculations are very intense; in fact, they throw
my computer to a load of one. Moreover, calculations must be done only
once; I could do a part of them on each call of do_my_special_calcs, but
this will mess the code too much.

Greetings.



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