#is this right? activate settings after load/cancel and use default
self.change()
- def __init__(self, configPath, control, defaultValue, vals):
+ def __init__(self, configPath, control, defaultValue, vals, shouldSave = True):
self.configPath = configPath
self.defaultValue = defaultValue
self.controlType = control
self.vals = vals
self.notifierList = [ ]
self.enabled = True
+ self.shouldSave = shouldSave
self.loadData()
def addNotifier(self, notifier):
self.notifierList.append(notifier);
def reload(self):
self.loadData()
def save(self):
- configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value))
+ if (self.shouldSave == True):
+ configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value))
def getConfigListEntry(description, element):
b = element