Preferences/__init__.py

changeset 5905
f31960634997
parent 5900
cd90bfdc1247
child 5909
21d90a3abc7c
--- a/Preferences/__init__.py	Sun Oct 15 17:21:51 2017 +0200
+++ b/Preferences/__init__.py	Sun Oct 15 19:40:26 2017 +0200
@@ -428,7 +428,7 @@
         "CallTipsScintillaOnFail": False,
         # show QScintilla calltips, if plug-in fails
         
-        "ShowInfoOnOpenBracket": True,
+        "ShowInfoOnOpenParenthesis": True,
         # TODO: add to editor configuration page
         
         "AutoCheckSyntax": True,
@@ -1463,6 +1463,13 @@
         "HeaderColor": QColor(237, 237, 190),
         "BadWhitespaceColor": QColor(255, 0, 0, 192),
     }
+    
+    # defaults for Code Documentation Viewer
+    docuViewerDefaults = {
+        "ShowInfoAsMarkdown": False,
+        "Provider": "disabled",
+    }
+    # TODO: add to new configuration page to editor section
 
 
 def readToolGroups(prefClass=Prefs):
@@ -3532,7 +3539,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 diff colour
     """
     col = prefClass.settings.value("Diff/" + key)
     if col is not None:
@@ -3560,6 +3567,35 @@
     prefClass.settings.setValue("Diff/" + key, val)
 
 
+def getDocuViewer(key, prefClass=Prefs):
+    """
+    Module function to retrieve the Code Documentation Viewer related settings.
+    
+    @param key the key of the value to get
+    @param prefClass preferences class used as the storage area
+    @return the requested editor colour
+    """
+    if key in ["ShowInfoAsMarkdown"]:
+        return toBool(prefClass.settings.value(
+            "CodeDocumentationViewer/" + key,
+            prefClass.docuViewerDefaults[key]))
+    else:
+        return prefClass.settings.value(
+            "CodeDocumentationViewer/" + key,
+            prefClass.docuViewerDefaults[key])
+    
+
+def setDocuViewer(key, value, prefClass=Prefs):
+    """
+    Module function to store the Code Documentation Viewer 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("CodeDocumentationViewer/" + key, value)
+
+
 def getGeometry(key, prefClass=Prefs):
     """
     Module function to retrieve the display geometry.

eric ide

mercurial