42 filter_ = filter |
42 filter_ = filter |
43 filter_ += ";;" |
43 filter_ += ";;" |
44 filter_ += QApplication.translate('Exporter', "All Files (*)") |
44 filter_ += QApplication.translate('Exporter', "All Files (*)") |
45 fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
45 fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
46 self.editor, |
46 self.editor, |
47 self.trUtf8("Export source"), |
47 self.tr("Export source"), |
48 "", |
48 "", |
49 filter_, |
49 filter_, |
50 "", |
50 "", |
51 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
51 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
52 |
52 |
57 if ex: |
57 if ex: |
58 fn += ex |
58 fn += ex |
59 if QFileInfo(fn).exists(): |
59 if QFileInfo(fn).exists(): |
60 res = E5MessageBox.yesNo( |
60 res = E5MessageBox.yesNo( |
61 self.editor, |
61 self.editor, |
62 self.trUtf8("Export source"), |
62 self.tr("Export source"), |
63 self.trUtf8("<p>The file <b>{0}</b> already exists." |
63 self.tr("<p>The file <b>{0}</b> already exists." |
64 " Overwrite it?</p>").format(fn), |
64 " Overwrite it?</p>").format(fn), |
65 icon=E5MessageBox.Warning) |
65 icon=E5MessageBox.Warning) |
66 if not res: |
66 if not res: |
67 return "" |
67 return "" |
68 |
68 |
69 fn = Utilities.toNativeSeparators(fn) |
69 fn = Utilities.toNativeSeparators(fn) |