eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/HgCloseHeadSelectionDialog.py

changeset 8143
2c730d5fd177
parent 7970
c4ee8a81584c
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
27 @type QWidget 27 @type QWidget
28 """ 28 """
29 super(HgCloseHeadSelectionDialog, self).__init__(parent) 29 super(HgCloseHeadSelectionDialog, self).__init__(parent)
30 self.setupUi(self) 30 self.setupUi(self)
31 31
32 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 32 self.buttonBox.button(
33 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 33 QDialogButtonBox.StandardButton.Cancel).setDefault(True)
34 self.buttonBox.button(
35 QDialogButtonBox.StandardButton.Ok).setEnabled(False)
34 36
35 heads = self.__getHeads(vcs) 37 heads = self.__getHeads(vcs)
36 for revision, branch in heads: 38 for revision, branch in heads:
37 QTreeWidgetItem(self.headsList, [revision, branch]) 39 QTreeWidgetItem(self.headsList, [revision, branch])
38 40
67 @pyqtSlot() 69 @pyqtSlot()
68 def on_headsList_itemSelectionChanged(self): 70 def on_headsList_itemSelectionChanged(self):
69 """ 71 """
70 Private slot handling changes of the selection. 72 Private slot handling changes of the selection.
71 """ 73 """
72 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( 74 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
73 len(self.headsList.selectedItems()) > 0 75 len(self.headsList.selectedItems()) > 0
74 ) 76 )
75 77
76 def getData(self): 78 def getData(self):
77 """ 79 """

eric ide

mercurial