30 super(GitSubmodulesDeinitDialog, self).__init__(parent) |
30 super(GitSubmodulesDeinitDialog, self).__init__(parent) |
31 self.setupUi(self) |
31 self.setupUi(self) |
32 |
32 |
33 self.submodulesList.addItems(sorted(submodulePaths)) |
33 self.submodulesList.addItems(sorted(submodulePaths)) |
34 |
34 |
35 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
35 self.buttonBox.button( |
|
36 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
36 |
37 |
37 def __updateOK(self): |
38 def __updateOK(self): |
38 """ |
39 """ |
39 Private slot to update the state of the OK button. |
40 Private slot to update the state of the OK button. |
40 """ |
41 """ |
41 enable = ( |
42 enable = ( |
42 self.allCheckBox.isChecked() or |
43 self.allCheckBox.isChecked() or |
43 len(self.submodulesList.selectedItems()) > 0 |
44 len(self.submodulesList.selectedItems()) > 0 |
44 ) |
45 ) |
45 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
46 self.buttonBox.button( |
|
47 QDialogButtonBox.StandardButton.Ok).setEnabled(enable) |
46 |
48 |
47 @pyqtSlot(bool) |
49 @pyqtSlot(bool) |
48 def on_allCheckBox_toggled(self, checked): |
50 def on_allCheckBox_toggled(self, checked): |
49 """ |
51 """ |
50 Private slot to react on changes of the all checkbox. |
52 Private slot to react on changes of the all checkbox. |