/[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 668 by johnpye, Mon Apr 24 05:54:11 2006 UTC revision 669 by johnpye, Wed Jun 21 07:00:45 2006 UTC
# Line 110  class DiagnoseWindow: Line 110  class DiagnoseWindow:
110          nr = int(rh-rl+1);          nr = int(rh-rl+1);
111          nc = int(ch-cl+1);          nc = int(ch-cl+1);
112    
113          #print "STARTING IMAGE CREATION"          print "STARTING IMAGE CREATION"
114          # refer http://pygtk.org/pygtk2tutorial/sec-DrawingMethods.html          # refer http://pygtk.org/pygtk2tutorial/sec-DrawingMethods.html
115          c = chr(255)          c = chr(255)
116          b = nr*nc*3*[c]          b = nr*nc*3*[c]
# Line 162  class DiagnoseWindow: Line 162  class DiagnoseWindow:
162    
163          d = ''.join(b)          d = ''.join(b)
164    
165          #print "DONE IMAGE CREATION"          print "DONE IMAGE CREATION"
166            
167          self.pixbuf = gtk.gdk.pixbuf_new_from_data(d, gtk.gdk.COLORSPACE_RGB, False, 8 \          self.pixbuf = gtk.gdk.pixbuf_new_from_data(d, gtk.gdk.COLORSPACE_RGB, False, 8 \
168                  , nc, nr, rowstride);                  , nc, nr, rowstride);
# Line 172  class DiagnoseWindow: Line 172  class DiagnoseWindow:
172          self.zoom = -1 # to fit, up to max 16x          self.zoom = -1 # to fit, up to max 16x
173          self.do_zoom()          self.do_zoom()
174    
175          #print "DONE IMAGE TRANSFER TO SERVER"          print "DONE IMAGE TRANSFER TO SERVER"
176    
177          self.fill_var_names()          self.fill_var_names()
178          self.fill_rel_names()          self.fill_rel_names()
# Line 182  class DiagnoseWindow: Line 182  class DiagnoseWindow:
182          self.relname.set_text("");          self.relname.set_text("");
183          self.relresid.set_text("");          self.relresid.set_text("");
184    
185            print "DONE FILL VALUES"
186    
187      def do_zoom(self):      def do_zoom(self):
188          if self.zoom == -1:          if self.zoom == -1:
# Line 212  class DiagnoseWindow: Line 213  class DiagnoseWindow:
213          self.image.set_from_pixbuf(pb1)          self.image.set_from_pixbuf(pb1)
214    
215      def fill_var_names(self):      def fill_var_names(self):
216            print "FILL VAR NAMES"
217    
218          names = [str(i) for i in self.im.getBlockVars(self.block)]          names = [str(i) for i in self.im.getBlockVars(self.block)]
219    
220            print "NAMES:",names
221    
222          if self.varcollapsed.get_active():          if self.varcollapsed.get_active():
223              res = reduce(names)              res = reduce(names)
224              rows = []              rows = []
# Line 227  class DiagnoseWindow: Line 233  class DiagnoseWindow:
233              text = "\n".join(names)              text = "\n".join(names)
234          self.varbuf.set_text(text)          self.varbuf.set_text(text)
235    
236            print "DONE VAR NAMES"
237    
238      def fill_rel_names(self):      def fill_rel_names(self):
239          names = [str(i) for i in self.im.getBlockRels(self.block)]          print "REL NAMES"
240    
241            rels = self.im.getBlockRels(self.block)
242    
243            print "GOT RELS, NOW GETTING NAMES"
244    
245            names = [str(i) for i in rels]
246    
247            print "NAMES =",names
248    
249          if self.relcollapsed.get_active():          if self.relcollapsed.get_active():
250              res = reduce(names)              res = reduce(names)
251              rows = []              rows = []
# Line 243  class DiagnoseWindow: Line 260  class DiagnoseWindow:
260              text = "\n".join(names)              text = "\n".join(names)
261          self.relbuf.set_text(text)          self.relbuf.set_text(text)
262    
263            print "DONE REL NAMES"
264    
265      def set_block(self, block):      def set_block(self, block):
266          self.fill_values(block)          self.fill_values(block)
267    

Legend:
Removed from v.668  
changed lines
  Added in v.669

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