71 self.process.waitForFinished(3000) |
71 self.process.waitForFinished(3000) |
72 |
72 |
73 if self.__dirtyList: |
73 if self.__dirtyList: |
74 res = E5MessageBox.question( |
74 res = E5MessageBox.question( |
75 self, |
75 self, |
76 self.trUtf8("Unsaved Changes"), |
76 self.tr("Unsaved Changes"), |
77 self.trUtf8("""The guards list has been changed.""" |
77 self.tr("""The guards list has been changed.""" |
78 """ Shall the changes be applied?"""), |
78 """ Shall the changes be applied?"""), |
79 E5MessageBox.StandardButtons( |
79 E5MessageBox.StandardButtons( |
80 E5MessageBox.Apply | |
80 E5MessageBox.Apply | |
81 E5MessageBox.Discard), |
81 E5MessageBox.Discard), |
82 E5MessageBox.Apply) |
82 E5MessageBox.Apply) |
83 if res == E5MessageBox.Apply: |
83 if res == E5MessageBox.Apply: |
114 @param patch selected patch name (empty for current patch) |
114 @param patch selected patch name (empty for current patch) |
115 """ |
115 """ |
116 if self.__dirtyList: |
116 if self.__dirtyList: |
117 res = E5MessageBox.question( |
117 res = E5MessageBox.question( |
118 self, |
118 self, |
119 self.trUtf8("Unsaved Changes"), |
119 self.tr("Unsaved Changes"), |
120 self.trUtf8("""The guards list has been changed.""" |
120 self.tr("""The guards list has been changed.""" |
121 """ Shall the changes be applied?"""), |
121 """ Shall the changes be applied?"""), |
122 E5MessageBox.StandardButtons( |
122 E5MessageBox.StandardButtons( |
123 E5MessageBox.Apply | |
123 E5MessageBox.Apply | |
124 E5MessageBox.Discard), |
124 E5MessageBox.Discard), |
125 E5MessageBox.Apply) |
125 E5MessageBox.Apply) |
126 if res == E5MessageBox.Apply: |
126 if res == E5MessageBox.Apply: |
237 """ |
237 """ |
238 Private slot to remove guard definitions from the list. |
238 Private slot to remove guard definitions from the list. |
239 """ |
239 """ |
240 res = E5MessageBox.yesNo( |
240 res = E5MessageBox.yesNo( |
241 self, |
241 self, |
242 self.trUtf8("Remove Guards"), |
242 self.tr("Remove Guards"), |
243 self.trUtf8( |
243 self.tr( |
244 """Do you really want to remove the selected guards?""")) |
244 """Do you really want to remove the selected guards?""")) |
245 if res: |
245 if res: |
246 for guardItem in self.guardsList.selectedItems(): |
246 for guardItem in self.guardsList.selectedItems(): |
247 row = self.guardsList.row(guardItem) |
247 row = self.guardsList.row(guardItem) |
248 itm = self.guardsList.takeItem(row) |
248 itm = self.guardsList.takeItem(row) |
300 process.readAllStandardError(), ioEncoding, |
300 process.readAllStandardError(), ioEncoding, |
301 'replace') |
301 'replace') |
302 else: |
302 else: |
303 E5MessageBox.warning( |
303 E5MessageBox.warning( |
304 self, |
304 self, |
305 self.trUtf8("Apply Guard Definitions"), |
305 self.tr("Apply Guard Definitions"), |
306 self.trUtf8( |
306 self.tr( |
307 """The Mercurial process did not finish""" |
307 """The Mercurial process did not finish""" |
308 """ in time.""")) |
308 """ in time.""")) |
309 |
309 |
310 if error: |
310 if error: |
311 E5MessageBox.warning( |
311 E5MessageBox.warning( |
312 self, |
312 self, |
313 self.trUtf8("Apply Guard Definitions"), |
313 self.tr("Apply Guard Definitions"), |
314 self.trUtf8("""<p>The defined guards could not be""" |
314 self.tr("""<p>The defined guards could not be""" |
315 """ applied.</p><p>Reason: {0}</p>""") |
315 """ applied.</p><p>Reason: {0}</p>""") |
316 .format(error)) |
316 .format(error)) |
317 else: |
317 else: |
318 self.__dirtyList = False |
318 self.__dirtyList = False |
319 self.on_patchSelector_activated( |
319 self.on_patchSelector_activated( |
320 self.patchNameLabel.text()) |
320 self.patchNameLabel.text()) |