Re: about adding pop menu in treeview



hi,

i've also looked for this code a while ago - why don't you try to
exclude the popup menu code from FMDirectoryView, put it into a seperate
class and then reinclude it into FMDirectoryView and the TreeView ?

mfG
Wolfi

Am Don, den 06.11.2003 schrieb Zhiyuan Liu um 05:56:
> I'am thinking about adding pop menu in treeview.
> the nautilus architechture(2.4 version) is not perfect enough for us to 
> add the enhancement of adding pop menu in treeview.
> But we really need this feature in our desktop linux distribution, so 
> I'am planning implement this feature in following way, though it is not 
> a satisfactory way.
> 
> 1. make a class (say, call it FMSimPopmenuView) which inherits from 
> FMDirectoryView, because FMDirectoryView supports
>    almost all the file   operations related to pop-memu, and also 
> FMDirectoryView has it's own pop menu.
>    the FMSimPopmenuView is invisible, so it works in background
> 2. pop up menu in treeview by doing some event simulation. that is , 
> when we right-click some node in the treeview,
>    the  change location  operation is not performed for treeview , the 
> same is for other views such as  
>    FMDirectoryView/location bar etc.
>    Instead , FMSimPopmenuView is made to change location to "the parent 
> node of the selected node", and then is set selection
>    to "the item coresponding to the selected node in the treeview". 
> finally the popmenu for FMSimPopmenuView is activated
>  
> 




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