10 import os.path |
10 import os.path |
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 |
18 from eric7.EricWidgets.EricCompleters import EricDirCompleter, EricFileCompleter |
17 from eric7.EricWidgets.EricCompleters import EricDirCompleter, EricFileCompleter |
|
18 from eric7.SystemUtilities import FileSystemUtilities |
19 |
19 |
20 from .Ui_GitCopyDialog import Ui_GitCopyDialog |
20 from .Ui_GitCopyDialog import Ui_GitCopyDialog |
21 |
21 |
22 |
22 |
23 class GitCopyDialog(QDialog, Ui_GitCopyDialog): |
23 class GitCopyDialog(QDialog, Ui_GitCopyDialog): |
66 """ |
66 """ |
67 target = self.targetEdit.text() |
67 target = self.targetEdit.text() |
68 if not os.path.isabs(target): |
68 if not os.path.isabs(target): |
69 sourceDir = os.path.dirname(self.sourceEdit.text()) |
69 sourceDir = os.path.dirname(self.sourceEdit.text()) |
70 target = os.path.join(sourceDir, target) |
70 target = os.path.join(sourceDir, target) |
71 return (Utilities.toNativeSeparators(target), self.forceCheckBox.isChecked()) |
71 return ( |
|
72 FileSystemUtilities.toNativeSeparators(target), |
|
73 self.forceCheckBox.isChecked(), |
|
74 ) |
72 |
75 |
73 @pyqtSlot() |
76 @pyqtSlot() |
74 def on_dirButton_clicked(self): |
77 def on_dirButton_clicked(self): |
75 """ |
78 """ |
76 Private slot to handle the button press for selecting the target via a |
79 Private slot to handle the button press for selecting the target via a |
92 EricFileDialog.DontConfirmOverwrite, |
95 EricFileDialog.DontConfirmOverwrite, |
93 ) |
96 ) |
94 ) |
97 ) |
95 |
98 |
96 if target: |
99 if target: |
97 self.targetEdit.setText(Utilities.toNativeSeparators(target)) |
100 self.targetEdit.setText(FileSystemUtilities.toNativeSeparators(target)) |
98 |
101 |
99 @pyqtSlot(str) |
102 @pyqtSlot(str) |
100 def on_targetEdit_textChanged(self, txt): |
103 def on_targetEdit_textChanged(self, txt): |
101 """ |
104 """ |
102 Private slot to handle changes of the target. |
105 Private slot to handle changes of the target. |