10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import pyqtSlot |
12 from PyQt6.QtCore import pyqtSlot |
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
14 |
14 |
15 from eric7 import Utilities |
|
16 from eric7.EricGui import EricPixmapCache |
15 from eric7.EricGui import EricPixmapCache |
17 from eric7.EricWidgets import EricFileDialog |
16 from eric7.EricWidgets import EricFileDialog |
|
17 from eric7.SystemUtilities import FileSystemUtilities |
18 |
18 |
19 from .Ui_GitArchiveDataDialog import Ui_GitArchiveDataDialog |
19 from .Ui_GitArchiveDataDialog import Ui_GitArchiveDataDialog |
20 |
20 |
21 |
21 |
22 class GitArchiveDataDialog(QDialog, Ui_GitArchiveDataDialog): |
22 class GitArchiveDataDialog(QDialog, Ui_GitArchiveDataDialog): |
80 Private slot to select a file via a file selection dialog. |
80 Private slot to select a file via a file selection dialog. |
81 """ |
81 """ |
82 fileName = EricFileDialog.getSaveFileName( |
82 fileName = EricFileDialog.getSaveFileName( |
83 self, |
83 self, |
84 self.tr("Select Archive File"), |
84 self.tr("Select Archive File"), |
85 Utilities.fromNativeSeparators(self.fileEdit.text()), |
85 FileSystemUtilities.fromNativeSeparators(self.fileEdit.text()), |
86 "", |
86 "", |
87 ) |
87 ) |
88 |
88 |
89 if fileName: |
89 if fileName: |
90 root, ext = os.path.splitext(fileName) |
90 root, ext = os.path.splitext(fileName) |
91 if not ext: |
91 if not ext: |
92 ext = "." + self.formatComboBox.currentText() |
92 ext = "." + self.formatComboBox.currentText() |
93 fileName = root + ext |
93 fileName = root + ext |
94 self.fileEdit.setText(Utilities.toNativeSeparators(fileName)) |
94 self.fileEdit.setText(FileSystemUtilities.toNativeSeparators(fileName)) |
95 |
95 |
96 @pyqtSlot(bool) |
96 @pyqtSlot(bool) |
97 def on_revButton_toggled(self, checked): |
97 def on_revButton_toggled(self, checked): |
98 """ |
98 """ |
99 Private slot to handle changes of the rev select button. |
99 Private slot to handle changes of the rev select button. |