--- a/src/eric7/Preferences/ViewProfileDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/Preferences/ViewProfileDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -17,11 +17,11 @@ """ Class implementing a dialog to configure the various view profiles. """ - def __init__(self, layout, editVisibilities, debugVisibilities, - parent=None): + + def __init__(self, layout, editVisibilities, debugVisibilities, parent=None): """ Constructor - + @param layout type of the window layout (string) @param editVisibilities list of flags giving the visibilities of the various parts for the 'edit' view profile (list of boolean) @@ -31,36 +31,35 @@ @exception ValueError raised to indicate an invalid layout """ super().__init__(parent) - + if layout not in ("Toolboxes", "Sidebars"): - raise ValueError( - "Illegal layout given ({0}).".format(self.__layout)) - + raise ValueError("Illegal layout given ({0}).".format(self.__layout)) + self.__layout = layout if self.__layout == "Toolboxes": self.ui = Ui_ViewProfileToolboxesDialog() else: self.ui = Ui_ViewProfileSidebarsDialog() self.ui.setupUi(self) - + if self.__layout in ["Toolboxes", "Sidebars"]: # set the edit profile self.ui.epltCheckBox.setChecked(editVisibilities[0]) self.ui.ephtCheckBox.setChecked(editVisibilities[1]) self.ui.eprtCheckBox.setChecked(editVisibilities[2]) - + # set the debug profile self.ui.dpltCheckBox.setChecked(debugVisibilities[0]) self.ui.dphtCheckBox.setChecked(debugVisibilities[1]) self.ui.dprtCheckBox.setChecked(debugVisibilities[2]) - + msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height()) - + def getVisibilities(self): """ Public method to retrieve the visibilities configuration. - + @return tuple of two lists giving the visibilities of the various parts (two lists of boolean) """ @@ -77,10 +76,10 @@ self.ui.dpltCheckBox.isChecked(), self.ui.dphtCheckBox.isChecked(), self.ui.dprtCheckBox.isChecked(), - ] + ], ) - + return ( - [True, True, True], # edit profile - [True, True, True], # debug profile + [True, True, True], # edit profile + [True, True, True], # debug profile )