--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitBundleDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitBundleDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -17,23 +17,23 @@ """ Class implementing a dialog to enter the data for a bundle operation. """ + def __init__(self, tagsList, branchesList, parent=None): """ Constructor - + @param tagsList list of tags (list of strings) @param branchesList list of branches (list of strings) @param parent parent widget (QWidget) """ super().__init__(parent) self.setupUi(self) - - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(False) - + + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) + self.tagCombo.addItems(sorted(tagsList)) self.branchCombo.addItems(["master"] + sorted(branchesList)) - + def __updateOK(self): """ Private slot to update the OK button. @@ -45,68 +45,67 @@ enabled = self.tagCombo.currentText() != "" elif self.branchButton.isChecked(): enabled = self.branchCombo.currentText() != "" - - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(enabled) - + + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enabled) + @pyqtSlot(bool) def on_revisionsButton_toggled(self, checked): """ Private slot to handle changes of the revisions select button. - + @param checked state of the button (boolean) """ self.__updateOK() - + @pyqtSlot(bool) def on_tagButton_toggled(self, checked): """ Private slot to handle changes of the Tag select button. - + @param checked state of the button (boolean) """ self.__updateOK() - + @pyqtSlot(bool) def on_branchButton_toggled(self, checked): """ Private slot to handle changes of the Branch select button. - + @param checked state of the button (boolean) """ self.__updateOK() - + @pyqtSlot(str) def on_revisionsEdit_textChanged(self, txt): """ Private slot to handle changes of the Revisions edit. - + @param txt text of the line edit (string) """ self.__updateOK() - + @pyqtSlot(str) def on_tagCombo_editTextChanged(self, txt): """ Private slot to handle changes of the Tag combo. - + @param txt text of the combo (string) """ self.__updateOK() - + @pyqtSlot(str) def on_branchCombo_editTextChanged(self, txt): """ Private slot to handle changes of the Branch combo. - + @param txt text of the combo (string) """ self.__updateOK() - + def getData(self): """ Public method to retrieve the bundle data. - + @return list of revision expressions (list of strings) """ if self.revisionsButton.isChecked(): @@ -117,5 +116,5 @@ revs = [self.branchCombo.currentText()] else: revs = [] - + return revs