comparison src/parpg/gui/containergui_base.py @ 148:5756e615b029

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 d60f1dab8469
children 6036886b0dea
comparison
equal deleted inserted replaced
147:3aff9dee1b4f 148:5756e615b029
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