comparison gui/containergui_base.py @ 118:30dbbae653ad

If gui_file, in the ContainerGUIBase constructor, is a widget self.gui will now be set to it.
author KarstenBock@gmx.net
date Wed, 05 Oct 2011 10:57:31 +0200
parents 06145a6ee387
children 4826c8cbd7d8
comparison
equal deleted inserted replaced
117:f2ef124128db 118:30dbbae653ad
26 """ 26 """
27 27
28 28
29 def __init__(self, controller, gui_file): 29 def __init__(self, controller, gui_file):
30 self.controller = controller 30 self.controller = controller
31 if isinstance(gui_file, StringTypes): 31 if isinstance(gui_file, pychan.Widget):
32 self.gui = gui_file
33 elif isinstance(gui_file, StringTypes):
32 xml_file = vfs.VFS.open(gui_file) 34 xml_file = vfs.VFS.open(gui_file)
33 self.gui = pychan.loadXML(xml_file) 35 self.gui = pychan.loadXML(xml_file)
34 else: 36 else:
35 self.gui = pychan.loadXML(gui_file) 37 self.gui = pychan.loadXML(gui_file)
36 38