/[ascend]/trunk/pygtk/gtkbrowser.py
ViewVC logotype

Diff of /trunk/pygtk/gtkbrowser.py

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

revision 1042 by johnpye, Thu Jan 4 07:35:22 2007 UTC revision 1043 by johnpye, Fri Jan 5 06:24:59 2007 UTC
# Line 487  class Browser: Line 487  class Browser:
487          # options          # options
488    
489          if(len(args)==1):          if(len(args)==1):
490              self.do_open(args[0])              try:
491                    self.do_open(args[0])
492                except RuntimeError,e:
493                    self.reporter.reportError(str(e))
494                    return
495    
496              print "Options: ",self.options              print "Options: ",self.options
497    
# Line 557  class Browser: Line 561  class Browser:
561    
562          print "Filename =",filename          print "Filename =",filename
563          self.statusbar.push(_context,"Loading '"+filename+"'")          self.statusbar.push(_context,"Loading '"+filename+"'")
564          self.library.load(filename)          try:
565                self.filename = filename
566                self.library.load(filename)
567            except RuntimeError,e:
568                self.statusbar.pop(_context)
569                raise
570    
571          print "Statusbar =",self.statusbar          print "Statusbar =",self.statusbar
572          try:          try:
573              self.statusbar.pop(_context)              self.statusbar.pop(_context)
574          except TypeError,e:          except TypeError,e:
575              print "For some reason, a type error (context=%s,filename=%s): %s" % (_context,filename,e)              print "For some reason, a type error (context=%s,filename=%s): %s" % (_context,filename,e)
576    
         self.filename = filename  
   
577          # Load the current list of modules into self.modules          # Load the current list of modules into self.modules
578          self.modtank = {}          self.modtank = {}
579          self.modulestore.clear()          self.modulestore.clear()
# Line 1003  class Browser: Line 1011  class Browser:
1011              _type = self.sim.getType().getName().toString();              _type = self.sim.getType().getName().toString();
1012    
1013          self.library.clear()          self.library.clear()
1014          self.do_open(self.filename)  
1015                    try:
1016          if _type:              self.do_open(self.filename)    
1017              _t = self.library.findType(_type)              if _type:
1018              self.do_sim(_t)                  _t = self.library.findType(_type)
1019                    self.do_sim(_t)
1020            except RuntimeError,e:
1021                self.reporter.reportError(str(e))
1022    
1023      def props_activate(self,widget,*args):      def props_activate(self,widget,*args):
1024          return self.modelview.props_activate(self,widget,*args)          return self.modelview.props_activate(self,widget,*args)

Legend:
Removed from v.1042  
changed lines
  Added in v.1043

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22