32 @param parent parent widget (QWidget) |
32 @param parent parent widget (QWidget) |
33 """ |
33 """ |
34 super(GitRevisionSelectionDialog, self).__init__(parent) |
34 super(GitRevisionSelectionDialog, self).__init__(parent) |
35 self.setupUi(self) |
35 self.setupUi(self) |
36 |
36 |
37 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
37 self.buttonBox.button( |
|
38 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
38 |
39 |
39 self.tagCombo.addItems(sorted(tagsList)) |
40 self.tagCombo.addItems(sorted(tagsList)) |
40 self.branchCombo.addItems(["master"] + sorted(branchesList)) |
41 self.branchCombo.addItems(["master"] + sorted(branchesList)) |
41 |
42 |
42 self.tipButton.setVisible(showHead) |
43 self.tipButton.setVisible(showHead) |
67 elif self.branchButton.isChecked(): |
68 elif self.branchButton.isChecked(): |
68 enabled = self.branchCombo.currentText() != "" |
69 enabled = self.branchCombo.currentText() != "" |
69 elif self.remoteBranchButton.isChecked(): |
70 elif self.remoteBranchButton.isChecked(): |
70 enabled = self.remoteBranchCombo.currentText() != "" |
71 enabled = self.remoteBranchCombo.currentText() != "" |
71 |
72 |
72 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled) |
73 self.buttonBox.button( |
|
74 QDialogButtonBox.StandardButton.Ok).setEnabled(enabled) |
73 |
75 |
74 @pyqtSlot(bool) |
76 @pyqtSlot(bool) |
75 def on_revButton_toggled(self, checked): |
77 def on_revButton_toggled(self, checked): |
76 """ |
78 """ |
77 Private slot to handle changes of the rev select button. |
79 Private slot to handle changes of the rev select button. |