Re: How to close FileChooserDialog immediately after selection of file?



argnu wrote:
> In my program a file gets chosen and then a routine taking this file as
> parameter starts which takes some time.
> My problem is: the FileChooserDialog closes only _after_ the routine has
> finished. 
> I want the Dialog to be closed _before_ the routine starts.

It's been a while since I look at this, but isn't this so that the routine can
make a validity check of the response and bail out of the operation and let the
user try a different file?

Consider registering a one-shot idle handler to run the operation that takes
some time when there is nothing else to do like updating the GUI.

Also, if the operation takes really long, you want to do something about that so
that the GUI remains responsive.  Do the work in batches when gtk is idle.

Thanks,
Marcus



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