Debugger UI: added code to show a notification when a new debug client has been connected. multi_processing

Tue, 15 Dec 2020 18:07:56 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 15 Dec 2020 18:07:56 +0100
branch
multi_processing
changeset 7876
9164a5c0d4a6
parent 7875
12c621ed4377
child 7877
72386134c80a

Debugger UI: added code to show a notification when a new debug client has been connected.

eric6/Debugger/DebugUI.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebugViewer.py file | annotate | diff | comparison | revisions
--- a/eric6/Debugger/DebugUI.py	Mon Dec 14 19:59:03 2020 +0100
+++ b/eric6/Debugger/DebugUI.py	Tue Dec 15 18:07:56 2020 +0100
@@ -153,7 +153,21 @@
         
         # Set a flag for the passive debug mode
         self.passive = Preferences.getDebugger("PassiveDbgEnabled")
+    
+    def showNotification(self, notification):
+        """
+        Public method to show some notification message.
         
+        @param notification meessage to be shown
+        @type str
+        """
+        if self.ui.notificationsEnabled():
+            self.ui.showNotification(
+                UI.PixmapCache.getPixmap("debug48"),
+                self.tr("Notification"), notification)
+        else:
+            self.appendStdout.emit(notification)
+    
     def variablesFilter(self, scope):
         """
         Public method to get the variables filter for a scope.
--- a/eric6/Debugger/DebugViewer.py	Mon Dec 14 19:59:03 2020 +0100
+++ b/eric6/Debugger/DebugViewer.py	Tue Dec 15 18:07:56 2020 +0100
@@ -717,6 +717,9 @@
         @type str
         """
         self.__debuggersCombo.addItem(debuggerId)
+        self.debugUI.showNotification(
+            self.tr("<p>Debugger with ID <b>{0}</b> has been connected.")
+            .format(debuggerId))
     
     def getSelectedDebuggerId(self):
         """

eric ide

mercurial