13 |
13 |
14 from PyQt6.QtCore import QTimer, QEvent, pyqtSlot |
14 from PyQt6.QtCore import QTimer, QEvent, pyqtSlot |
15 from PyQt6.QtGui import QFontMetrics, QBrush, QTextCursor |
15 from PyQt6.QtGui import QFontMetrics, QBrush, QTextCursor |
16 from PyQt6.QtWidgets import QWidget, QApplication, QDialogButtonBox |
16 from PyQt6.QtWidgets import QWidget, QApplication, QDialogButtonBox |
17 |
17 |
18 from EricWidgets import EricMessageBox |
18 from eric7.EricWidgets import EricMessageBox |
19 from EricWidgets.EricMainWindow import EricMainWindow |
19 from eric7.EricWidgets.EricMainWindow import EricMainWindow |
20 from EricWidgets.EricPathPicker import EricPathPickerModes |
20 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
21 |
21 |
22 import UI.PixmapCache |
22 from eric7.EricGui import EricPixmapCache |
23 |
23 |
24 from .Ui_CompareDialog import Ui_CompareDialog |
24 from .Ui_CompareDialog import Ui_CompareDialog |
25 |
25 |
26 import Preferences |
26 from eric7 import Preferences |
27 |
27 |
28 |
28 |
29 def sbsdiff(a, b, linenumberwidth=4): |
29 def sbsdiff(a, b, linenumberwidth=4): |
30 """ |
30 """ |
31 Compare two sequences of lines; generate the delta for display side by |
31 Compare two sequences of lines; generate the delta for display side by |
124 self.tr("Press to perform the comparison of the two files") |
124 self.tr("Press to perform the comparison of the two files") |
125 ) |
125 ) |
126 self.diffButton.setEnabled(False) |
126 self.diffButton.setEnabled(False) |
127 self.diffButton.setDefault(True) |
127 self.diffButton.setDefault(True) |
128 |
128 |
129 self.firstButton.setIcon(UI.PixmapCache.getIcon("2uparrow")) |
129 self.firstButton.setIcon(EricPixmapCache.getIcon("2uparrow")) |
130 self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow")) |
130 self.upButton.setIcon(EricPixmapCache.getIcon("1uparrow")) |
131 self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow")) |
131 self.downButton.setIcon(EricPixmapCache.getIcon("1downarrow")) |
132 self.lastButton.setIcon(UI.PixmapCache.getIcon("2downarrow")) |
132 self.lastButton.setIcon(EricPixmapCache.getIcon("2downarrow")) |
133 |
133 |
134 self.totalLabel.setText(self.tr("Total: {0}").format(0)) |
134 self.totalLabel.setText(self.tr("Total: {0}").format(0)) |
135 self.changedLabel.setText(self.tr("Changed: {0}").format(0)) |
135 self.changedLabel.setText(self.tr("Changed: {0}").format(0)) |
136 self.addedLabel.setText(self.tr("Added: {0}").format(0)) |
136 self.addedLabel.setText(self.tr("Added: {0}").format(0)) |
137 self.deletedLabel.setText(self.tr("Deleted: {0}").format(0)) |
137 self.deletedLabel.setText(self.tr("Deleted: {0}").format(0)) |