[Gtk-sharp-list] TreeView and filesystem question
Iñigo Illán Aranburu
kodeport at terra.es
Fri May 18 09:34:27 EDT 2007
I wan't to make a FileSystemTreeView widget such that I could add
various roots to the view. I mean, I want to have only one model for the
overall filesystem (not all cached on memory, of course), but I would
like to have various roots on the treeview where those point to
different folders on the filesystem. So I could have a "/" folder, a
$HOME folder and whatever points I want on the roots. What I don't want
is to have data duplicated over various places.
At first, I thought about implementing it using some sort of MVC pattern
by doing my own model (FileSystemModel), gtk-agnostic, and make a
TreeStore be something like a View of my own created FileSystemModel.
Then I realised that this should duplicate data on memory so I thought
on implementing the FileSystemModel as a child of TreeStore.
Unfortunately, I can't figure out how I can achieve this on an elegant
way, so I don't have data duplicated on various points. Can anyone help
me figuring out how to implement it?
Thanks in advance!
P.S: Maybe there is some widget like this implemented already I can use,
but I haven't seen anyone. Getting ideas from Nautilus' one would be
great, but I don't know even where to start, because Nautilus is a big
project for me. Anyway, I will try to implement it using gnome-vfs and
releasing it as a library so other projects could use it.
More information about the Gtk-sharp-list