Re: How do I show window for for just a few seconds(see code)



On Sun, Dec 07, 2003 at 11:21:54AM -0500, george carter wrote:
> Below is an example from "GTK+/GNOME PROGRAMMING".  I've placed a "for 
> loop" in the program because I would like to show the window for a few 
> seconds, destroy it and have another function called.  When I placed it in 
> the program it managed to create the window 5 times instead of showing the 
> window for 5 seconds.  I suppose I want to allow "main" to run for 5 
> seconds and then call "gtk_widget_destroy(window)" but I'm not sure how to 
> go about it.  Any ideas?

use alarm to send a SIGALARM  to the program and call gtk_widget_destroy
or gtk_main_quit from the signal handler.

-- 
Non c'è più forza nella normalità, c'è solo monotonia.

Attachment: pgpKVhyB18kD8.pgp
Description: PGP signature



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