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
This commit is contained in:
parent
72fd99f679
commit
b3fb68cb63
1 changed files with 590 additions and 438 deletions
|
|
@ -29,7 +29,7 @@ from logging import debug, info, warning, error
|
|||
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 @@ class Params(object):
|
|||
<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 @@ class Params(object):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue