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

Diff of /trunk/pygtk/unitsdialog.py

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

revision 1703 by jpye, Sun Jan 6 03:42:21 2008 UTC revision 1704 by jpye, Sun Jan 6 04:54:18 2008 UTC
# Line 44  class UnitsDialog: Line 44  class UnitsDialog:
44          _col2 = gtk.TreeViewColumn("Conversion", _renderer2, text=2)          _col2 = gtk.TreeViewColumn("Conversion", _renderer2, text=2)
45          self.unitsview.append_column(_col2)          self.unitsview.append_column(_col2)
46    
         print "ACTIVE TYPENAME =",typename  
47          if typename is not None:          if typename is not None:
48              self.typecombo.child.set_text(typename)              self.typecombo.child.set_text(typename)
49          else:          else:
# Line 68  class UnitsDialog: Line 67  class UnitsDialog:
67          #print "changed = ",self.changed          #print "changed = ",self.changed
68          for k,v in self.changed.iteritems():          for k,v in self.changed.iteritems():
69              T = self.browser.library.findType(k)              T = self.browser.library.findType(k)
70              if str(T.getPreferredUnits().getName()) != v:              u = T.getPreferredUnits()
71                if u is None or str(T.getPreferredUnits().getName()) != v:
72                  #print "CAN APPLY: for type '%s', pref units currently '%s', now selected '%s'" % (T.getName(),T.getPreferredUnits().getName(), v)                  #print "CAN APPLY: for type '%s', pref units currently '%s', now selected '%s'" % (T.getName(),T.getPreferredUnits().getName(), v)
73                  can_apply = True                  can_apply = True
74                  break                  break
75          self.applybutton.set_sensitive(can_apply)          self.applybutton.set_sensitive(can_apply)
76    
77      def update_typecombo(self,text = None):      def update_typecombo(self,text = None):
         print "TEXT =",text  
78          m = gtk.ListStore(str)          m = gtk.ListStore(str)
79          for t in self.realtypes:          for t in self.realtypes:
80              if not text or re.compile("^%s"%re.escape(text)).match(str(t.getName())):              if not text or re.compile("^%s"%re.escape(text)).match(str(t.getName())):

Legend:
Removed from v.1703  
changed lines
  Added in v.1704

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