Re: [gtk-list] Dialog on startup
- From: "Michael J. Hammel" <mjhammel graphics-muse org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Dialog on startup
- Date: Sat, 19 Jun 1999 17:19:57 -0600 (MDT)
Thus spoke Ron Forrester
> Is there some way before I call gtk_main(), I can queue up a message
> (signal?) such that once gtk_main() is called, the signal will fire
> and I can popup this dialog box?
Just use a timer set to go off after a short period (and after the main
loop has started) to do the check for you. I do that with my app. It's
easier than trying to program your way around the main loop.
My code looks like this:
disabled_cmds_timer =
gtk_timeout_add (1500, (GtkFunction)XPGTKShowDisabledCmds, NULL);
This routine takes the timeout period, a pointer to the function to call,
and a pointer to user data as it's arguments. The timeout period is in
1000ths of a second.
I make this call right before calling gtk_main(), so about 1.5 seconds
after the main loop gets going I get my XPGTKShowDisabledCmds routine called.
--
Michael J. Hammel | There are always women who will take men on their
The Graphics Muse | own terms. If I were a man I wouldn't bother to
mjhammel@graphics-muse.org | change while there are women like that around.
http://www.graphics-muse.org Ann Oakley, British sociologist, author.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]