32 @param parent reference to the parent widget (QWidget) |
32 @param parent reference to the parent widget (QWidget) |
33 """ |
33 """ |
34 super(HgBookmarkDialog, self).__init__(parent) |
34 super(HgBookmarkDialog, 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.__mode = mode |
40 self.__mode = mode |
40 if mode == self.MOVE_MODE: |
41 if mode == self.MOVE_MODE: |
41 self.nameEdit.hide() |
42 self.nameEdit.hide() |
42 self.nameCombo.addItems([""] + sorted(bookmarksList)) |
43 self.nameCombo.addItems([""] + sorted(bookmarksList)) |
69 elif self.branchButton.isChecked(): |
70 elif self.branchButton.isChecked(): |
70 enabled = enabled and self.branchCombo.currentText() != "" |
71 enabled = enabled and self.branchCombo.currentText() != "" |
71 elif self.bookmarkButton.isChecked(): |
72 elif self.bookmarkButton.isChecked(): |
72 enabled = enabled and self.bookmarkCombo.currentText() != "" |
73 enabled = enabled and self.bookmarkCombo.currentText() != "" |
73 |
74 |
74 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled) |
75 self.buttonBox.button( |
|
76 QDialogButtonBox.StandardButton.Ok).setEnabled(enabled) |
75 |
77 |
76 def __updateBookmarksCombo(self): |
78 def __updateBookmarksCombo(self): |
77 """ |
79 """ |
78 Private slot to update the bookmarks combo. |
80 Private slot to update the bookmarks combo. |
79 """ |
81 """ |