[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.21, Wed Feb 25 17:08:17 2004 UTC revision 1.23, Thu Mar 25 00:49:56 2004 UTC
# Line 50  Line 50 
50      #------------------------------------------------------------------------      #------------------------------------------------------------------------
51      def initCatEvents(self ):      def initCatEvents(self ):
52      #------------------------------------------------------------------------      #------------------------------------------------------------------------
53          #button1= self.parent.OK_button  
         button1= self.parent.loadbtn  
         EVT_BUTTON(self.parent, self.parent.loadbtn.GetId(),  
                   self.onLoadBtnPress)  
54          EVT_TREE_SEL_CHANGED(self.parent.catalog_tree,          EVT_TREE_SEL_CHANGED(self.parent.catalog_tree,
55                               self.parent.catalog_treeId,                               self.parent.catalog_treeId,
56                               self.onLeftClick)                               self.onLeftClick)
# Line 64  Line 61 
61          EVT_RIGHT_DOWN(self.parent.catalog_tree, self.onRightClickCatalogTree)          EVT_RIGHT_DOWN(self.parent.catalog_tree, self.onRightClickCatalogTree)
62    
63    
64          EVT_LEFT_DCLICK (self.parent.catalog_tree, self.onLoadBtnPress)          EVT_LEFT_DCLICK (self.parent.catalog_tree, self.onLeftDClick)
65    
66          return          return
67    
# Line 142  Line 139 
139    
140          # add it to the list in the catalog          # add it to the list in the catalog
141          try:          try:
142              self.parent.factoryMgr.addFactory( seedServer, seedFactory )              Catalog.instance().addFactory( seedFactory )
143          except:          except:
144              self.parent.error("loadSeedCatalog: %s already in foundry list." % seedServer)              self.parent.error("loadSeedCatalog: %s already in foundry list." % seedServer)
145              wxEndBusyCursor()              wxEndBusyCursor()
# Line 218  Line 215 
215    
216          return          return
217    
     #------------------------------------------------------------------------  
     def onLeftDClick(self,treeEvent):  
     #------------------------------------------------------------------------  
         self.onLoadBtnPress(treeEvent)  
   
         pt = treeEvent.GetPosition()  
         item = self.parent.tree_ctr.HitTest(pt)  
         print item  
         catEntryTuple = self.parent.tree_ctr.GetPyData(item)  
         apply(catEntryTuple[0], catEntryTuple[1])  
         return  
   
         pt = treeEvent.GetPosition()  
   
         item = self.parent.tree_ctr.HitTest(pt)  
   
         print item  
         catEntryTuple = self.parent.tree_ctr.GetPyData(item)  
         #print catEntryTuple, "catEntryTuple"  
         #self.selected = catEntryTuple  
   
         #catEntryTuple = self.selected  
         #apply(catEntryTuple[0], [catEntryTuple[1]])  
   
         return  
   
218    
219      #------------------------------------------------------------------------      #------------------------------------------------------------------------
220      def onLoadBtnPress(self, event):      def onLeftDClick(self, event):
221      #------------------------------------------------------------------------      #------------------------------------------------------------------------
222          if ( self.selected == None ):          if ( self.selected == None ):
223              print "No selection in onLoadBtnPress"              print "No selection in onLoadBtnPress"

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.23

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3