Re: [PATCH] weird parent window selection bug



On Thu, 2004-10-14 at 09:00 -0700, Jimmy Do wrote:
> Hmm, just out of curiosity, do you know why this only happens with
> non-$HOME directories and only on the first time after restarting
> Nautilus? My guess is that GnomeVFS is taking longer to load the
> metadata (but why would it take longer?), so
> selection_changed_callback has a higher chance of being called before
> all of the data is done loading. It's still strange though that this
> bug only happens in such a specific situation and only in list view.

Yes. Its due to the order of the metadata for the files/dirs being
read. 

FMDirectoryView waits on both metadata_for_directory_as_file_pending and
metadata_for_files_in_directory_pending to be read before starting to
read the directory, so if these are both in memory things work out. If
they are not, we get the bug.

Now, for /home that means reading the files ~/.nautilus/metadata called
something like "file:///.xml" (for the directory_as_file) and
"file:///home.xml" (files_in_directory). Since you've
visited /home/user, the metadata file for file:///home is already
loaded, so we're just waiting for metadata_for_directory_as_file. On the
second run both metadata files are cached.

I don't know why it only affected the list view though. Maybe it didn't,
maybe its the fact that we had to load a new view and switch to it
instead of reusing the old view that affected the codepaths taken and
caused the bug.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a scrappy ninja vampire hunter on his last day in the job. She's a 
mentally unstable goth femme fatale operating on the wrong side of the law. 
They fight crime! 




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