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