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

Diff of /trunk/pygtk/diagnose.py

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

revision 1109 by johnpye, Thu Jan 11 04:07:02 2007 UTC revision 2071 by jose, Fri Aug 28 02:42:47 2009 UTC
# Line 39  class DiagnoseWindow: Line 39  class DiagnoseWindow:
39          self.zoomentry = _xml.get_widget("zoomentry")          self.zoomentry = _xml.get_widget("zoomentry")
40    
41          self.var = None; self.rel = None          self.var = None; self.rel = None
42          self.varname = _xml.get_widget("varname")          self.varname = _xml.get_widget("varname1")
43          self.varval = _xml.get_widget("varval")          self.varval = _xml.get_widget("varval")
44          self.varinfobutton = _xml.get_widget("varinfobutton")          self.varinfobutton = _xml.get_widget("varinfobutton")
45          self.relname = _xml.get_widget("relname")          self.relname = _xml.get_widget("relname1")
46          self.relresid = _xml.get_widget("relresid")          self.relresid = _xml.get_widget("relresid")
47          self.relinfobutton = _xml.get_widget("relinfobutton")          self.relinfobutton = _xml.get_widget("relinfobutton")
48    
# Line 196  class DiagnoseWindow: Line 196  class DiagnoseWindow:
196    
197      def fill_selection_info(self):      def fill_selection_info(self):
198          if self.var:          if self.var:
199              self.varname.set_text(self.var.getName())              #self.varname.set_text(self.var.getName())
200              self.varval.set_text(str(self.var.getValue()))              self.varval.set_text(str(self.var.getValue()))
201              self.varinfobutton.set_sensitive(True)              self.varinfobutton.set_sensitive(True)
202          else:          else:
# Line 230  class DiagnoseWindow: Line 230  class DiagnoseWindow:
230              self.zoom = MAX_ZOOM_RATIO              self.zoom = MAX_ZOOM_RATIO
231    
232          if self.zoom * self.nc > MAX_ZOOM_SIZE or self.zoom * self.nr > MAX_ZOOM_SIZE:          if self.zoom * self.nc > MAX_ZOOM_SIZE or self.zoom * self.nr > MAX_ZOOM_SIZE:
233              self.browser.reporter.reportNode("image is too big, reducing to MAX_ZOOM_SIZE = %f" % MAX_ZOOM_SIZE);              self.browser.reporter.reportNote("image is too big, reducing to MAX_ZOOM_SIZE = %f" % MAX_ZOOM_SIZE);
234              self.zoom = MAX_ZOOM_SIZE / max(self.nc,self.nr)              self.zoom = MAX_ZOOM_SIZE / max(self.nc,self.nr)
235    
236          #self.browser.reporter.reportNote("Diagnose window: matrix zoom = %f" % self.zoom)          #self.browser.reporter.reportNote("Diagnose window: matrix zoom = %f" % self.zoom)
# Line 475  def reduce(names): Line 475  def reduce(names):
475      for k, g in groupby(data, lambda x: len(x)):      for k, g in groupby(data, lambda x: len(x)):
476          if k == 1:          if k == 1:
477              indexed = {}              indexed = {}
478              seq = set(get(indexed, item) for item in g)              seq = set([get(indexed, item) for item in g])
479              res['[global]'] = [ i+fold(indexed.get(i, [])) for i in sorted(seq) ]              res['[global]'] = [ i+fold(indexed.get(i, [])) for i in sorted(seq) ]
480          else:          else:
481              for key, g1 in groupby(g, lambda x: '.'.join(x[:-1])):              for key, g1 in groupby(g, lambda x: '.'.join(x[:-1])):

Legend:
Removed from v.1109  
changed lines
  Added in v.2071

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