Re: Hello there



Michael wrote:
> But , my application needs to get critical information from the dialog ,
> for example , a 'save to file' dialog in a routine must return a file
> name and the application cannot continue if it doesn't know the file .

Hi Michael, the official gtk way to do this is with nested main loops. Something
like:

-- 
my_function()
{
	make a file dialog
	attach an "OK" signal handler (see below)
	make the dialog modal
	call gtk_main() to loop on the dialog
	read out the filename
	do some processing
}

my_ok_signal_handler()
{
	call gtk_main_quit() ... this will make 
	the call to gtk_main() above return.
}
-- 

Of course, modal dialogs are usually thought to be user interface evil, and you
should be non-modal if you possibly can.

HTH, John




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