1 |
joko |
1.3 |
import os |
2 |
|
|
|
3 |
xabbu |
1.1 |
import fraggleParserXML |
4 |
joko |
1.3 |
from fraggleEngine import * |
5 |
xabbu |
1.1 |
|
6 |
xabbu |
1.2 |
def create(parent): |
7 |
|
|
return fraggleCtlPreferences(parent) |
8 |
|
|
|
9 |
xabbu |
1.1 |
class fraggleCtlPreferences: |
10 |
|
|
|
11 |
xabbu |
1.2 |
def __init_fraggle_xml__(self): |
12 |
|
|
self.fraggleXML = fraggleParserXML.create(self) |
13 |
xabbu |
1.1 |
|
14 |
|
|
|
15 |
|
|
def __init__(self,parent): |
16 |
|
|
self.__init_fraggle_xml__() |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
#def savePrefs(): |
20 |
|
|
|
21 |
|
|
|
22 |
xabbu |
1.2 |
def setConfig(self,username,password,url,retrieval): |
23 |
|
|
self.configList = {'username': username,'password': password,'url': url,'retrieval': retrieval} |
24 |
|
|
|
25 |
|
|
def getConfig(self): |
26 |
|
|
return self.configList |
27 |
|
|
|
28 |
|
|
def saveConfig(self): |
29 |
joko |
1.3 |
#self.fraggleXML.marshalXML(self.configList,"/home/xabbu/test.xml") |
30 |
|
|
engine = FraggleEngine() |
31 |
|
|
prefsfile = os.path.join(engine.getDefaultDir(), 'prefs.xml') |
32 |
|
|
self.fraggleXML.marshalXML(self.configList, prefsfile) |
33 |
|
|
|