Debugger/DebugUI.py

changeset 755
e81e1f8d7874
parent 564
b3d966393ba9
child 761
de0723fab049
diff -r c3c3fec166f5 -r e81e1f8d7874 Debugger/DebugUI.py
--- a/Debugger/DebugUI.py	Sat Dec 18 15:11:10 2010 +0100
+++ b/Debugger/DebugUI.py	Sat Dec 18 18:11:02 2010 +0100
@@ -40,6 +40,8 @@
     @signal resetUI() emitted to reset the UI
     @signal exceptionInterrupt() emitted after the execution was interrupted by an
         exception and acknowledged by the user
+    @signal appendStdout(msg) emitted when the client program has terminated and the
+        display of the termination dialog is suppressed
     """
     clientStack = pyqtSignal(list)
     resetUI = pyqtSignal()
@@ -47,6 +49,7 @@
     compileForms = pyqtSignal()
     compileResources = pyqtSignal()
     debuggingStarted = pyqtSignal(str)
+    appendStdout = pyqtSignal(str)
     
     def __init__(self, ui, vm, debugServer, debugViewer, project):
         """
@@ -940,14 +943,24 @@
         
         if not Preferences.getDebugger("SuppressClientExit") or status != 0:
             if self.ui.currentProg is None:
-                E5MessageBox.information(self.ui,Program,
+                E5MessageBox.information(self.ui, Program,
                     self.trUtf8('<p>The program has terminated with an exit'
                                 ' status of {0}.</p>').format(status))
             else:
-                E5MessageBox.information(self.ui,Program,
+                E5MessageBox.information(self.ui, Program,
                     self.trUtf8('<p><b>{0}</b> has terminated with an exit'
                                 ' status of {1}.</p>')
                         .format(Utilities.normabspath(self.ui.currentProg), status))
+        else:
+            if self.ui.currentProg is None:
+                self.appendStdout.emit(
+                    self.trUtf8('The program has terminated with an exit'
+                                ' status of {0}.').format(status))
+            else:
+                self.appendStdout.emit(
+                    self.trUtf8('"{0}" has terminated with an exit'
+                                ' status of {1}.')
+                        .format(Utilities.normabspath(self.ui.currentProg), status))
 
     def __clientSyntaxError(self, message, filename, lineNo, characterNo):
         """
@@ -1978,4 +1991,4 @@
         
         @return list of all actions (list of E5Action)
         """
-        return self.actions[:]
\ No newline at end of file
+        return self.actions[:]

eric ide

mercurial