diff -r cc296ba99a3f -r 6f958d5765f4 Preferences/__init__.py --- a/Preferences/__init__.py Wed Nov 01 19:22:02 2017 +0100 +++ b/Preferences/__init__.py Fri Nov 03 12:10:16 2017 +0100 @@ -416,15 +416,21 @@ "AutoCompletionShowSingle": False, "AutoCompletionSource": QsciScintilla.AcsDocument, "AutoCompletionThreshold": 2, + # timeout in ms before auto-completion is started + "AutoCompletionTimeout": 200, "AutoCompletionFillups": False, + # show QScintilla completions, if plug-in fails "AutoCompletionScintillaOnFail": False, - # show QScintilla completions, if plug-in fails + "AutoCompletionReversedList": False, + "AutoCompletionCacheSize": 100, + "AutoCompletionCacheTime": 300, # 5 minutes + "AutoCompletionWatchdogTime": 3000, # ms "CallTipsEnabled": False, "CallTipsVisible": 0, "CallTipsStyle": QsciScintilla.CallTipsNoContext, + # show QScintilla calltips, if plug-in fails "CallTipsScintillaOnFail": False, - # show QScintilla calltips, if plug-in fails "AutoCheckSyntax": True, "OnlineSyntaxCheck": True, @@ -1458,6 +1464,13 @@ "HeaderColor": QColor(237, 237, 190), "BadWhitespaceColor": QColor(255, 0, 0, 192), } + + # defaults for Code Documentation Viewer + docuViewerDefaults = { + "ShowInfoAsRichText": False, + "Provider": "disabled", + "ShowInfoOnOpenParenthesis": True, + } def readToolGroups(prefClass=Prefs): @@ -2063,7 +2076,9 @@ elif key in ["AutosaveInterval", "TabWidth", "IndentWidth", "FoldingStyle", "WarnFilesize", "EdgeMode", "EdgeColumn", "CaretWidth", "AutoCompletionSource", - "AutoCompletionThreshold", "CallTipsVisible", + "AutoCompletionThreshold", "AutoCompletionTimeout", + "AutoCompletionCacheSize", "AutoCompletionCacheTime", + "AutoCompletionWatchdogTime", "CallTipsVisible", "CallTipsStyle", "MarkOccurrencesTimeout", "AutoSpellCheckChunkSize", "SpellCheckingMinWordSize", "PostScriptLevel", "EOLMode", "ZoomFactor", "WhitespaceSize", @@ -2685,7 +2700,10 @@ pageUrl = prefClass.settings.value("PageURL") if pageUrl is None: pageUrl = QUrl() - downloads.append((url, location, done, pageUrl)) + downloaded = prefClass.settings.value("Downloaded") + if downloaded is None: + downloaded = QDateTime() + downloads.append((url, location, done, pageUrl, downloaded)) prefClass.settings.endArray() return downloads elif key == "RssFeeds": @@ -2803,6 +2821,7 @@ prefClass.settings.setValue("URL", v[0]) prefClass.settings.setValue("Title", v[1]) prefClass.settings.setValue("Icon", v[2]) + prefClass.settings.setValue("Downloaded", v[4]) index += 1 prefClass.settings.endArray() elif key in ["SyncFtpPassword", "SyncEncryptionKey"]: @@ -2872,7 +2891,10 @@ pageUrl = prefClass.settings.value("PageURL") if pageUrl is None: pageUrl = QUrl() - downloads.append((url, location, done, pageUrl)) + downloaded = prefClass.settings.value("Downloaded") + if downloaded is None: + downloaded = QDateTime() + downloads.append((url, location, done, pageUrl, downloaded)) prefClass.settings.endArray() return downloads elif key == "RssFeeds": @@ -2996,6 +3018,7 @@ prefClass.settings.setValue("Location", v[1]) prefClass.settings.setValue("Done", v[2]) prefClass.settings.setValue("PageURL", v[3]) + prefClass.settings.setValue("Downloaded", v[4]) index += 1 prefClass.settings.endArray() elif key == "RssFeeds": @@ -3523,7 +3546,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: @@ -3551,6 +3574,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 ["ShowInfoAsRichText", "ShowInfoOnOpenParenthesis"]: + 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.