/[ascend]/trunk/pygtk/interface/preferences.py
ViewVC logotype

Diff of /trunk/pygtk/interface/preferences.py

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

revision 318 by johnpye, Thu Feb 16 02:53:56 2006 UTC revision 319 by johnpye, Thu Feb 23 12:30:40 2006 UTC
# Line 75  class Preferences: Line 75  class Preferences:
75          self.ini.set("PreferredUnits",key,val)          self.ini.set("PreferredUnits",key,val)
76          #print "SET PREFERRED UNITS FOR %s TO %s" % ( key, val )          #print "SET PREFERRED UNITS FOR %s TO %s" % ( key, val )
77    
78      def getBoolPref(self,sect,key):      def getBoolPref(self,sect,key,default=None):
79          try:          try:
80              _u = self.ini.get(sect,key)              _u = self.ini.get(sect,key)
81          except ConfigParser.NoSectionError:          except ConfigParser.NoSectionError:
82              return None              return default
83          except ConfigParser.NoOptionError:          except ConfigParser.NoOptionError:
84              return None              return default
85          if _u:          if _u:
86              return True              return True
87          return False          return False

Legend:
Removed from v.318  
changed lines
  Added in v.319

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