eric6/Debugger/DebugUI.py

changeset 7962
4614e724b083
parent 7959
44e15eda6506
child 7986
2971d5d19951
equal deleted inserted replaced
7961:9a11cf4ca0d6 7962:4614e724b083
1113 self.__clientDisconnected(debuggerId) 1113 self.__clientDisconnected(debuggerId)
1114 1114
1115 if not quiet: 1115 if not quiet:
1116 if not program: 1116 if not program:
1117 program = self.ui.currentProg 1117 program = self.ui.currentProg
1118 if ( 1118
1119 not Preferences.getDebugger("SuppressClientExit") or 1119 if message:
1120 status != 0 1120 info = self.tr("Message: {0}").format(
1121 ): 1121 Utilities.html_uencode(message))
1122 # TODO: test if this is still needed
1123 if message:
1124 info = self.tr("<p>Message: {0}</p>").format(
1125 Utilities.html_uencode(message))
1126 else:
1127 info = ""
1128 if program is None:
1129 E5MessageBox.information(
1130 self.ui, Program,
1131 self.tr('<p>The program has terminated with an exit'
1132 ' status of {0}.</p>{1}').format(status, info)
1133 )
1134 else:
1135 E5MessageBox.information(
1136 self.ui, Program,
1137 self.tr('<p><b>{0}</b> has terminated with an exit'
1138 ' status of {1}.</p>{2}').format(
1139 os.path.abspath(program), status, info)
1140 )
1141 else: 1122 else:
1142 if message: 1123 info = ""
1143 info = self.tr("Message: {0}").format( 1124 if program is None:
1144 Utilities.html_uencode(message)) 1125 msg = self.tr(
1145 else: 1126 '<p>The program has terminated with an exit status of'
1146 info = "" 1127 ' {0}.</p><p>{1}</p>').format(status, info)
1147 if program is None: 1128 else:
1148 msg = self.tr( 1129 msg = self.tr(
1149 'The program has terminated with an exit status of' 1130 '<p><b>{0}</b> has terminated with an exit status of'
1150 ' {0}.\n{1}').format(status, info) 1131 ' {1}.</p><p>{2}</p>').format(
1151 else: 1132 os.path.basename(program), status, info)
1152 msg = self.tr( 1133 if status != 0:
1153 '"{0}" has terminated with an exit status of' 1134 timeout = 0
1154 ' {1}.\n{2}').format( 1135 kind = NotificationTypes.Warning
1155 os.path.basename(program), status, info) 1136 else:
1156 if status != 0: 1137 timeout = None
1157 timeout = 0 1138 kind = NotificationTypes.Information
1158 kind = NotificationTypes.Warning 1139 self.ui.showNotification(
1159 else: 1140 UI.PixmapCache.getPixmap("debug48"),
1160 timeout = None 1141 self.tr("Program terminated"), msg, kind=kind,
1161 kind = NotificationTypes.Information 1142 timeout=timeout)
1162 self.ui.showNotification(
1163 UI.PixmapCache.getPixmap("debug48"),
1164 self.tr("Program terminated"), msg, kind=kind,
1165 timeout=timeout)
1166 1143
1167 def __lastClientExited(self): 1144 def __lastClientExited(self):
1168 """ 1145 """
1169 Private slot handling the exit of the last client. 1146 Private slot handling the exit of the last client.
1170 """ 1147 """

eric ide

mercurial