--- a/Preferences/__init__.py Thu Jul 06 18:59:43 2017 +0200 +++ b/Preferences/__init__.py Wed Aug 02 13:28:50 2017 +0200 @@ -62,6 +62,8 @@ from WebBrowser.FlashCookieManager.FlashCookieUtilities import \ flashDataPathForOS +from QScintilla.Shell import ShellHistoryStyle + class Prefs(object): """ @@ -1032,8 +1034,18 @@ "StatusBarVisible": True, "SaveGeometry": True, "WebBrowserState": QByteArray(), - "StartupBehavior": 1, # show speed dial + "StartupBehavior": 2, # show speed dial + # 0 open empty page + # 1 open home page + # 2 open speed dial + # 3 restore last session + # 4 ask user for session + "NewTabBehavior": 2, # show speed dial + # 0 open empty page + # 1 open home page + # 2 open speed dial "HomePage": "eric:home", + "LoadTabOnActivation": True, "WarnOnMultipleClose": True, "DefaultScheme": "https://", "UserStyleSheet": "", @@ -1103,6 +1115,10 @@ # Flash Cookie Manager: identical to helpDefaults # PIM: identical to helpDefaults # VirusTotal: identical to helpDefaults + # Sessions + "SessionAutoSave": True, + "SessionAutoSaveInterval": 15, # interval in seconds + "SessionLastActivePath": "", } if QWebEngineSettings: webBrowserDefaults["HelpViewerType"] = 1 # eric browser @@ -1211,6 +1227,9 @@ "CallTipsEnabled": True, "WrapEnabled": True, "MaxHistoryEntries": 100, + "HistoryStyle": ShellHistoryStyle.LinuxStyle, + "HistoryWrap": False, + "HistoryNavigateByCursor": False, "SyntaxHighlightingEnabled": True, "ShowStdOutErr": True, "UseMonospacedFont": False, @@ -2408,6 +2427,9 @@ elif key in ["MaxHistoryEntries"]: return int(prefClass.settings.value( "Shell/" + key, prefClass.shellDefaults[key])) + elif key in ["HistoryStyle"]: + return ShellHistoryStyle(int(prefClass.settings.value( + "Shell/" + key, prefClass.shellDefaults[key].value))) else: return toBool(prefClass.settings.value( "Shell/" + key, prefClass.shellDefaults[key])) @@ -2423,6 +2445,8 @@ """ if key in ["MonospacedFont", "MarginsFont"]: prefClass.settings.setValue("Shell/" + key, value.toString()) + elif key in ["HistoryStyle"]: + prefClass.settings.setValue("Shell/" + key, value.value) else: prefClass.settings.setValue("Shell/" + key, value) @@ -2870,6 +2894,7 @@ "MinimumFontSize", "MinimumLogicalFontSize", "DiskCacheSize", "AcceptCookies", "KeepCookiesUntil", "AdBlockUpdatePeriod", "TabManagerGroupByType", + "SessionAutoSaveInterval", "NewTabBehavior", ]: return int(prefClass.settings.value( "WebBrowser/" + key, prefClass.webBrowserDefaults[key])) @@ -2893,6 +2918,7 @@ "PrintElementBackgrounds", "AllowRunningInsecureContent", "SpellCheckEnabled", "ShowToolbars", "MenuBarVisible", "BookmarksToolBarVisible", "StatusBarVisible", + "SessionAutoSave", "LoadTabOnActivation", ]: return toBool(prefClass.settings.value( "WebBrowser/" + key, prefClass.webBrowserDefaults[key]))