Re: Destroying file selection (fwd)



Hi Michael,

On Mon, 3 Feb 2003, Michael Hagemann wrote:
> What makes me suspicious about your code is the following line:
> 
> >   g_signal_connect (GTK_FILE_SELECTION (filesel)->ok_button, "destroy", 
> >     G_CALLBACK (gtk_main_quit), NULL);
> 
> This seems to kill the app as soon as the filesel is destroyed!?

	OH YES!  Yes, that's the problem...thank you!  I don't know what I
was doing here...perhaps something silly like if the fileselection is
killed, then kill the whole program.  Which is ...hmmmm... "ok", but what
I have above is definitely wrong.  I feel so silly for looking at the
"Cancel" button for so long, though.

	Hmmm, but if that was the case, doesn't the program get killed if
I click the OK button, but not the cancel button?  I might have to look at
it a bit deeper...but thanks so much for finding that offending line!

> And the thing I liked most about the 2.0 series is that you now have
> gtk_dialog_run().  I typically us it with a generic accept function
> along the lines of:

	Thanks, I'll keep that in mind!  I didn't realise that was
possible and I'm afraid I can write a GTK+ program, but I don't know how
to write a "safe" one very well.  Thanks again!

Ray






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