178 self.process.start('svn', args) |
178 self.process.start('svn', args) |
179 procStarted = self.process.waitForStarted(5000) |
179 procStarted = self.process.waitForStarted(5000) |
180 if not procStarted: |
180 if not procStarted: |
181 self.inputGroup.setEnabled(False) |
181 self.inputGroup.setEnabled(False) |
182 self.inputGroup.hide() |
182 self.inputGroup.hide() |
183 E5MessageBox.critical(self, |
183 E5MessageBox.critical( |
|
184 self, |
184 self.trUtf8('Process Generation Error'), |
185 self.trUtf8('Process Generation Error'), |
185 self.trUtf8( |
186 self.trUtf8( |
186 'The process {0} could not be started. ' |
187 'The process {0} could not be started. ' |
187 'Ensure, that it is in the search path.' |
188 'Ensure, that it is in the search path.' |
188 ).format('svn')) |
189 ).format('svn')) |
385 if not ext: |
386 if not ext: |
386 ex = selectedFilter.split("(*")[1].split(")")[0] |
387 ex = selectedFilter.split("(*")[1].split(")")[0] |
387 if ex: |
388 if ex: |
388 fname += ex |
389 fname += ex |
389 if QFileInfo(fname).exists(): |
390 if QFileInfo(fname).exists(): |
390 res = E5MessageBox.yesNo(self, |
391 res = E5MessageBox.yesNo( |
|
392 self, |
391 self.trUtf8("Save Diff"), |
393 self.trUtf8("Save Diff"), |
392 self.trUtf8("<p>The patch file <b>{0}</b> already exists." |
394 self.trUtf8("<p>The patch file <b>{0}</b> already exists." |
393 " Overwrite it?</p>").format(fname), |
395 " Overwrite it?</p>").format(fname), |
394 icon=E5MessageBox.Warning) |
396 icon=E5MessageBox.Warning) |
395 if not res: |
397 if not res: |
400 try: |
402 try: |
401 f = open(fname, "w", encoding="utf-8", newline="") |
403 f = open(fname, "w", encoding="utf-8", newline="") |
402 f.write(eol.join(self.contents.toPlainText().splitlines())) |
404 f.write(eol.join(self.contents.toPlainText().splitlines())) |
403 f.close() |
405 f.close() |
404 except IOError as why: |
406 except IOError as why: |
405 E5MessageBox.critical(self, self.trUtf8('Save Diff'), |
407 E5MessageBox.critical( |
406 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' |
408 self, self.trUtf8('Save Diff'), |
|
409 self.trUtf8( |
|
410 '<p>The patch file <b>{0}</b> could not be saved.' |
407 '<br>Reason: {1}</p>') |
411 '<br>Reason: {1}</p>') |
408 .format(fname, str(why))) |
412 .format(fname, str(why))) |
409 |
413 |
410 def on_passwordCheckBox_toggled(self, isOn): |
414 def on_passwordCheckBox_toggled(self, isOn): |
411 """ |
415 """ |