comparison tools/memory.py @ 183:9ee4a1d0d7fb

Added auto(dis)connect params + misc - parameters,xmlui: "bool" type is now managed - parameters,xmlui: categories now use label in addition of name - QuickFrontend: auto(dis)connection management - plugin XEP-0045: an error dialog is now show in frontend if room cannot be joined - Wix: fixed unproper close event management
author Goffi <goffi@goffi.org>
date Wed, 18 Aug 2010 15:57:26 +0800
parents 556c2bd7c344
children ca1010f47002
comparison
equal deleted inserted replaced
182:556c2bd7c344 183:9ee4a1d0d7fb
38 38
39 class Param(): 39 class Param():
40 """This class manage parameters with xml""" 40 """This class manage parameters with xml"""
41 ### TODO: add desciption in params 41 ### TODO: add desciption in params
42 42
43 #TODO: mettre Watched dans un plugin 43 #TODO: move Watched in a plugin
44 default_xml = u""" 44 default_xml = u"""
45 <params> 45 <params>
46 <general> 46 <general>
47 </general> 47 </general>
48 <individual> 48 <individual>
49 <category name='"""+_("Connection")+"""'> 49 <category name="Connection" label="%(category_connection)s">
50 <param name="JabberID" value="goffi@necton2.int/TestScript" type="string" /> 50 <param name="JabberID" value="goffi@necton2.int/TestScript" type="string" />
51 <param name="Password" value="toto" type="password" /> 51 <param name="Password" value="toto" type="password" />
52 <param name="Server" value="necton2.int" type="string" /> 52 <param name="Server" value="necton2.int" type="string" />
53 <param name="NewAccount" value='"""+_("Register new account")+"""' type="button" callback_id="registerNewAccount"/> 53 <param name="NewAccount" value="%(label_NewAccount)s" type="button" callback_id="registerNewAccount"/>
54 <param name="autoconnect" label="%(label_autoconnect)s" value="true" type="bool" />
55 <param name="autodisconnect" label="%(label_autodisconnect)s" value="false" type="bool" />
54 </category> 56 </category>
55 <category name='"""+_("Misc")+"""'> 57 <category name="Misc" label="%(category_misc)s">
56 <param name="Watched" value="test@Jabber.goffi.int" type="string" /> 58 <param name="Watched" value="test@Jabber.goffi.int" type="string" />
57 </category> 59 </category>
58 </individual> 60 </individual>
59 </params> 61 </params>
60 """ 62 """ % {'category_connection': _("Connection"),
63 'label_NewAccount': _("Register new account"),
64 'label_autoconnect': _('Connect on frontend startup'),
65 'label_autodisconnect': _('Disconnect on frontend closure'),
66 'category_misc': _("Misc")
67 }
61 68
62 def load_default_params(self): 69 def load_default_params(self):
63 self.dom = minidom.parseString(Param.default_xml.encode('utf-8')) 70 self.dom = minidom.parseString(Param.default_xml.encode('utf-8'))
64 71
65 def load_xml(self, file): 72 def load_xml(self, file):