10 from PyQt6.QtCore import pyqtSlot, Qt, QCoreApplication |
10 from PyQt6.QtCore import pyqtSlot, Qt, QCoreApplication |
11 from PyQt6.QtWidgets import QDialog, QListWidgetItem |
11 from PyQt6.QtWidgets import QDialog, QListWidgetItem |
12 |
12 |
13 from .Ui_HgQueuesListGuardsDialog import Ui_HgQueuesListGuardsDialog |
13 from .Ui_HgQueuesListGuardsDialog import Ui_HgQueuesListGuardsDialog |
14 |
14 |
15 import UI.PixmapCache |
15 from eric7.EricGui import EricPixmapCache |
16 |
16 |
17 |
17 |
18 class HgQueuesListGuardsDialog(QDialog, Ui_HgQueuesListGuardsDialog): |
18 class HgQueuesListGuardsDialog(QDialog, Ui_HgQueuesListGuardsDialog): |
19 """ |
19 """ |
20 Class implementing a dialog to show the guards of a selected patch. |
20 Class implementing a dialog to show the guards of a selected patch. |
79 patchName, guards = output.split(":", 1) |
79 patchName, guards = output.split(":", 1) |
80 self.patchNameLabel.setText(patchName) |
80 self.patchNameLabel.setText(patchName) |
81 guardsList = guards.strip().split() |
81 guardsList = guards.strip().split() |
82 for guard in guardsList: |
82 for guard in guardsList: |
83 if guard.startswith("+"): |
83 if guard.startswith("+"): |
84 icon = UI.PixmapCache.getIcon("plus") |
84 icon = EricPixmapCache.getIcon("plus") |
85 guard = guard[1:] |
85 guard = guard[1:] |
86 elif guard.startswith("-"): |
86 elif guard.startswith("-"): |
87 icon = UI.PixmapCache.getIcon("minus") |
87 icon = EricPixmapCache.getIcon("minus") |
88 guard = guard[1:] |
88 guard = guard[1:] |
89 else: |
89 else: |
90 icon = None |
90 icon = None |
91 guard = self.tr("Unguarded") |
91 guard = self.tr("Unguarded") |
92 itm = QListWidgetItem(guard, self.guardsList) |
92 itm = QListWidgetItem(guard, self.guardsList) |