core, frontends: XMLUI refactoring:
- now there is a base XMLUI class. Frontends inherits from this class, and add their specific widgets/containers/behaviour
- wix: param.py has been removed, as the same behaviour has been reimplemented through XMLUI
- removed "misc" argument in XMLUI.__init__
- severals things are broken (gateway, directory search), following patches will fix them
- core: elements names in xml_tools.dataForm2XMLUI now use a construction with category_name/param_name to avoid name conflicts (could happen with 2 parameters of the same name in differents categories).
This commit is contained in:
parent
41ce40b0e4
commit
256a110471
1 changed files with 757 additions and 602 deletions
|
|
@ -24,7 +24,6 @@ from sat_frontends.quick_frontend.quick_app import QuickApp
|
|||
import wx
|
||||
from sat_frontends.wix.contact_list import ContactList
|
||||
from sat_frontends.wix.chat import Chat
|
||||
from sat_frontends.wix.param import Param
|
||||
from sat_frontends.wix.xmlui import XMLUI
|
||||
from sat_frontends.wix.gateways import GatewaysManager
|
||||
from sat_frontends.wix.profile import Profile
|
||||
|
|
@ -56,7 +55,7 @@ class MainWindow(wx.Frame, QuickApp):
|
|||
|
||||
def __init__(self):
|
||||
QuickApp.__init__(self)
|
||||
wx.Frame.__init__(self,None, title="SàT Wix", size=(300,500))
|
||||
wx.Frame.__init__(self,None, title="SàT Wix", size=(350,500))
|
||||
|
||||
#sizer
|
||||
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
|
@ -407,7 +406,17 @@ class MainWindow(wx.Frame, QuickApp):
|
|||
|
||||
def onParam(self, e):
|
||||
debug(_("Param request"))
|
||||
param = Param(self)
|
||||
def success(params):
|
||||
XMLUI(self, xml_data=params, title=_("Configuration"))
|
||||
|
||||
def failure(error):
|
||||
dlg = wx.MessageDialog(self, unicode(error),
|
||||
_('Error'),
|
||||
wx.OK | wx.ICON_ERROR
|
||||
)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
self.bridge.getParamsUI(app=Const.APP_NAME, profile_key=self.profile, callback=success, errback=failure)
|
||||
|
||||
def onAbout(self, e):
|
||||
about = wx.AboutDialogInfo()
|
||||
|
|
|
|||
Loading…
Reference in a new issue