eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListGuardsDialog.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8151
8c1445825e7b
child 8218
7c09585bd960
equal deleted inserted replaced
8153:e01ae92db699 8176:31965986ecd1
27 @param patchesList list of patches (list of strings) 27 @param patchesList list of patches (list of strings)
28 @param parent reference to the parent widget (QWidget) 28 @param parent reference to the parent widget (QWidget)
29 """ 29 """
30 super(HgQueuesListGuardsDialog, self).__init__(parent) 30 super(HgQueuesListGuardsDialog, self).__init__(parent)
31 self.setupUi(self) 31 self.setupUi(self)
32 self.setWindowFlags(Qt.Window) 32 self.setWindowFlags(Qt.WindowType.Window)
33 33
34 self.vcs = vcs 34 self.vcs = vcs
35 self.__hgClient = vcs.getClient() 35 self.__hgClient = vcs.getClient()
36 36
37 self.patchSelector.addItems([""] + patchesList) 37 self.patchSelector.addItems([""] + patchesList)
52 52
53 def start(self): 53 def start(self):
54 """ 54 """
55 Public slot to start the list command. 55 Public slot to start the list command.
56 """ 56 """
57 self.on_patchSelector_activated("") 57 self.on_patchSelector_activated(0)
58 58
59 @pyqtSlot(str) 59 @pyqtSlot(int)
60 def on_patchSelector_activated(self, patch): 60 def on_patchSelector_activated(self, index):
61 """ 61 """
62 Private slot to get the list of guards for the given patch name. 62 Private slot to get the list of guards for the given patch name.
63 63
64 @param patch selected patch name (empty for current patch) 64 @param index index of the selected entry
65 @type int
65 """ 66 """
67 patch = self.patchSelector.itemText(index)
66 self.guardsList.clear() 68 self.guardsList.clear()
67 self.patchNameLabel.setText("") 69 self.patchNameLabel.setText("")
68 70
69 args = self.vcs.initCommand("qguard") 71 args = self.vcs.initCommand("qguard")
70 if patch: 72 if patch:

eric ide

mercurial