47 self.process.finished.connect(self.__procFinished) |
47 self.process.finished.connect(self.__procFinished) |
48 self.process.readyReadStandardOutput.connect(self.__readStdout) |
48 self.process.readyReadStandardOutput.connect(self.__readStdout) |
49 self.process.readyReadStandardError.connect(self.__readStderr) |
49 self.process.readyReadStandardError.connect(self.__readStderr) |
50 |
50 |
51 self.__statusDict = { |
51 self.__statusDict = { |
52 "A": self.trUtf8("applied"), |
52 "A": self.tr("applied"), |
53 "U": self.trUtf8("not applied"), |
53 "U": self.tr("not applied"), |
54 "G": self.trUtf8("guarded"), |
54 "G": self.tr("guarded"), |
55 "D": self.trUtf8("missing"), |
55 "D": self.tr("missing"), |
56 } |
56 } |
57 |
57 |
58 self.show() |
58 self.show() |
59 QCoreApplication.processEvents() |
59 QCoreApplication.processEvents() |
60 |
60 |
147 if not procStarted: |
147 if not procStarted: |
148 self.inputGroup.setEnabled(False) |
148 self.inputGroup.setEnabled(False) |
149 self.inputGroup.hide() |
149 self.inputGroup.hide() |
150 E5MessageBox.critical( |
150 E5MessageBox.critical( |
151 self, |
151 self, |
152 self.trUtf8('Process Generation Error'), |
152 self.tr('Process Generation Error'), |
153 self.trUtf8( |
153 self.tr( |
154 'The process {0} could not be started. ' |
154 'The process {0} could not be started. ' |
155 'Ensure, that it is in the search path.' |
155 'Ensure, that it is in the search path.' |
156 ).format('hg')) |
156 ).format('hg')) |
157 else: |
157 else: |
158 self.inputGroup.setEnabled(True) |
158 self.inputGroup.setEnabled(True) |
189 if not procStarted: |
189 if not procStarted: |
190 self.inputGroup.setEnabled(False) |
190 self.inputGroup.setEnabled(False) |
191 self.inputGroup.hide() |
191 self.inputGroup.hide() |
192 E5MessageBox.critical( |
192 E5MessageBox.critical( |
193 self, |
193 self, |
194 self.trUtf8('Process Generation Error'), |
194 self.tr('Process Generation Error'), |
195 self.trUtf8( |
195 self.tr( |
196 'The process {0} could not be started. ' |
196 'The process {0} could not be started. ' |
197 'Ensure, that it is in the search path.' |
197 'Ensure, that it is in the search path.' |
198 ).format('hg')) |
198 ).format('hg')) |
199 else: |
199 else: |
200 self.inputGroup.setEnabled(True) |
200 self.inputGroup.setEnabled(True) |
223 self.process = None |
223 self.process = None |
224 |
224 |
225 if self.patchesList.topLevelItemCount() == 0: |
225 if self.patchesList.topLevelItemCount() == 0: |
226 # no patches present |
226 # no patches present |
227 self.__generateItem( |
227 self.__generateItem( |
228 0, "", self.trUtf8("no patches found"), "", True) |
228 0, "", self.tr("no patches found"), "", True) |
229 self.__resizeColumns() |
229 self.__resizeColumns() |
230 self.__resort() |
230 self.__resort() |
231 |
231 |
232 def on_buttonBox_clicked(self, button): |
232 def on_buttonBox_clicked(self, button): |
233 """ |
233 """ |
294 if index == -1: |
294 if index == -1: |
295 index = "" |
295 index = "" |
296 try: |
296 try: |
297 statusStr = self.__statusDict[status] |
297 statusStr = self.__statusDict[status] |
298 except KeyError: |
298 except KeyError: |
299 statusStr = self.trUtf8("unknown") |
299 statusStr = self.tr("unknown") |
300 itm = QTreeWidgetItem(self.patchesList) |
300 itm = QTreeWidgetItem(self.patchesList) |
301 itm.setData(0, Qt.DisplayRole, index) |
301 itm.setData(0, Qt.DisplayRole, index) |
302 itm.setData(1, Qt.DisplayRole, name) |
302 itm.setData(1, Qt.DisplayRole, name) |
303 itm.setData(2, Qt.DisplayRole, statusStr) |
303 itm.setData(2, Qt.DisplayRole, statusStr) |
304 itm.setData(3, Qt.DisplayRole, summary) |
304 itm.setData(3, Qt.DisplayRole, summary) |