DebugUI: some fine tuning of the client exit notification.

Tue, 05 Jan 2021 15:14:40 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 05 Jan 2021 15:14:40 +0100
changeset 7958
a70ebfad3d0e
parent 7957
7bdfa13bc3f5
child 7959
44e15eda6506

DebugUI: some fine tuning of the client exit notification.

eric6/Debugger/DebugUI.py file | annotate | diff | comparison | revisions
diff -r 7bdfa13bc3f5 -r a70ebfad3d0e eric6/Debugger/DebugUI.py
--- a/eric6/Debugger/DebugUI.py	Mon Jan 04 19:34:49 2021 +0100
+++ b/eric6/Debugger/DebugUI.py	Tue Jan 05 15:14:40 2021 +0100
@@ -1114,6 +1114,7 @@
                 not Preferences.getDebugger("SuppressClientExit") or
                 status != 0
             ):
+                # TODO: test if this is still needed
                 if message:
                     info = self.tr("<p>Message: {0}</p>").format(
                         Utilities.html_uencode(message))
@@ -1147,9 +1148,13 @@
                         '"{0}" has terminated with an exit status of'
                         ' {1}.\n{2}').format(
                         os.path.basename(program), status, info)
+                if status != 0:
+                    timeout = 0
+                else:
+                    timeout = None
                 self.ui.showNotification(
                     UI.PixmapCache.getPixmap("debug48"),
-                    self.tr("Program terminated"), msg, timeout=0)
+                    self.tr("Program terminated"), msg, timeout=timeout)
     
     def __lastClientExited(self):
         """

eric ide

mercurial