diff 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
line wrap: on
line diff
--- a/tools/memory.py	Wed Aug 18 12:45:48 2010 +0800
+++ b/tools/memory.py	Wed Aug 18 15:57:26 2010 +0800
@@ -40,24 +40,31 @@
     """This class manage parameters with xml"""
     ### TODO: add desciption in params
     
-    #TODO: mettre Watched dans un plugin
+    #TODO: move Watched in a plugin
     default_xml = u"""
     <params>
     <general>
     </general>
     <individual>
-        <category name='"""+_("Connection")+"""'>
+        <category name="Connection" label="%(category_connection)s">
             <param name="JabberID" value="goffi@necton2.int/TestScript" type="string" />
             <param name="Password" value="toto" type="password" />
             <param name="Server" value="necton2.int" type="string" />
-            <param name="NewAccount" value='"""+_("Register new account")+"""' type="button" callback_id="registerNewAccount"/>
+            <param name="NewAccount" value="%(label_NewAccount)s" type="button" callback_id="registerNewAccount"/>
+            <param name="autoconnect" label="%(label_autoconnect)s" value="true" type="bool" />
+            <param name="autodisconnect" label="%(label_autodisconnect)s" value="false"  type="bool" />
         </category>
-        <category name='"""+_("Misc")+"""'>
+        <category name="Misc" label="%(category_misc)s">
             <param name="Watched" value="test@Jabber.goffi.int" type="string" />
         </category>
     </individual>
     </params>
-    """
+    """ % {'category_connection': _("Connection"),
+           'label_NewAccount': _("Register new account"),
+           'label_autoconnect': _('Connect on frontend startup'),
+           'label_autodisconnect': _('Disconnect on frontend closure'),
+           'category_misc': _("Misc")
+          }
 
     def load_default_params(self):
         self.dom = minidom.parseString(Param.default_xml.encode('utf-8'))