primitivus, wix: fixed bad defaults values for XMLUI class
This commit is contained in:
parent
70c3c04fee
commit
d66412cb72
2 changed files with 6 additions and 6 deletions
|
|
@ -50,11 +50,11 @@ class InvalidXMLUI(Exception):
|
|||
|
||||
class XMLUI(urwid.WidgetWrap):
|
||||
|
||||
def __init__(self, host, xml_data, title = None, options = [], misc={}):
|
||||
def __init__(self, host, xml_data, title = None, options = None, misc = None):
|
||||
self.host = host
|
||||
self.title = title
|
||||
self.options = options
|
||||
self.misc = misc
|
||||
self.options = options or []
|
||||
self.misc = misc or {}
|
||||
self.__dest = "window"
|
||||
self.ctrl_list = {} # usefull to access ctrl
|
||||
widget = self.constructUI(xml_data)
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ from sat.tools.jid import JID
|
|||
class XMLUI(wx.Frame):
|
||||
"""Create an user interface from a SàT xml"""
|
||||
|
||||
def __init__(self, host, xml_data='', title="Form", options=[], misc={}):
|
||||
def __init__(self, host, xml_data='', title="Form", options = None, misc = None):
|
||||
style = wx.DEFAULT_FRAME_STYLE & ~wx.CLOSE_BOX if 'NO_CANCEL' in options else wx.DEFAULT_FRAME_STYLE #FIXME: gof: Q&D tmp hack
|
||||
super(XMLUI, self).__init__(None, title=title, style=style)
|
||||
|
||||
self.host = host
|
||||
self.options = options
|
||||
self.misc = misc
|
||||
self.options = options or []
|
||||
self.misc = misc or {}
|
||||
self.ctrl_list = {} # usefull to access ctrl
|
||||
|
||||
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue