Hi,

> Where you call sleep(), you should run the main loop manually or
> better, return  from the function if possible. If you need to do stuff
> in place of sleep(), you should follow the example in GTK+
> documentation:
>
> Example 2. Updating the GUI during a long computation.
>
>    /* computation going on */
>    ...
>           while (gtk_events_pending ())
>                gtk_main_iteration ();

It should of course be noted that normally the code should react just
to user (and network) events, not poll like above because on a device
with the battery that is extremely bad coding.

The above example is *really* meant only for the case when you have
some computation going which allows the main loop to be run occasionally
so that GUI events (like animation) can be processed.


        - Eero

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to