/[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 167 by johnpye, Tue Jan 3 09:54:43 2006 UTC revision 168 by johnpye, Fri Jan 6 01:08:58 2006 UTC
# Line 128  class Browser: Line 128  class Browser:
128          #--------------------          #--------------------
129          # set up the error view          # set up the error view
130    
131          self.errorview = glade.get_widget("errorview")          self.errorview = glade.get_widget("errorview")  
132          errstorecolstypes = [gtk.gdk.Pixbuf,str,str,str,int]          errstorecolstypes = [gtk.gdk.Pixbuf,str,str,str,int]
133          self.errorstore = gtk.TreeStore(*errstorecolstypes)          self.errorstore = gtk.TreeStore(*errstorecolstypes)
134          errtitles = ["","Location","Message"];          errtitles = ["","Location","Message"];
# Line 189  class Browser: Line 189  class Browser:
189    
190          self.methodstore = gtk.ListStore(str)          self.methodstore = gtk.ListStore(str)
191          self.methodsel.set_model(self.methodstore)          self.methodsel.set_model(self.methodstore)
         self.methodsel.set_text_column(0)  
192          _methodrenderer = gtk.CellRendererText()          _methodrenderer = gtk.CellRendererText()
193          self.methodsel.pack_start(_methodrenderer, True)          self.methodsel.pack_start(_methodrenderer, True)
194          self.methodsel.add_attribute(_methodrenderer, 'text',0)          self.methodsel.add_attribute(_methodrenderer, 'text',0)
# Line 286  class Browser: Line 285  class Browser:
285          self.sim = None;          self.sim = None;
286          self.maintabs.set_current_page(0);          self.maintabs.set_current_page(0);
287            
288        # See http://www.daa.com.au/pipermail/pygtk/2005-October/011303.html
289        # for details on how the 'wait cursor' is done.
290      def start_waiting(self, message):      def start_waiting(self, message):
291          self.waitcontext = self.statusbar.get_context_id("waiting")          self.waitcontext = self.statusbar.get_context_id("waiting")
292          self.statusbar.push(self.waitcontext,message)          self.statusbar.push(self.waitcontext,message)
# Line 339  class Browser: Line 340  class Browser:
340          if not self.sim:          if not self.sim:
341              self.reporter.reportError("No model selected yet")              self.reporter.reportError("No model selected yet")
342    
343          _context = self.statusbar.get_context_id("do_solve")          self.start_waiting("Solving...")
         self.statusbar.push(_context,"Solving...")  
         while gtk.events_pending():  
             gtk.main_iteration()  
344    
345          self.sim.solve(ascend.Solver("QRSlv"))          self.sim.solve(ascend.Solver("QRSlv"))
346    
347          self.statusbar.pop(_context)          self.stop_waiting()
348          self.refreshtree()          self.refreshtree()
349    
350      def do_check(self):      def do_check(self):
# Line 687  class Browser: Line 685  class Browser:
685            
686      def auto_toggle(self,button,*args):      def auto_toggle(self,button,*args):
687          if button.get_active():          if button.get_active():
688              self.reporter.reportError("Auto mode is now ON")              self.reporter.reportSuccess("Auto mode is now ON")
689          else:          else:
690              self.reporter.reportError("Auto mode is now OFF")              self.reporter.reportSuccess("Auto mode is now OFF")
691    
692  #   ------------------------------  #   ------------------------------
693  #   CONTEXT MENU  #   CONTEXT MENU

Legend:
Removed from v.167  
changed lines
  Added in v.168

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