diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/PipInterface/PipPackagesInputDialog.py --- a/src/eric7/PipInterface/PipPackagesInputDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/PipInterface/PipPackagesInputDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -17,10 +17,11 @@ """ Class implementing a dialog to enter package specifications. """ + def __init__(self, pip, title, install=True, parent=None): """ Constructor - + @param pip reference to the pip object @type Pip @param title dialog title @@ -32,39 +33,34 @@ """ super().__init__(parent) self.setupUi(self) - + self.setWindowTitle(title) - - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(False) - + + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) + self.userCheckBox.setVisible(install) - + msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height()) - + @pyqtSlot(str) def on_packagesEdit_textChanged(self, txt): """ Private slot handling entering package names. - + @param txt name of the requirements file @type str """ - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(bool(txt)) - + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(bool(txt)) + def getData(self): """ Public method to get the entered data. - + @return tuple with the list of package specifications and a flag indicating to install to the user install directory @rtype tuple of (list of str, bool) """ packages = [p.strip() for p in self.packagesEdit.text().split()] - - return ( - packages, - self.userCheckBox.isChecked() - ) + + return (packages, self.userCheckBox.isChecked())