[Bio] / PyGUI / Catalogpanel.py Repository:
ViewVC logotype

Diff of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Fri Aug 1 18:54:31 2003 UTC revision 1.5, Fri Aug 1 20:53:06 2003 UTC
# Line 29  Line 29 
29      #------------------------------------------------------------------------      #------------------------------------------------------------------------
30      def initCatData( self ):      def initCatData( self ):
31      #------------------------------------------------------------------------      #------------------------------------------------------------------------
32          self.parent.catalogRootId = self.parent.catalog_tree.AddRoot("Available Sources")          self.parent.catalogRootId = self.parent.catalog_tree.AddRoot("Data Sources")
33    
34          bssItemId=self.parent.catalog_tree.AppendItem(self.parent.catalogRootId,          bssItemId=self.parent.catalog_tree.AppendItem(self.parent.catalogRootId,
35                                                     "BioSimScratch" )                                                     "BioSimScratch" )
# Line 47  Line 47 
47          for catEntryTuple in b.getLsCat():          for catEntryTuple in b.getLsCat():
48              id=self.parent.catalog_tree.AppendItem(bssItemId, catEntryTuple[0])              id=self.parent.catalog_tree.AppendItem(bssItemId, catEntryTuple[0])
49              self.parent.catalog_tree.SetPyData(id, catEntryTuple)              self.parent.catalog_tree.SetPyData(id, catEntryTuple)
50              EVT_LEFT_DCLICK(self.parent.catalog_tree, self.onLeftClickBss)              EVT_TREE_SEL_CHANGED(self.parent.catalog_tree,
51                                     self.parent.catalog_treeId,
52                                     self.onLeftClickBss)
53    
54          return          return
55    
# Line 59  Line 61 
61          for pwy in pwyList:          for pwy in pwyList:
62              id=self.parent.catalog_tree.AppendItem(witItemId, pwy)              id=self.parent.catalog_tree.AppendItem(witItemId, pwy)
63              self.parent.catalog_tree.SetPyData(id, pwy)              self.parent.catalog_tree.SetPyData(id, pwy)
64              EVT_LEFT_DCLICK(self.parent.catalog_tree, self.onLeftClickWitPwy)              EVT_LEFT_DOWN(self.parent.catalog_tree, self.onLeftClickWitPwy)
65    
66          return          return
67    
# Line 69  Line 71 
71          return          return
72    
73      #------------------------------------------------------------------------      #------------------------------------------------------------------------
74      def onLeftClickBss(self,event):      def onLeftClickBss(self,treeEvent):
75      #------------------------------------------------------------------------      #------------------------------------------------------------------------
76          pt=event.GetPosition()  #        pt=event.GetPosition()
77          item, flags = self.parent.catalog_tree.HitTest(pt)  #        item, flags= self.parent.catalog_tree.HitTest(pt)
78            item = treeEvent.GetItem()
79          catEntryTuple = self.parent.tree_ctr.GetPyData(item)          catEntryTuple = self.parent.tree_ctr.GetPyData(item)
80            if (catEntryTuple == None ):
81                print "No catEntry"
82                return
83            else:
84          print catEntryTuple          print catEntryTuple
85          self.selected = catEntryTuple[1]          self.selected = catEntryTuple[1]
86    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3