75 self.process.terminate() |
75 self.process.terminate() |
76 QTimer.singleShot(2000, self.process.kill) |
76 QTimer.singleShot(2000, self.process.kill) |
77 self.process.waitForFinished(3000) |
77 self.process.waitForFinished(3000) |
78 |
78 |
79 if self.__dirtyList: |
79 if self.__dirtyList: |
80 res = E5MessageBox.question(self, |
80 res = E5MessageBox.question( |
|
81 self, |
81 self.trUtf8("Unsaved Changes"), |
82 self.trUtf8("Unsaved Changes"), |
82 self.trUtf8("""The guards list has been changed.""" |
83 self.trUtf8("""The guards list has been changed.""" |
83 """ Shall the changes be applied?"""), |
84 """ Shall the changes be applied?"""), |
84 E5MessageBox.StandardButtons( |
85 E5MessageBox.StandardButtons( |
85 E5MessageBox.Apply | \ |
86 E5MessageBox.Apply | \ |
117 name. |
118 name. |
118 |
119 |
119 @param patch selected patch name (empty for current patch) |
120 @param patch selected patch name (empty for current patch) |
120 """ |
121 """ |
121 if self.__dirtyList: |
122 if self.__dirtyList: |
122 res = E5MessageBox.question(self, |
123 res = E5MessageBox.question( |
|
124 self, |
123 self.trUtf8("Unsaved Changes"), |
125 self.trUtf8("Unsaved Changes"), |
124 self.trUtf8("""The guards list has been changed.""" |
126 self.trUtf8("""The guards list has been changed.""" |
125 """ Shall the changes be applied?"""), |
127 """ Shall the changes be applied?"""), |
126 E5MessageBox.StandardButtons( |
128 E5MessageBox.StandardButtons( |
127 E5MessageBox.Apply | \ |
129 E5MessageBox.Apply | \ |
239 @pyqtSlot() |
241 @pyqtSlot() |
240 def on_removeButton_clicked(self): |
242 def on_removeButton_clicked(self): |
241 """ |
243 """ |
242 Private slot to remove guard definitions from the list. |
244 Private slot to remove guard definitions from the list. |
243 """ |
245 """ |
244 res = E5MessageBox.yesNo(self, |
246 res = E5MessageBox.yesNo( |
|
247 self, |
245 self.trUtf8("Remove Guards"), |
248 self.trUtf8("Remove Guards"), |
246 self.trUtf8( |
249 self.trUtf8( |
247 """Do you really want to remove the selected guards?""")) |
250 """Do you really want to remove the selected guards?""")) |
248 if res: |
251 if res: |
249 for guardItem in self.guardsList.selectedItems(): |
252 for guardItem in self.guardsList.selectedItems(): |
301 if process.exitCode() != 0: |
304 if process.exitCode() != 0: |
302 error = str( |
305 error = str( |
303 process.readAllStandardError(), ioEncoding, |
306 process.readAllStandardError(), ioEncoding, |
304 'replace') |
307 'replace') |
305 else: |
308 else: |
306 E5MessageBox.warning(self, |
309 E5MessageBox.warning( |
|
310 self, |
307 self.trUtf8("Apply Guard Definitions"), |
311 self.trUtf8("Apply Guard Definitions"), |
308 self.trUtf8( |
312 self.trUtf8( |
309 """The Mercurial process did not finish""" |
313 """The Mercurial process did not finish""" |
310 """ in time.""")) |
314 """ in time.""")) |
311 |
315 |
312 if error: |
316 if error: |
313 E5MessageBox.warning(self, |
317 E5MessageBox.warning( |
|
318 self, |
314 self.trUtf8("Apply Guard Definitions"), |
319 self.trUtf8("Apply Guard Definitions"), |
315 self.trUtf8("""<p>The defined guards could not be""" |
320 self.trUtf8("""<p>The defined guards could not be""" |
316 """ applied.</p><p>Reason: {0}</p>""")\ |
321 """ applied.</p><p>Reason: {0}</p>""")\ |
317 .format(error)) |
322 .format(error)) |
318 else: |
323 else: |