Re: about adding pop menu in treeview



On Fri, 2003-11-07 at 15:57, Fabio Gomes de Souza wrote:
> Why the Tree itself is not a subclass of FMDirectoryView? If it was, it 
> could already use the popup menu, the icons, the emblems, etc.

Because the tree isn't a directory view. It really doesn't fit what
FMDirectoryView does. FMDirectoryView contains code to load and manage
one directory as shown in the main nautilus view. This really doesn't
fit with what the tree sidebar is. This means all the code in
FMDirectoryView handling this would be useless and even actively bad for
the tree.

Furthermore, this would bring in the main view directory user interface
into the menu structure, even if the main view wasn't a directory. So
you'd get these even when you were viewing something like an image. And
if the main view was a directory view you'd get duplicate handlers for
all the items in there.

I'm not sure what sort of things we want in the tree context menu. Do we
want all the normal ones like cut, make link and rename? If we do, we
might actually want that these are in the main menus too, even if the
main view doesn't show a directory. However, that causes lots of trouble
for the menu operations, I mean, which selection does Edit -> Rename
affect, the one in the tree or the one in the main view. 

I think the right way is for the tree view to have its own BonoboUI file
defining its own context menu, and then a few generic functions need to
be extracted from fm-directory view, for handling things like file
activation and file cut and paste.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an underprivileged guerilla matador fleeing from a secret government 
programme. She's a supernatural African-American widow who believes she is the 
reincarnation of an ancient Egyptian queen. They fight crime! 




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