25 @param parent reference to the parent widget (QWidget) |
25 @param parent reference to the parent widget (QWidget) |
26 """ |
26 """ |
27 super(HgBookmarkRenameDialog, self).__init__(parent) |
27 super(HgBookmarkRenameDialog, self).__init__(parent) |
28 self.setupUi(self) |
28 self.setupUi(self) |
29 |
29 |
30 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
30 self.buttonBox.button( |
|
31 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
31 |
32 |
32 self.bookmarkCombo.addItems(sorted(bookmarksList)) |
33 self.bookmarkCombo.addItems(sorted(bookmarksList)) |
33 |
34 |
34 msh = self.minimumSizeHint() |
35 msh = self.minimumSizeHint() |
35 self.resize(max(self.width(), msh.width()), msh.height()) |
36 self.resize(max(self.width(), msh.width()), msh.height()) |
36 |
37 |
37 def __updateUI(self): |
38 def __updateUI(self): |
38 """ |
39 """ |
39 Private slot to update the UI. |
40 Private slot to update the UI. |
40 """ |
41 """ |
41 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( |
42 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
42 self.nameEdit.text() != "" and |
43 self.nameEdit.text() != "" and |
43 self.bookmarkCombo.currentText() != "" |
44 self.bookmarkCombo.currentText() != "" |
44 ) |
45 ) |
45 |
46 |
46 @pyqtSlot(str) |
47 @pyqtSlot(str) |