Re: emblems and nautilus_file_info_invalidate_extension_info



On Sat, 2005-05-28 at 14:22 +0200, Sebastien Estienne wrote:
> hello,
> 
> i've written an extension to share folders, so when a folder is shared
> a palm emblem appears under the folder icon. And when unshared it
> dissappears.
> 
> These parts are working.
> 
> But when i rename the folder, nautilus doesn't call the function, that
> check the folder status (share or unshared)
> 
> When i want nautilus to recheck the status i call this function :
> nautilus_file_info_invalidate_extension_info.
> 
> So i wanted to know if there is a way to call
> nautilus_file_info_invalidate_extension_info when the use rename/mv
> the folder.
> 
> That's true that the "shared status" shouldn't be changed when the
> user just move or rename a folder, but  from the filesystem point of
> view, you can't know if a file has been removed or renamed.
> 
> I tried with things like fam or gamin, and it is never implemented (
> from BUGS: The FAMMoved event is not currently supported.)
> 
> Another solution would be to have a hook on the move/rename event. Can
> it be accessed from an extension?

I don't think you're supposed to need this. Whenever the file changes
nautilus itself invalidates the file info and re-asks for it. In general
you need only call nautilus_file_info_invalidate_extension_info() when
something happened to the file that nautilus doesn't know about.

However, there might be a bug that makes this not work for the case of
renames.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an underprivileged day-dreaming ex-con looking for a cure to the poison 
coursing through his veins. She's a hard-bitten out-of-work nun prone to fits 
of savage, blood-crazed rage. They fight crime! 




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