[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.18, Thu Nov 13 19:21:46 2003 UTC revision 1.23, Thu Mar 25 00:49:56 2004 UTC
# Line 4  Line 4 
4  from FaST.SeedDataFactory import SeedDataFactory  from FaST.SeedDataFactory import SeedDataFactory
5  from FaST.SeedDataFactory import SeedOrganism  from FaST.SeedDataFactory import SeedOrganism
6  from FaST.RecoElem import RecoElem  from FaST.RecoElem import RecoElem
7  from RecoElempanel import RecoElemWindow  from RecoElempanel import RecoElempanel
8    
9    
10    
11  class CatalogWindow:  class Catalogpanel:
12  #    def __init__(self, parent):  #    def __init__(self, parent):
13  #    def initCatEvents(self ):  #    def initCatEvents(self ):
14  #    def initCatData( self ):  #    def initCatData( self ):
# Line 50  Line 50 
50      #------------------------------------------------------------------------      #------------------------------------------------------------------------
51      def initCatEvents(self ):      def initCatEvents(self ):
52      #------------------------------------------------------------------------      #------------------------------------------------------------------------
53          button1= self.parent.OK_button  
         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 63  Line 61 
61          EVT_RIGHT_DOWN(self.parent.catalog_tree, self.onRightClickCatalogTree)          EVT_RIGHT_DOWN(self.parent.catalog_tree, self.onRightClickCatalogTree)
62    
63    
64          # doesn't work...          EVT_LEFT_DCLICK (self.parent.catalog_tree, self.onLeftDClick)
         # EVT_LEFT_DCLICK (self.parent.catalog_tree, self.onLeftDClick)  
65    
66          return          return
67    
# Line 141  Line 138 
138          seedFactory   = SeedDataFactory( seedServer )          seedFactory   = SeedDataFactory( seedServer )
139    
140          # add it to the list in the catalog          # add it to the list in the catalog
141          self.parent.factoryMgr.addFactory( seedServer, seedFactory )          try:
142                Catalog.instance().addFactory( seedFactory )
143            except:
144                self.parent.error("loadSeedCatalog: %s already in foundry list." % seedServer)
145                wxEndBusyCursor()
146                return
147    
148          # make an entry in the tree for it          # make an entry in the tree for it
149          #          #
# Line 213  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.18  
changed lines
  Added in v.1.23

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3