9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo, Qt |
12 from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo, Qt |
13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, \ |
13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, \ |
14 QTextCursor, QFileDialog, QLineEdit |
14 QTextCursor, QLineEdit |
15 |
15 |
16 from E5Gui import E5MessageBox |
16 from E5Gui import E5MessageBox, E5FileDialog |
17 |
17 |
18 from .Ui_HgDiffDialog import Ui_HgDiffDialog |
18 from .Ui_HgDiffDialog import Ui_HgDiffDialog |
19 |
19 |
20 import Utilities |
20 import Utilities |
21 import Preferences |
21 import Preferences |
261 else: |
261 else: |
262 fname = dname |
262 fname = dname |
263 else: |
263 else: |
264 fname = self.vcs.splitPath(self.filename)[0] |
264 fname = self.vcs.splitPath(self.filename)[0] |
265 |
265 |
266 fname, selectedFilter = QFileDialog.getSaveFileNameAndFilter( |
266 fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
267 self, |
267 self, |
268 self.trUtf8("Save Diff"), |
268 self.trUtf8("Save Diff"), |
269 fname, |
269 fname, |
270 self.trUtf8("Patch Files (*.diff)"), |
270 self.trUtf8("Patch Files (*.diff)"), |
271 None, |
271 None, |
272 QFileDialog.Options(QFileDialog.DontConfirmOverwrite | |
272 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
273 QFileDialog.DontUseNativeDialog)) |
|
274 |
273 |
275 if not fname: |
274 if not fname: |
276 return # user aborted |
275 return # user aborted |
277 |
276 |
278 ext = QFileInfo(fname).suffix() |
277 ext = QFileInfo(fname).suffix() |