Re: Nautilus emblem in extensions



On Fri, 2005-06-17 at 14:10 +0200, Raphaël Slinckx wrote:
> Hi !
> 
> On a totally related note, i was playing with the file info provider.
> 
> In the docs, it is clear that when a file needs an updated the callback
> is invoked. It also states that if you want to recompute a file info
> because of an external change, you should call file_info_invalidate on
> it (something along these lines).
> 
> But i fail to see how you are warned when a file becomes old, cause you
> never have a callback indicating that nautilus is no more interested in
> a file, so if you maintain all files in a list, you can never know when
> to remove them, thus rendering invalidating unnecessary (and maybe
> dangerous ?).
> 
> What is the correct way of handling that ?

Nautilus keeps NautilusFiles (and thus NautilusFileInfo) objects around
for as long as they are interesting. If you want to cache something, use
weak references on the FileInfo object.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a maverick drug-addicted gentleman spy with a secret. She's a 
green-fingered mute archaeologist with an incredible destiny. They fight 
crime! 




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