40 """ |
40 """ |
41 fileFilter += ";;" |
41 fileFilter += ";;" |
42 fileFilter += QCoreApplication.translate('Exporter', "All Files (*)") |
42 fileFilter += QCoreApplication.translate('Exporter', "All Files (*)") |
43 fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
43 fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
44 self.editor, |
44 self.editor, |
45 self.tr("Export source"), |
45 QCoreApplication.translate('Exporter', "Export source"), |
46 "", |
46 "", |
47 fileFilter, |
47 fileFilter, |
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.tr("Export source"), |
60 QCoreApplication.translate( |
61 self.tr("<p>The file <b>{0}</b> already exists." |
61 'Exporter', "Export source"), |
62 " Overwrite it?</p>").format(fn), |
62 QCoreApplication.translate( |
|
63 'Exporter', |
|
64 "<p>The file <b>{0}</b> already exists." |
|
65 " Overwrite it?</p>").format(fn), |
63 icon=E5MessageBox.Warning) |
66 icon=E5MessageBox.Warning) |
64 if not res: |
67 if not res: |
65 return "" |
68 return "" |
66 |
69 |
67 fn = Utilities.toNativeSeparators(fn) |
70 fn = Utilities.toNativeSeparators(fn) |