Preferences/__init__.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3038
7fe9a53280bd
child 3065
070b35dde35e
--- a/Preferences/__init__.py	Fri Nov 01 15:48:48 2013 +0100
+++ b/Preferences/__init__.py	Sun Nov 03 15:58:22 2013 +0100
@@ -70,16 +70,16 @@
         "PythonInterpreter": "",
         "Python3Interpreter": "",
         "RubyInterpreter": "/usr/bin/ruby",
-        "DebugClientType": "standard",      # supported "standard", "threaded",
-                                            # "custom"
+        "DebugClientType": "standard",
+        # supported "standard", "threaded", "custom"
         "DebugClient": "",
-        "DebugClientType3": "standard",     # supported "standard", "threaded",
-                                            # "custom"
+        "DebugClientType3": "standard",
+        # supported "standard", "threaded", "custom"
         "DebugClient3": "",
-        "PythonExtensions": ".py2 .pyw2 .ptl",  # space separated list of
-                                                # Python extensions
-        "Python3Extensions": ".py .pyw .py3 .pyw3", # space separated list of
-                                                    # Python3 extensions
+        "PythonExtensions": ".py2 .pyw2 .ptl",
+        # space separated list of Python extensions
+        "Python3Extensions": ".py .pyw .py3 .pyw3",
+        # space separated list of Python3 extensions
         "DebugEnvironmentReplace": False,
         "DebugEnvironment": "",
         "PythonRedirect": True,
@@ -133,42 +133,43 @@
         # ViewProfiles is obsolete (used till Eric5.3)
         "ViewProfiles2": {
             "edit": [
-                    # saved state main window with toolbox windows (0)
-                    QByteArray(),
-                    # visibility of the toolboxes/sidebars (1)
-                    # left, bottom, right
-                    [True,  True, True],
-                    # saved states of the splitters and sidebars of the
-                    # sidebars layout (2)
-                    # left splitter, vertical splitter, left sidebar,
-                    # bottom sidebar, right splitter, right sidebar
-                    [QByteArray(), QByteArray(), QByteArray(),
-                     QByteArray(), QByteArray(), QByteArray()],
-                ],
+                # saved state main window with toolbox windows (0)
+                QByteArray(),
+                # visibility of the toolboxes/sidebars (1)
+                # left, bottom, right
+                [True,  True, True],
+                # saved states of the splitters and sidebars of the
+                # sidebars layout (2)
+                # left splitter, vertical splitter, left sidebar,
+                # bottom sidebar, right splitter, right sidebar
+                [QByteArray(), QByteArray(), QByteArray(),
+                 QByteArray(), QByteArray(), QByteArray()],
+            ],
             "debug": [
-                    # saved state main window with toolbox windows (0)
-                    QByteArray(),
-                    # visibility of the toolboxes/sidebars (1)
-                    # left, bottom, right
-                    [False,  True, True],
-                    # saved states of the splitters and sidebars of the
-                    # sidebars layout (2)
-                    # left splitter, vertical splitter, left sidebar,
-                    # bottom sidebar, right splitter, right sidebar
-                    [QByteArray(), QByteArray(), QByteArray(),
-                     QByteArray(), QByteArray(), QByteArray()],
-                ],
+                # saved state main window with toolbox windows (0)
+                QByteArray(),
+                # visibility of the toolboxes/sidebars (1)
+                # left, bottom, right
+                [False,  True, True],
+                # saved states of the splitters and sidebars of the
+                # sidebars layout (2)
+                # left splitter, vertical splitter, left sidebar,
+                # bottom sidebar, right splitter, right sidebar
+                [QByteArray(), QByteArray(), QByteArray(),
+                 QByteArray(), QByteArray(), QByteArray()],
+            ],
         },
         "ToolbarManagerState": QByteArray(),
         "PreviewSplitterState": QByteArray(),
         "ShowSplash": True,
         "SingleCloseButton": False,
         
-        "PerformVersionCheck": 4,      # 0 = off
-                                        # 1 = at startup
-                                        # 2 = daily
-                                        # 3 = weekly
-                                        # 4 = monthly
+        "PerformVersionCheck": 4,
+        # 0 = off
+        # 1 = at startup
+        # 2 = daily
+        # 3 = weekly
+        # 4 = monthly
         "UseProxy": False,
         "UseSystemProxy": True,
         "UseHttpProxyForAll": False,
@@ -187,8 +188,8 @@
         "ProxyType/Ftp": E5FtpProxyType.NoProxy,
         "ProxyAccount/Ftp": "",
         
-        "PluginRepositoryUrl5": \
-            "http://eric-ide.python-projects.org/plugins5/repository.xml",
+        "PluginRepositoryUrl5":
+        "http://eric-ide.python-projects.org/plugins5/repository.xml",
         "VersionsUrls5": [
             "http://die-offenbachs.homelinux.org:48888/eric/snapshots5/"
             "versions",
@@ -580,60 +581,60 @@
     
     # defaults for the project browser flags settings
     projectBrowserFlagsDefaults = {
-        "Qt4":
-            SourcesBrowserFlag | \
-            FormsBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "Qt4C":
-            SourcesBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "PyQt5":
-            SourcesBrowserFlag | \
-            FormsBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "PyQt5C":
-            SourcesBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "E4Plugin":
-            SourcesBrowserFlag | \
-            FormsBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "Console":
-            SourcesBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "Other":
-            SourcesBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "PySide":
-            SourcesBrowserFlag | \
-            FormsBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
-        "PySideC":
-            SourcesBrowserFlag | \
-            ResourcesBrowserFlag | \
-            TranslationsBrowserFlag | \
-            InterfacesBrowserFlag | \
-            OthersBrowserFlag,
+        "Qt4": (
+            SourcesBrowserFlag |
+            FormsBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "Qt4C": (
+            SourcesBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "PyQt5": (
+            SourcesBrowserFlag |
+            FormsBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "PyQt5C": (
+            SourcesBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "E4Plugin": (
+            SourcesBrowserFlag |
+            FormsBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "Console": (
+            SourcesBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "Other": (
+            SourcesBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "PySide": (
+            SourcesBrowserFlag |
+            FormsBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
+        "PySideC": (
+            SourcesBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag),
     }
     
     # defaults for the project browser colour settings
@@ -754,29 +755,29 @@
         cls.helpDefaults["FixedFont"] = QFont(fontFamily, fontSize).toString()
         cls.helpDefaults.update({
             "AutoLoadImages":
-                websettings.testAttribute(QWebSettings.AutoLoadImages),
+            websettings.testAttribute(QWebSettings.AutoLoadImages),
             "UserStyleSheet": "",
             "SaveUrlColor": QColor(248, 248, 210),
             "JavaEnabled":
-                websettings.testAttribute(QWebSettings.JavaEnabled),
+            websettings.testAttribute(QWebSettings.JavaEnabled),
             "JavaScriptEnabled":
-                websettings.testAttribute(QWebSettings.JavascriptEnabled),
+            websettings.testAttribute(QWebSettings.JavascriptEnabled),
             "JavaScriptCanOpenWindows":
-                websettings.testAttribute(
-                    QWebSettings.JavascriptCanOpenWindows),
+            websettings.testAttribute(
+                QWebSettings.JavascriptCanOpenWindows),
             "JavaScriptCanAccessClipboard":
-                websettings.testAttribute(
-                    QWebSettings.JavascriptCanAccessClipboard),
+            websettings.testAttribute(
+                QWebSettings.JavascriptCanAccessClipboard),
             "PluginsEnabled":
-                websettings.testAttribute(QWebSettings.PluginsEnabled),
+            websettings.testAttribute(QWebSettings.PluginsEnabled),
             "OfflineStorageDatabaseEnabled":
-                websettings.testAttribute(
-                    QWebSettings.OfflineStorageDatabaseEnabled),
+            websettings.testAttribute(
+                QWebSettings.OfflineStorageDatabaseEnabled),
         })
         if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"):
             cls.helpDefaults.update({
                 "OfflineWebApplicationCacheEnabled":
-                    websettings.testAttribute(
+                websettings.testAttribute(
                     QWebSettings.OfflineWebApplicationCacheEnabled),
                 "OfflineWebApplicationCacheQuota": 50,     # 50 MB
             })
@@ -1205,7 +1206,7 @@
     """
     Module function to store the variables filter settings.
     
-    @param filters variable filters to set 
+    @param filters variable filters to set
     @param prefClass preferences class used as the storage area
     """
     prefClass.settings.setValue("Variables/LocalsFilter", str(filters[0]))
@@ -1221,15 +1222,15 @@
     @return the requested debugger setting
     """
     if key in ["RemoteDbgEnabled", "PassiveDbgEnabled",
-                "AutomaticReset", "DebugEnvironmentReplace",
-                "PythonRedirect", "PythonNoEncoding",
-                "Python3Redirect", "Python3NoEncoding",
-                "RubyRedirect",
-                "ConsoleDbgEnabled", "PathTranslation",
-                "Autosave", "ThreeStateBreakPoints",
-                "SuppressClientExit", "BreakAlways",
-                "AutoViewSourceCode",
-              ]:
+               "AutomaticReset", "DebugEnvironmentReplace",
+               "PythonRedirect", "PythonNoEncoding",
+               "Python3Redirect", "Python3NoEncoding",
+               "RubyRedirect",
+               "ConsoleDbgEnabled", "PathTranslation",
+               "Autosave", "ThreeStateBreakPoints",
+               "SuppressClientExit", "BreakAlways",
+               "AutoViewSourceCode",
+               ]:
         return toBool(prefClass.settings.value(
             "Debugger/" + key, prefClass.debuggerDefaults[key]))
     elif key in ["PassiveDbgPort"]:
@@ -1361,7 +1362,7 @@
                   prefClass.uiDefaults["LayoutShellEmbedded"])),
               int(prefClass.settings.value("UI/LayoutFileBrowserEmbedded",
                   prefClass.uiDefaults["LayoutFileBrowserEmbedded"])),
-    )
+              )
     return layout
     
 
@@ -2220,7 +2221,7 @@
                  "SyncSpeedDial", "SyncEncryptData",
                  "SyncEncryptPasswordsOnly",
                  "WarnOnMultipleClose", "ClickToFlashEnabled"
-                ]:
+                 ]:
         return toBool(prefClass.settings.value(
             "Help/" + key, prefClass.helpDefaults[key]))
     elif key in ["AdBlockSubscriptions", "AdBlockExceptions",
@@ -2833,8 +2834,7 @@
             "UI/" + key,
             pwRecode(
                 prefClass.settings.value("UI/" + key,
-                                         prefClass.uiDefaults[key]
-                ),
+                                         prefClass.uiDefaults[key]),
                 oldPassword,
                 newPassword
             )
@@ -2844,8 +2844,7 @@
             "User/" + key,
             pwRecode(
                 prefClass.settings.value("User/" + key,
-                                         prefClass.userDefaults[key]
-                ),
+                                         prefClass.userDefaults[key]),
                 oldPassword,
                 newPassword
             )
@@ -2855,8 +2854,7 @@
             "Help/" + key,
             pwRecode(
                 prefClass.settings.value("Help/" + key,
-                                         prefClass.helpDefaults[key]
-                ),
+                                         prefClass.helpDefaults[key]),
                 oldPassword,
                 newPassword
             )

eric ide

mercurial