changeset 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 3aff9dee1b4f
children eab3e1e52497
files src/parpg/gui/containergui_base.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/gui/containergui_base.py	Wed Oct 05 10:54:56 2011 +0200
+++ b/src/parpg/gui/containergui_base.py	Wed Oct 05 10:57:31 2011 +0200
@@ -28,7 +28,9 @@
 
     def __init__(self, controller, gui_file):
         self.controller = controller
-        if isinstance(gui_file, StringTypes):
+        if isinstance(gui_file, pychan.Widget):
+            self.gui = gui_file
+        elif isinstance(gui_file, StringTypes):
             xml_file = vfs.VFS.open(gui_file)
             self.gui = pychan.loadXML(xml_file)
         else: