Re: How do I show window for for just a few seconds(see code)
- From: Paul Davis <paul linuxaudiosystems com>
- To: Ottavio Campana <ottavio campana vi it>
- Cc: george carter <cglobal25 hotmail com>, gtk-list gnome org
- Subject: Re: How do I show window for for just a few seconds(see code)
- Date: Sun, 07 Dec 2003 13:05:52 -0500
>> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]