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

changeset 7533
88261c96484b
parent 7370
5fb53279f2df
child 7923
91e843545d9a
equal deleted inserted replaced
7532:1358e9d67a1c 7533:88261c96484b
43 self.__hgClient = vcs.getClient() 43 self.__hgClient = vcs.getClient()
44 44
45 self.__patches = patchesList[:] 45 self.__patches = patchesList[:]
46 self.patchSelector.addItems([""] + self.__patches) 46 self.patchSelector.addItems([""] + self.__patches)
47 47
48 self.plusButton.setIcon(UI.PixmapCache.getIcon("plus.png")) 48 self.plusButton.setIcon(UI.PixmapCache.getIcon("plus"))
49 self.minusButton.setIcon(UI.PixmapCache.getIcon("minus.png")) 49 self.minusButton.setIcon(UI.PixmapCache.getIcon("minus"))
50 50
51 self.__dirtyList = False 51 self.__dirtyList = False
52 self.__currentPatch = "" 52 self.__currentPatch = ""
53 53
54 self.show() 54 self.show()
139 patchName, guards = output.split(":", 1) 139 patchName, guards = output.split(":", 1)
140 self.patchNameLabel.setText(patchName) 140 self.patchNameLabel.setText(patchName)
141 guardsList = guards.strip().split() 141 guardsList = guards.strip().split()
142 for guard in guardsList: 142 for guard in guardsList:
143 if guard.startswith("+"): 143 if guard.startswith("+"):
144 icon = UI.PixmapCache.getIcon("plus.png") 144 icon = UI.PixmapCache.getIcon("plus")
145 guard = guard[1:] 145 guard = guard[1:]
146 sign = "+" 146 sign = "+"
147 elif guard.startswith("-"): 147 elif guard.startswith("-"):
148 icon = UI.PixmapCache.getIcon("minus.png") 148 icon = UI.PixmapCache.getIcon("minus")
149 guard = guard[1:] 149 guard = guard[1:]
150 sign = "-" 150 sign = "-"
151 else: 151 else:
152 continue 152 continue
153 itm = QListWidgetItem(icon, guard, self.guardsList) 153 itm = QListWidgetItem(icon, guard, self.guardsList)
191 Private slot to add a guard definition to the list or change it. 191 Private slot to add a guard definition to the list or change it.
192 """ 192 """
193 guard = self.guardCombo.currentText() 193 guard = self.guardCombo.currentText()
194 if self.plusButton.isChecked(): 194 if self.plusButton.isChecked():
195 sign = "+" 195 sign = "+"
196 icon = UI.PixmapCache.getIcon("plus.png") 196 icon = UI.PixmapCache.getIcon("plus")
197 else: 197 else:
198 sign = "-" 198 sign = "-"
199 icon = UI.PixmapCache.getIcon("minus.png") 199 icon = UI.PixmapCache.getIcon("minus")
200 200
201 guardItem = self.__getGuard(guard) 201 guardItem = self.__getGuard(guard)
202 if guardItem: 202 if guardItem:
203 # guard already exists, remove it first 203 # guard already exists, remove it first
204 row = self.guardsList.row(guardItem) 204 row = self.guardsList.row(guardItem)

eric ide

mercurial