28 @param parent parent widget (QWidget) |
28 @param parent parent widget (QWidget) |
29 """ |
29 """ |
30 super(HgBackoutDialog, self).__init__(parent) |
30 super(HgBackoutDialog, self).__init__(parent) |
31 self.setupUi(self) |
31 self.setupUi(self) |
32 |
32 |
33 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
33 self.buttonBox.button( |
|
34 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
34 |
35 |
35 self.tagCombo.addItems(sorted(tagsList)) |
36 self.tagCombo.addItems(sorted(tagsList)) |
36 self.branchCombo.addItems(["default"] + sorted(branchesList)) |
37 self.branchCombo.addItems(["default"] + sorted(branchesList)) |
37 if bookmarksList is not None: |
38 if bookmarksList is not None: |
38 self.bookmarkCombo.addItems(sorted(bookmarksList)) |
39 self.bookmarkCombo.addItems(sorted(bookmarksList)) |
57 elif self.branchButton.isChecked(): |
58 elif self.branchButton.isChecked(): |
58 enabled = self.branchCombo.currentText() != "" |
59 enabled = self.branchCombo.currentText() != "" |
59 elif self.bookmarkButton.isChecked(): |
60 elif self.bookmarkButton.isChecked(): |
60 enabled = self.bookmarkCombo.currentText() != "" |
61 enabled = self.bookmarkCombo.currentText() != "" |
61 |
62 |
62 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled) |
63 self.buttonBox.button( |
|
64 QDialogButtonBox.StandardButton.Ok).setEnabled(enabled) |
63 |
65 |
64 @pyqtSlot(bool) |
66 @pyqtSlot(bool) |
65 def on_idButton_toggled(self, checked): |
67 def on_idButton_toggled(self, checked): |
66 """ |
68 """ |
67 Private slot to handle changes of the ID select button. |
69 Private slot to handle changes of the ID select button. |