diff -r 0d4e1033731b -r 3f35037a08d4 Debugger/DebugUI.py --- a/Debugger/DebugUI.py Tue Mar 26 19:39:42 2019 +0100 +++ b/Debugger/DebugUI.py Wed Mar 27 20:09:37 2019 +0100 @@ -1013,7 +1013,7 @@ self.debugActGrp.setEnabled(True) - def __clientExit(self, status, message): + def __clientExit(self, status, message, quiet): """ Private method to handle the debugged program terminating. @@ -1021,58 +1021,64 @@ @type int @param message exit message of the debugged program @type str + @param quiet flag indicating to suppress exit info display + @type bool """ self.viewmanager.exit() self.__resetUI() - if not Preferences.getDebugger("SuppressClientExit") or status != 0: - if message: - info = self.tr("<p>Message: {0}</p>").format( - Utilities.html_uencode(message)) - else: - info = "" - if self.ui.currentProg is None: - E5MessageBox.information( - self.ui, Program, - self.tr('<p>The program has terminated with an exit' - ' status of {0}.</p>{1}').format(status, info)) - else: - E5MessageBox.information( - self.ui, Program, - self.tr('<p><b>{0}</b> has terminated with an exit' - ' status of {1}.</p>{2}') - .format(Utilities.normabspath(self.ui.currentProg), - status, info)) - else: - if message: - info = self.tr("Message: {0}").format( - Utilities.html_uencode(message)) - else: - info = "" - if self.ui.notificationsEnabled(): + if not quiet: + if not Preferences.getDebugger("SuppressClientExit") or \ + status != 0: + if message: + info = self.tr("<p>Message: {0}</p>").format( + Utilities.html_uencode(message)) + else: + info = "" if self.ui.currentProg is None: - msg = self.tr('The program has terminated with an exit' - ' status of {0}.\n{1}').format(status, info) + E5MessageBox.information( + self.ui, Program, + self.tr('<p>The program has terminated with an exit' + ' status of {0}.</p>{1}').format(status, info)) else: - msg = self.tr('"{0}" has terminated with an exit' - ' status of {1}.\n{2}')\ - .format(os.path.basename(self.ui.currentProg), - status, info) - self.ui.showNotification( - UI.PixmapCache.getPixmap("debug48.png"), - self.tr("Program terminated"), msg) - else: - if self.ui.currentProg is None: - self.appendStdout.emit( - self.tr('The program has terminated with an exit' - ' status of {0}.\n{1}\n').format(status, info)) - else: - self.appendStdout.emit( - self.tr('"{0}" has terminated with an exit' - ' status of {1}.\n{2}\n') + E5MessageBox.information( + self.ui, Program, + self.tr('<p><b>{0}</b> has terminated with an exit' + ' status of {1}.</p>{2}') .format(Utilities.normabspath(self.ui.currentProg), status, info)) + else: + if message: + info = self.tr("Message: {0}").format( + Utilities.html_uencode(message)) + else: + info = "" + if self.ui.notificationsEnabled(): + if self.ui.currentProg is None: + msg = self.tr( + 'The program has terminated with an exit status of' + ' {0}.\n{1}').format(status, info) + else: + msg = self.tr( + '"{0}" has terminated with an exit status of' + ' {1}.\n{2}').format( + os.path.basename(self.ui.currentProg), status, + info) + self.ui.showNotification( + UI.PixmapCache.getPixmap("debug48.png"), + self.tr("Program terminated"), msg) + else: + if self.ui.currentProg is None: + self.appendStdout.emit(self.tr( + 'The program has terminated with an exit status' + ' of {0}.\n{1}\n').format(status, info)) + else: + self.appendStdout.emit(self.tr( + '"{0}" has terminated with an exit status of' + ' {1}.\n{2}\n').format( + Utilities.normabspath(self.ui.currentProg), status, + info)) def __clientSyntaxError(self, message, filename, lineNo, characterNo): """