class descriptionList(choicesList): # XXX: we might want a better name for this
def __list__(self):
if self.type == choicesList.LIST_TYPE_LIST:
class descriptionList(choicesList): # XXX: we might want a better name for this
def __list__(self):
if self.type == choicesList.LIST_TYPE_LIST:
def setChoices(self, choices, default = None):
self.choices = choicesList(choices)
if default is None:
default = self.choices.default()
def setChoices(self, choices, default = None):
self.choices = choicesList(choices)
if default is None:
default = self.choices.default()
def setCurrentText(self, text):
i = self.choices.index(self.value)
self.choices[i] = text
def setCurrentText(self, text):
i = self.choices.index(self.value)
self.choices[i] = text
self.value = self.last_value = self.default = default
def handleKey(self, key):
self.value = self.last_value = self.default = default
def handleKey(self, key):
value = property(getValue, setValue)
_value = property(getValue, setValue)
value = property(getValue, setValue)
_value = property(getValue, setValue)
# until here, 'saved_value' always had to be a *string*.
# now, in ConfigSubsection, and only there, saved_value
# until here, 'saved_value' always had to be a *string*.
# now, in ConfigSubsection, and only there, saved_value
# same as ConfigSubList, just as a dictionary.
# care must be taken that the 'key' has a proper
# same as ConfigSubList, just as a dictionary.
# care must be taken that the 'key' has a proper
self.setSavedValue(tree["config"])
def saveToFile(self, filename):
self.setSavedValue(tree["config"])
def saveToFile(self, filename):