diff src/memory/memory.py @ 802:9007bb133009

core, frontends: XMLUI refactoring: - XMLUI now use objects with 2 main classes: widgets (button, label, etc), and container which contain widgets according to a layout - widgets and containers classes are found through introspection, thereby it's really easy to add a new one - there is still the AddWidgetName helper, for example AddText('jid', 'test@example.net') will add a StringWidget with name "jid" and default value "test@example.net" - container can be inside other containers. changeContainer change the first parent container
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 18:19:00 +0100
parents 900987e1c0c4
children 1fe00f0c9a91
line wrap: on
line diff
--- a/src/memory/memory.py	Tue Feb 04 18:06:12 2014 +0100
+++ b/src/memory/memory.py	Tue Feb 04 18:19:00 2014 +0100
@@ -29,7 +29,7 @@
 from twisted.internet import defer, reactor
 from twisted.words.protocols.jabber import jid
 from twisted.python.failure import Failure
-from sat.tools.xml_tools import paramsXml2xmlUI
+from sat.tools.xml_tools import paramsXML2XMLUI
 from sat.core.default_config import default_config
 from sat.memory.sqlite import SqliteStorage
 from sat.memory.persistent import PersistentDict
@@ -130,7 +130,7 @@
             <param name="Priority" value="50" type="string" />
             <param name="Server" value="example.org" type="string" />
             <param name="Port" value="5222" type="string" />
-            <param name="NewAccount" value="%(label_NewAccount)s" type="button" callback_id="registerNewAccount"/>
+            <param name="NewAccount" label="%(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>
@@ -621,7 +621,7 @@
             error(_("Asking params for inexistant profile"))
             return ""
         d = self.getParams(security_limit, app, profile)
-        return d.addCallback(lambda param_xml: paramsXml2xmlUI(param_xml))
+        return d.addCallback(lambda param_xml: paramsXML2XMLUI(param_xml))
 
     def getParams(self, security_limit, app, profile_key):
         """Construct xml for asked profile, take params xml as skeleton