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

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

 



>> window for 5 seconds.  I suppose I want to allow "main" to run for 5=20
>> seconds and then call "gtk_widget_destroy(window)" but I'm not sure how t=
>o=20
>> 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.

horrible idea. signal handlers are asynchronous with respect to the
event loop, unless you understand how to use glib in ways that i
strongly suspect the questioner does not.

use gtk_timeout_add() to add a callback that will be called in some
number of milliseconds. have the callback hide the window and return
FALSE indicating it does not need to be called again.

--p
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux