Debugger/DebugUI.py

changeset 2191
7c7251ce9497
parent 2171
c7dd548d67d8
child 2192
61b3849df76d
--- a/Debugger/DebugUI.py	Sun Nov 04 16:55:20 2012 +0100
+++ b/Debugger/DebugUI.py	Sun Nov 04 17:39:08 2012 +0100
@@ -959,15 +959,26 @@
                                 ' 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}.\n').format(status))
+            if self.ui.notificationsEnabled():
+                if self.ui.currentProg is None:
+                    msg = self.trUtf8('The program has terminated with an exit'
+                                      ' status of {0}.\n').format(status)
+                else:
+                    msg = self.trUtf8('"{0}" has terminated with an exit'
+                                      ' status of {1}.\n')\
+                            .format(Utilities.normabspath(self.ui.currentProg), status)
+                self.ui.showNotification(UI.PixmapCache.getPixmap("debug48.png"),
+                    self.trUtf8("Program terminated"), msg)
             else:
-                self.appendStdout.emit(
-                    self.trUtf8('"{0}" has terminated with an exit'
-                                ' status of {1}.\n')
-                        .format(Utilities.normabspath(self.ui.currentProg), status))
+                if self.ui.currentProg is None:
+                    self.appendStdout.emit(
+                        self.trUtf8('The program has terminated with an exit'
+                                    ' status of {0}.\n').format(status))
+                else:
+                    self.appendStdout.emit(
+                        self.trUtf8('"{0}" has terminated with an exit'
+                                    ' status of {1}.\n')
+                            .format(Utilities.normabspath(self.ui.currentProg), status))
 
     def __clientSyntaxError(self, message, filename, lineNo, characterNo):
         """

eric ide

mercurial