Re: Re: Modal dialog - no more please!
- From: Sven Anders <anderss fmi uni-passau de>
- To: gtk-list redhat com
- Subject: Re: Re: Modal dialog - no more please!
- Date: Tue, 31 Aug 1999 13:47:56 +0200 (MET DST)
On Mon, 30 Aug 1999, Jiang XU wrote:
> The code seems to be not all of them, you do not have signal connect........
> any way, according to the code you show here,
> Do not add gtk_main() in run_dialog(), insdead, put gtk_widget_destroy(dialog)
> in a call back function of some signal connect with the dialog. then put the
> gtk_main() in the main.cpp
>
Yes, aehm No!
What I'm trying to do is to implement an easy call of some modal warning
dialogs. I do not want a new callback for every warning dialog I create...
The main() has the following structure:
one_main_callback()
{
question = run_dialog();
<do something>
}
main()
{
create_main_window_with_callbacks();
gtk_main();
}
> > The structure is the following:
> >
> > callback()
> > {
> > <store result>
> > gtk_main_quit();
> > }
> >
> > run_dialog()
> > {
> > <create dialog with callbacks>
> > gtk_widget_show(dialog);
> > gtk_main();
> > gtk_widget_destroy(dialog);
> > return result;
> > }
> >
> > My modal dialog drives me crazy ?!
> > After closing the dialog and clicking to any other widget it
> > mystically appears again. What's strange is that it does not
> > happen always.
Gruss
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 |
^^-^^ `-------------------------------------------------------'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]