Re: [gtk-list] Re: Two gtk_main() ?? What to know ?
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Two gtk_main() ?? What to know ?
- Date: Wed, 8 Sep 1999 18:38:18 +0200 (CEST)
On Wed, 8 Sep 1999, Eric Hegstrom wrote:
> You have to use gtk_grab_.... (it's too early for me to remember but i
> think it's) gtk_grab_event(dialog) and then release them right before
> you call the main quit in to exit the dialog.
it's called gtk_grab_add() and gtk_grab_release(), and gtk_window_set_modal()
automatically takes care of this.
>
> -eric
>
> Sven Anders wrote:
> >
> > On 7 Sep 1999, Owen Taylor wrote:
> >
> > > Sven Anders <anderss@fmi.uni-passau.de> writes:
> > >
> > > > Hello !
> > > >
> > > > I want to use two gtk_main() in my program. I know it is possible.
> > > > What I want to know is, has anybody experience with it and what do
> > > > I have to pay attention to ?!
> > > > Are there any pitfalls ? Any "must not"'s ?
> > > > What do I have to know in addition ?
> > >
> > > I'm not quite sure what you mean by "two gtk_main()"
> > >
> > > One possibility is a recursive gtk_main(). That is, in
> > > some callback, calling gtk_main().
> >
> > Yes, I mean a recursive gtk_main().
> >
> > > This is a commonly used way to handle model dialogs - something
> > > like:
> > >
> > > gtk_window_set_modal (GTK_WINDOW (dialog));
> > > gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
> > > GTK_SIGNAL_FUNC (gtk_main_quit()), NULL);
> > > gtk_widget_show (dialog);
> > > gtk_main();
> >
> > Is this all or can I get in trouble, if I (for instance) do not catch all
> > signals correctly?
> > I tried a slightly different version of the above and had some trouble,
> > because my dialog re-appears after clicking any button. Do I have to clean
> > up all my old events after quitting the second gtk_main() or did I forget
> > something ???
> >
> > Greetings
> > Sven
> > --
> > .-------------------------------------------------------.
> > .^. | Sven Anders, Germany | anderss@fmi.uni-passau.de |
> > /V\ |----------------------| www.fmi.uni-passau.de/~anderss |
> > // \\ | Sites I recommend: `--------------------------------|
> > /( )\ | www.freshmeat.net www.enlightenment.org www.gnome.org |
> > ^^-^^ `-------------------------------------------------------'
> >
> > --
> > To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]