--- a/eric6/Preferences/__init__.py Sat Sep 05 11:26:33 2020 +0200 +++ b/eric6/Preferences/__init__.py Sat Oct 03 11:13:46 2020 +0200 @@ -494,6 +494,9 @@ "ShowMarkerCoverage": True, "ShowMarkerSearch": True, + "ShowSourceOutline": True, + "SourceOutlineWidth": 200, + # All (most) lexers "AllFoldCompact": True, @@ -1428,7 +1431,9 @@ # defaults for pip pipDefaults = { - "PipSearchIndex": "", # used by the search command + "PipSearchIndex": "", # used by the search command + "ExcludeCondaEnvironments": True, + # don't show conda environments in selector } # defaults for MicroPython @@ -1465,6 +1470,16 @@ microPythonDefaults["ColorScheme"] = "xterm" else: microPythonDefaults["ColorScheme"] = "Ubuntu" + + # defaults for Python specific settings + pythonDefaults = { + "ASTViewerErrorColor": QColor(Qt.darkRed), + + "DisViewerErrorColor": QColor(Qt.darkRed), + "DisViewerCurrentColor": QColor(Qt.darkMagenta), + "DisViewerLabeledColor": QColor(Qt.darkGreen), + "DisViewerExpandCodeInfoDetails": False, + } def readToolGroups(prefClass=Prefs): @@ -1790,8 +1805,18 @@ else: exts.append(".{0}".format(ext)) return exts - - return None + elif key in ( + "ASTViewerErrorColor", "DisViewerErrorColor", + "DisViewerCurrentColor", "DisViewerLabeledColor", + ): + return QColor(prefClass.settings.value( + "Python/" + key, prefClass.pythonDefaults[key])) + elif key in ("DisViewerExpandCodeInfoDetails"): + return toBool(prefClass.settings.value( + "Python/" + key, prefClass.pythonDefaults[key])) + else: + return prefClass.settings.value( + "Python/" + key, prefClass.pythonDefaults[key]) def setPython(key, value, prefClass=Prefs): @@ -1804,6 +1829,17 @@ """ if key == "Python3Extensions": setDebugger(key, value, prefClass) + elif key in ( + "ASTViewerErrorColor", "DisViewerErrorColor", + "DisViewerCurrentColor", "DisViewerLabeledColor", + ): + if value.alpha() < 255: + val = "#{0:8x}".format(value.rgba()) + else: + val = value.name() + prefClass.settings.setValue("Python/" + key, val) + else: + prefClass.settings.setValue("Python/" + key, value) def getUILanguage(prefClass=Prefs): @@ -2061,7 +2097,7 @@ "OnlineSyntaxCheckInterval", "OnlineChangeTraceInterval", "WrapLongLinesMode", "WrapVisualFlag", "WrapIndentMode", "WrapStartIndent", "CallTipsPosition", "VirtualSpaceOptions", - "PreviewRefreshWaitTimer"]: + "PreviewRefreshWaitTimer", "SourceOutlineWidth"]: return int(prefClass.settings.value( "Editor/" + key, prefClass.editorDefaults[key])) elif key in ["AdditionalOpenFilters", "AdditionalSaveFilters", @@ -3344,7 +3380,7 @@ @param prefClass preferences class used as the storage area """ prefClass.settings.setValue("IRC/" + key, value) - + def getHexEditor(key, prefClass=Prefs): """ @@ -3493,9 +3529,14 @@ @param prefClass preferences class used as the storage area @return the requested pip value """ - return prefClass.settings.value( - "Pip/" + key, - prefClass.pipDefaults[key]) + if key in ("ExcludeCondaEnvironments"): + return toBool(prefClass.settings.value( + "Pip/" + key, + prefClass.pipDefaults[key])) + else: + return prefClass.settings.value( + "Pip/" + key, + prefClass.pipDefaults[key]) def setPip(key, value, prefClass=Prefs):