Re: emblems and nautilus_file_info_invalidate_extension_info
- From: Alexander Larsson <alexl redhat com>
- To: Sebastien Estienne <sebastien estienne gmail com>
- Cc: nautilus-list gnome org
- Subject: Re: emblems and nautilus_file_info_invalidate_extension_info
- Date: Thu, 02 Jun 2005 15:52:16 +0200
On Thu, 2005-06-02 at 12:26 +0200, Sebastien Estienne wrote:
> 2005/6/2, Alexander Larsson <alexl redhat com>:
> > 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.
> yes, that's what i was expecting
> Is there something like a cache, and calling
> nautilus_file_info_invalidate_extension_info ask to flush the cached
> info on a specified folder ?
>
> >
> > However, there might be a bug that makes this not work for the case of
> > renames.
> Could you tell me where i could look in nautilus code to see if it's a
> bug or not?
When a file is changed, nautilus_directory_notify_files_changed() calls
nautilus_file_invalidate_extension_info_internal(). You can try
debugging to see if this happens in your case, or what happens instead.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a witless umbrella-wielding dog-catcher fleeing from a secret government
programme. She's a scantily clad mutant cab driver from aristocratic European
stock. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]