Пример #1
0
	def __init__(self, configElementDict, defaultKey):
		ConfigElement.__init__(self)
		self.configElementDict = configElementDict
		if self.configElementDict.has_key(defaultKey):
			self.currentConfig = self.configElementDict[defaultKey]
			self.currentKey = defaultKey
			self.defaultKey = self.currentKey
Пример #2
0
 def __init__(self, configElementDict, defaultKey):
     ConfigElement.__init__(self)
     self.configElementDict = configElementDict
     if self.configElementDict.has_key(defaultKey):
         self.currentConfig = self.configElementDict[defaultKey]
         self.currentKey = defaultKey
         self.defaultKey = self.currentKey
Пример #3
0
 def __init__(self, configElementDict, defaultKey):
     ConfigElement.__init__(self)
     self.configElementDict = configElementDict
     if defaultKey in self.configElementDict:
         self.currentConfig = self.configElementDict[defaultKey]
         self.currentKey = defaultKey
         self.defaultKey = self.currentKey
Пример #4
0
 def __init__(self, choices, default=None):
     ConfigElement.__init__(self)
     self.choices = choicesList(choices)
     self.allow_invalid_choice = None
     self.graphic = False
     try:
         self.choices.additemDescriptionUpdatedCallback(
             self._invalidateCachedDescription)
     except:
         pass
     if default is None:
         default = self.choices.default()
     try:
         self._invalidateCachedDescription()
     except:
         pass
     self._descr = None
     self.default = self._value = self.last_value = default
Пример #5
0
 def __init__(self, action, *args):
     ConfigElement.__init__(self)
     self.value = "(OK)"
     self.action = action
     self.actionargs = args
Пример #6
0
 def __init__(self, action, *args):
     ConfigElement.__init__(self)
     self.value = '(OK)'
     self.action = action
     self.actionargs = args
Пример #7
0
 def __init__(self, default=False, descriptions=boolean_descriptions):
     ConfigElement.__init__(self)
     self.descriptions = descriptions
     self.value = self.last_value = self.default = default
     self.graphic = False