8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
12 |
12 |
13 from EricWidgets import EricFileDialog |
13 from eric7.EricWidgets import EricFileDialog |
14 |
14 |
15 from .Ui_GitPatchFilesDialog import Ui_GitPatchFilesDialog |
15 from .Ui_GitPatchFilesDialog import Ui_GitPatchFilesDialog |
16 |
16 |
17 import UI.PixmapCache |
17 from eric7.EricGui import EricPixmapCache |
18 import Utilities |
18 from eric7 import Utilities |
19 |
19 |
20 |
20 |
21 class GitPatchFilesDialog(QDialog, Ui_GitPatchFilesDialog): |
21 class GitPatchFilesDialog(QDialog, Ui_GitPatchFilesDialog): |
22 """ |
22 """ |
23 Class implementing a dialog to select a list of patch files. |
23 Class implementing a dialog to select a list of patch files. |
40 self.patchFilesList.addItems(patchCheckData[0]) |
40 self.patchFilesList.addItems(patchCheckData[0]) |
41 self.stripSpinBox.setValue(patchCheckData[1]) |
41 self.stripSpinBox.setValue(patchCheckData[1]) |
42 self.eofCheckBox.setChecked(patchCheckData[2]) |
42 self.eofCheckBox.setChecked(patchCheckData[2]) |
43 self.lineCountsCheckBox.setChecked(patchCheckData[3]) |
43 self.lineCountsCheckBox.setChecked(patchCheckData[3]) |
44 |
44 |
45 self.addButton.setIcon(UI.PixmapCache.getIcon("plus")) |
45 self.addButton.setIcon(EricPixmapCache.getIcon("plus")) |
46 self.deleteButton.setIcon(UI.PixmapCache.getIcon("minus")) |
46 self.deleteButton.setIcon(EricPixmapCache.getIcon("minus")) |
47 self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow")) |
47 self.upButton.setIcon(EricPixmapCache.getIcon("1uparrow")) |
48 self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow")) |
48 self.downButton.setIcon(EricPixmapCache.getIcon("1downarrow")) |
49 |
49 |
50 self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok) |
50 self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok) |
51 self.__okButton.setEnabled(len(self.__getPatchFilesList()) > 0) |
51 self.__okButton.setEnabled(len(self.__getPatchFilesList()) > 0) |
52 |
52 |
53 self.deleteButton.setEnabled(False) |
53 self.deleteButton.setEnabled(False) |