--- a/Preferences/__init__.py Sat Jan 26 17:04:11 2019 +0100 +++ b/Preferences/__init__.py Sat Jan 26 19:42:53 2019 +0100 @@ -1580,6 +1580,11 @@ "Provider": "disabled", "ShowInfoOnOpenParenthesis": True, } + + # defaults for conda + condaDefaults = { + "CondaExecutable": "", + } def readToolGroups(prefClass=Prefs): @@ -3720,7 +3725,7 @@ @param key the key of the value to get @param prefClass preferences class used as the storage area - @return the requested editor colour + @return the requested Code Documentation Viewer value """ if key in ["ShowInfoAsRichText", "ShowInfoOnOpenParenthesis"]: return toBool(prefClass.settings.value( @@ -3743,6 +3748,30 @@ prefClass.settings.setValue("CodeDocumentationViewer/" + key, value) +def getConda(key, prefClass=Prefs): + """ + Module function to retrieve the conda related settings. + + @param key the key of the value to get + @param prefClass preferences class used as the storage area + @return the requested conda value + """ + return prefClass.settings.value( + "Conda/" + key, + prefClass.condaDefaults[key]) + + +def setConda(key, value, prefClass=Prefs): + """ + Module function to store the conda related settings. + + @param key the key of the setting to be set + @param value the value to be set + @param prefClass preferences class used as the storage area + """ + prefClass.settings.setValue("Conda/" + key, value) + + def getGeometry(key, prefClass=Prefs): """ Module function to retrieve the display geometry.