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

changeset 8151
8c1445825e7b
parent 8143
2c730d5fd177
child 8218
7c09585bd960
equal deleted inserted replaced
8150:fc1ae39af8c9 8151:8c1445825e7b
80 80
81 def start(self): 81 def start(self):
82 """ 82 """
83 Public slot to start the list command. 83 Public slot to start the list command.
84 """ 84 """
85 self.on_patchSelector_activated("") 85 self.on_patchSelector_activated(0)
86 86
87 @pyqtSlot(str) 87 @pyqtSlot(int)
88 def on_patchSelector_activated(self, patch): 88 def on_patchSelector_activated(self, index):
89 """ 89 """
90 Private slot to get the list of guards defined for the given patch 90 Private slot to get the list of guards defined for the given patch
91 name. 91 name.
92 92
93 @param patch selected patch name (empty for current patch) 93 @param index index of the selected entry
94 """ 94 @type int
95 """
96 patch = self.patchSelector.itemText(index)
95 if self.__dirtyList: 97 if self.__dirtyList:
96 res = E5MessageBox.question( 98 res = E5MessageBox.question(
97 self, 99 self,
98 self.tr("Unsaved Changes"), 100 self.tr("Unsaved Changes"),
99 self.tr("""The guards list has been changed.""" 101 self.tr("""The guards list has been changed."""
261 self.tr("""<p>The defined guards could not be""" 263 self.tr("""<p>The defined guards could not be"""
262 """ applied.</p><p>Reason: {0}</p>""") 264 """ applied.</p><p>Reason: {0}</p>""")
263 .format(error)) 265 .format(error))
264 else: 266 else:
265 self.__dirtyList = False 267 self.__dirtyList = False
266 self.on_patchSelector_activated( 268 index = self.patchSelector.findText(self.patchNameLabel.text())
267 self.patchNameLabel.text()) 269 if index == -1:
270 index = 0
271 self.on_patchSelector_activated(index)

eric ide

mercurial