Commits

Ronny Pfannschmidt  committed 446d1aa

move TracebackWindow to the result views

  • Participants
  • Parent commits 8e2320b

Comments (0)

Files changed (2)

File pytest_gui/gtkui/__init__.py

-
-import gtk
 from pygtkhelpers import gthreads
-from pygtkhelpers.delegates import SlaveView, WindowView
 
 from .main import MainWindow
 
 
-class TracebackWindow(WindowView):
-    def __init__(self, result):
-        self.result = result
-        WindowView.__init__(self)
-
-    def create_ui(self):
-        self.tv = gtk.TextView()
-        self.tv.show()
-                                        #xxx weird for skip/xfail
-        self.tv.get_buffer().set_text(self.result.report.longrepr)
-        self.widget.add(self.tv)
-
-
 def main():
     gthreads.initial_setup()
 
     view = MainWindow()
     # hack to just start the initial collect
     view.run_once(collectonly=True)
-    gtk.main()
+    view.show_and_run()
     return 0

File pytest_gui/gtkui/result.py

 import gtk
 
-from pygtkhelpers.delegates import SlaveView
+from pygtkhelpers.delegates import SlaveView, WindowView
 from pygtkhelpers.ui.objectlist import ObjectTree, Column, Cell
 import logging
 log = logging.getLogger('resultview')
 
     def on_run_collect__clicked(self, btn):
         self.master.run_once(collectonly=True)
+
+
+class TracebackWindow(WindowView):
+    def __init__(self, result):
+        self.result = result
+        WindowView.__init__(self)
+
+    def create_ui(self):
+        self.tv = gtk.TextView()
+        self.tv.show()
+                                        #xxx weird for skip/xfail
+        self.tv.get_buffer().set_text(self.result.report.longrepr)
+        self.widget.add(self.tv)