Re: starting up the app



Brian Clark wrote:
Sorry.  I wasn't clear.
I understand that's how to get them to go.  I planned on emitting a
signal, or even just calling the function directly.  But my question is
how to automatically call it one time and only one time after the
windows are set up, since the app is in its main loop and only responds
to events.

The only thing I can think of is to have a mouse motion event and a
flag that says whether it's been called or not.  When the user touches
the mouse, if it hasn't happened yet, the open dialog comes up, and the
flag get set so it doesn't happen again.  But that's REALLY cheesy.

Is there some kind of signal or event that happens when the gtk app is
finished setting up that says "ok.  ready to go" ?

I don't understand your problem.  For instance, I have this as my
main function:

int
gui_back_end_main_default (void)
{
  initialize_main_loop ();

  gtk_control_center_present ();

  run_main_loop ();

  return 0;
}

Essentially, gtk_control_center_present() creates one instance of main
window and calls gtk_window_present() on it, and run_main_loop() calls
gtk_main().  So, if I wanted to open a file chooser, I'd just make it
look like

  ...
  gtk_control_center_present ();
  create_a_file_chooser ();

  run_main_loop ();
  ...

What's wrong with this?

Paul




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