--- a/eric6/Debugger/DebugUI.py Tue Jan 05 15:14:40 2021 +0100 +++ b/eric6/Debugger/DebugUI.py Tue Jan 05 18:28:31 2021 +0100 @@ -13,19 +13,21 @@ from PyQt5.QtGui import QKeySequence from PyQt5.QtWidgets import QMenu, QToolBar, QApplication, QDialog +from E5Gui.E5Action import E5Action, createActionGroup +from E5Gui import E5MessageBox + from UI.Info import Program +from UI.NotificationWidget import NotificationTypes from .DebugClientCapabilities import ( HasDebugger, HasInterpreter, HasProfiler, HasCoverage ) + import Preferences import Utilities import UI.PixmapCache import UI.Config -from E5Gui.E5Action import E5Action, createActionGroup -from E5Gui import E5MessageBox - from eric6config import getConfig @@ -159,19 +161,22 @@ # Set a flag for the passive debug mode self.passive = Preferences.getDebugger("PassiveDbgEnabled") - def showNotification(self, notification, timeout=None): + def showNotification(self, notification, + kind=NotificationTypes.Information, timeout=None): """ Public method to show some notification message. @param notification message to be shown @type str + @param kind kind of notification to be shown + @type NotificationTypes @param timeout timeout for the notification (None = use configured default, 0 = indefinitely) @type int """ self.ui.showNotification( UI.PixmapCache.getPixmap("debug48"), - self.tr("Notification"), notification, timeout=timeout) + self.tr("Notification"), notification, kind=kind, timeout=timeout) def variablesFilter(self, scope): """ @@ -1150,11 +1155,14 @@ os.path.basename(program), status, info) if status != 0: timeout = 0 + kind = NotificationTypes.Warning else: timeout = None + kind = NotificationTypes.Information self.ui.showNotification( UI.PixmapCache.getPixmap("debug48"), - self.tr("Program terminated"), msg, timeout=timeout) + self.tr("Program terminated"), msg, kind=kind, + timeout=timeout) def __lastClientExited(self): """