Re: Proposal for making the GtkFileChooser code asynchronous



On Tue, Nov 22, 2005 at 10:09:29AM -0600, Federico Mena Quintero wrote:
> On Tue, 2005-11-22 at 12:07 +0100, Kristian Rietveld wrote:
> > We are indeed going to add a toplevel gtk_file_system_get_info(), I was
> > not thinking of removing gtk_file_folder_get_info() though.  Does it
> > make sense to remove it?  I don't think leaving it were it is now will
> > hurt anything.
> 
> Take it out.  Let's clean out the old API.

I've been thinking about this, suppose we have a scenario where we want
to retrieve one or more properties of all files in a given directory.
With gtk_file_folder_get_info() we would get the folder, wait
for it to finish loading and then retrieve the properties and process
the data in a simple loop, since gtk_file_folder_get_info() is
synchronous.  I think it makes sense to leave gtk_file_folder_get_info() in,
since this is IMHO a lot easier than getting a callback for each file, and do
some bookkeeping to figure out whether all files have been processed.


-kris.



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