Re: Execution of signal handlers
- From: Tim Müller <t i m zen co uk>
- To: gtk-list gnome org
- Subject: Re: Execution of signal handlers
- Date: Thu, 9 Sep 2004 09:31:14 +0100
On Thursday 09 September 2004 08:58, Grossert Alexander EXT wrote:
> OS: Solaris 9, gtk: version 1.2
>
> I have written a GUI using 2 message windows to show the progress of the
> program. Most of the functions connected to a signal from a button contain
> some sleep() calls between the message outputs. But when pressing a button
> for a short period nothing happens and then suddenly all messages are
> printed out together.
>
> It seems to me the main application window is updated only after the
> function called by the corresponding signal has finished execution.
>
> Can anyone tell me how to force an update of the application window while
> executing the called function?
http://www.gtk.org/faq/#AEN602
In Gtk-1.2 it would probably be something like:
while (gtk_events_pending())
gtk_main_iteration();
If you want a certain function to be called in X seconds, use
gtk_timeout_add() and return FALSE in the timeout callback
function, so that it only gets run once.
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]