On Tue, May 26, 2009 at 8:39 PM, Bruce van der Kooij <brucevdko...@gmail.com> wrote: > Mike Rooney wrote: >> >> Does anyone have any tips on this (refreshing the folder from a python >> extension)? It is really blocking my work on this extension and thus >> shipping it. If not, is there a better place for this question? > > I haven't actually thought this through but just to not leave you hanging > here's what crossed my mind. Store all the NautilusVFSFile's in a dictionary > you get through update_file_info, get_file_items and get_background_items > and then after clicking your button call invalidate_extension_info on the > directory. > > If it's no good, let me know.
Thanks Bruce, I'll check this out. I'm worried that something like this may not work as the action my extension performs is similar to swapping a symlink for the current directory. So, you type A in your nautilus bar, which maps to B, so you see the contents of B. You click a button and the extension now maps A to C, so refreshing B won't help. Nautilus needs to know to refresh to "base" location in the location bar. So I think this is why pressing F5 works just fine, but touching files, adding files et cetera, doesn't help because nautilus is looking in B and not C. There doesn't seem to be anything I can do in B or C that will make it refresh the contents based on A. Does this make sense? Is there a way to mark "A" as dirty and needing to be refreshed? -- Michael Rooney mroo...@gmail.com -- nautilus-list mailing list nautilus-list@gnome.org http://mail.gnome.org/mailman/listinfo/nautilus-list