diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Network/IRC/IrcChannelEditDialog.py --- a/src/eric7/Network/IRC/IrcChannelEditDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/Network/IRC/IrcChannelEditDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -17,10 +17,11 @@ """ Class implementing a dialog to edit channel data. """ + def __init__(self, name, key, autoJoin, edit, parent=None): """ Constructor - + @param name channel name (string) @param key channel key (string) @param autoJoin flag indicating, that the channel should @@ -31,37 +32,37 @@ """ super().__init__(parent) self.setupUi(self) - + self.nameEdit.setText(name) self.keyEdit.setText(key) self.autoJoinCheckBox.setChecked(autoJoin) - + self.nameEdit.setReadOnly(edit) - - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(name != "") - + + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(name != "") + msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height()) - + @pyqtSlot(str) def on_nameEdit_textChanged(self, txt): """ Private slot to handle changes of the given name. - + @param txt text of the edit (string) """ - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(txt != "") - + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(txt != "") + def getData(self): """ Public method to get the channel data. - + @return tuple giving the channel name, channel key and a flag indicating, that the channel should be joined automatically (string, string, boolean) """ - return (self.nameEdit.text(), - self.keyEdit.text(), - self.autoJoinCheckBox.isChecked()) + return ( + self.nameEdit.text(), + self.keyEdit.text(), + self.autoJoinCheckBox.isChecked(), + )