Re: gtk_timeout_add / SIGALRM with gtk



Colin Thomas wrote:
Hello.

I am developing an application which is basically a lots of buttons, no
drawing areas. When one button is depressed, the application runs a
compute intensive job for 20 minutes. While this is happening though the
main screen does not refresh, and slowly becomes obiterated.

You have two solutions to consider:
    A.) Modify your "compute intensive job" so that it can be identified
        in short itterations that either AA) return to the main loop
        or AB) gtk_main_iteration(); (i.e. nest the main loop)

    B.) If this "compute intensive job" is a single function call from
        a third party then you will have to run it in a thread (which
        can be alot more complicated then solution A).


Cheers,
                             -Tristan




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