from time import *
from Tools.NumericalTextInput import *
+from Tools.Directories import *
class configFile:
def __init__(self):
self.changed = 0
self.configElements = { }
try:
- self.file = open("config")
+ self.file = open(resolveFilename(SCOPE_CONFIG, "config"))
except IOError:
print "cannot open config file"
return
if self.changed == 0: #no changes, so no write to disk needed
return
- fileHandle = open("config", "w")
+ fileHandle = open(resolveFilename(SCOPE_CONFIG, "config"), "w")
keys = self.configElements.keys()
keys.sort()
num += 1
# only mark cursor when we are selected
# (this code is heavily ink optimized!)
- return ("mtext"[1-selected:], value, [mPos])
-
+ if (self.parent.enabled == True):
+ return ("mtext"[1-selected:], value, [mPos])
+ else:
+ return ("text", value)
+
class configText:
# used as first parameter
# is the text of a fixed size or is the user able to extend the length of the text