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