Removed obsolete code. Changed import * to named import. Py2 comp.

Mon, 15 Apr 2013 20:26:57 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Mon, 15 Apr 2013 20:26:57 +0200
branch
Py2 comp.
changeset 2598
5d4a7772b646
parent 2575
cbdf5b8a5bc5
child 2599
2373006616da

Removed obsolete code. Changed import * to named import.

Preferences/ConfigurationPages/DebuggerPython3Page.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/DebuggerPython3Page.ui file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
Utilities/__init__.py file | annotate | diff | comparison | revisions
--- a/Preferences/ConfigurationPages/DebuggerPython3Page.py	Fri Apr 12 21:04:00 2013 +0200
+++ b/Preferences/ConfigurationPages/DebuggerPython3Page.py	Mon Apr 15 20:26:57 2013 +0200
@@ -37,8 +37,6 @@
         self.debugClientCompleter = E5FileCompleter(self.debugClientEdit)
         
         # set initial values
-        self.customPyCheckBox.setChecked(
-            Preferences.getDebugger("CustomPython3Interpreter"))
         self.interpreterEdit.setText(
             Preferences.getDebugger("Python3Interpreter"))
         dct = Preferences.getDebugger("DebugClientType3")
@@ -61,8 +59,6 @@
         """
         Public slot to save the Debugger Python configuration.
         """
-        Preferences.setDebugger("CustomPython3Interpreter",
-            self.customPyCheckBox.isChecked())
         Preferences.setDebugger("Python3Interpreter",
             self.interpreterEdit.text())
         if self.standardButton.isChecked():
--- a/Preferences/ConfigurationPages/DebuggerPython3Page.ui	Fri Apr 12 21:04:00 2013 +0200
+++ b/Preferences/ConfigurationPages/DebuggerPython3Page.ui	Mon Apr 15 20:26:57 2013 +0200
@@ -37,24 +37,14 @@
       <string>Python3 Interpreter for Debug Client</string>
      </property>
      <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="0" colspan="2">
-       <widget class="QCheckBox" name="customPyCheckBox">
-        <property name="toolTip">
-         <string>Select, whether a special Python interpreter should be used</string>
-        </property>
-        <property name="text">
-         <string>Custom Python Interpreter</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
+      <item row="0" column="0">
        <widget class="QLineEdit" name="interpreterEdit">
         <property name="toolTip">
          <string>Enter the path of the Python3 interpreter to be used by the debug client. Leave empty to use the default.</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="1">
+      <item row="0" column="1">
        <widget class="QPushButton" name="interpreterButton">
         <property name="toolTip">
          <string>Press to select the Python3 interpreter via a file selection dialog</string>
@@ -191,7 +181,6 @@
   </layout>
  </widget>
  <tabstops>
-  <tabstop>customPyCheckBox</tabstop>
   <tabstop>interpreterEdit</tabstop>
   <tabstop>interpreterButton</tabstop>
   <tabstop>standardButton</tabstop>
--- a/Preferences/__init__.py	Fri Apr 12 21:04:00 2013 +0200
+++ b/Preferences/__init__.py	Mon Apr 15 20:26:57 2013 +0200
@@ -68,7 +68,6 @@
         "BreakAlways": False,
         "PythonInterpreter": "",
         "Python3Interpreter": "",
-        "CustomPython3Interpreter": False,
         "RubyInterpreter": "/usr/bin/ruby",
         "DebugClientType": "standard",     # supported "standard", "threaded", "custom"
         "DebugClient": "",
@@ -127,54 +126,7 @@
         "ShowFilePreview": True,
         "ShowFilePreviewJS": True,
         "ShowFilePreviewSSI": True,
-        # the order in ViewProfiles is Project-Viewer, File-Browser,
-        # Debug-Viewer, Python-Shell, Log-Viewer, Task-Viewer,
-        # Templates-Viewer, Multiproject-Viewer, Terminal, Chat, Symbols,
-        # Numbers
-        "ViewProfiles": {
-            "edit": [
-                    # visibility (0) OBSOLETE
-                    [True, False, False, True, True, True, True,  True,
-                     True, True,  True,  True],
-                    # saved state main window with dock windows (1) OBSOLETE
-                    b"",
-                    # saved states floating windows (2) OBSOLETE
-                    [b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b""],
-                    # saved state main window with floating windows (3) OBSOLETE
-                    b"",
-                    # saved state main window with toolbox windows (4)
-                    b"",
-                    # visibility of the toolboxes/sidebars (5)
-                    # left, bottom, right
-                    [True,  True, True],
-                    # saved states of the splitters and sidebars of the
-                    # sidebars layout (6)
-                    # left splitter, vertical splitter, left sidebar, bottom sidebar,
-                    # right splitter, right sidebar
-                    [b"", b"", b"", b"", b"", b""],
-                ],
-            "debug": [
-                    # visibility (0) OBSOLETE
-                    [False, False, True,  True, True, True, False, False,
-                     True,  False, False, False],
-                    # saved state main window with dock windows (1) OBSOLETE
-                    b"",
-                    # saved states floating windows (2) OBSOLETE
-                    [b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b""],
-                    # saved state main window with floating windows (3) OBSOLETE
-                    b"",
-                    # saved state main window with toolbox windows (4)
-                    b"",
-                    # visibility of the toolboxes/sidebars (5)
-                    # left, bottom, right
-                    [False,  True, True],
-                    # saved states of the splitters and sidebars of the
-                    # sidebars layout (6)
-                    # left splitter, vertical splitter, left sidebar, bottom sidebar,
-                    # right splitter, right sidebar
-                    [b"", b"", b"", b"", b"", b""],
-                ],
-        },
+        # ViewProfiles is obsolete (used till Eric5.3)
         "ViewProfiles2": {
             "edit": [
                     # saved state main window with toolbox windows (0)
@@ -253,7 +205,6 @@
         "NotificationTimeout": 5,      # time in seconds the notification is shown
         "NotificationPosition": QPoint(10, 10),
     }
-    viewProfilesLength = len(uiDefaults["ViewProfiles"]["edit"][0])
     
     iconsDefaults = {
         "Path": [],
@@ -1229,7 +1180,6 @@
     @return the requested debugger setting
     """
     if key in ["RemoteDbgEnabled", "PassiveDbgEnabled",
-                "CustomPython3Interpreter",
                 "AutomaticReset", "DebugEnvironmentReplace",
                 "PythonRedirect", "PythonNoEncoding",
                 "Python3Redirect", "Python3NoEncoding",
@@ -1443,35 +1393,6 @@
             return QColor(col)
         else:
             return prefClass.uiDefaults[key]
-    elif key == "ViewProfiles":
-        profiles = prefClass.settings.value("UI/ViewProfiles")
-        if profiles is not None:
-            viewProfiles = profiles
-            for name in ["edit", "debug"]:
-                # adjust entries for individual windows
-                vpLength = len(viewProfiles[name][0])
-                if vpLength < prefClass.viewProfilesLength:
-                    viewProfiles[name][0].extend(
-                        prefClass.uiDefaults["ViewProfiles"][name][0][vpLength:])
-                
-                # adjust profile
-                vpLength = len(viewProfiles[name])
-                if vpLength < len(prefClass.uiDefaults["ViewProfiles"][name]):
-                    viewProfiles[name].extend(
-                        prefClass.uiDefaults["ViewProfiles"][name][vpLength:])
-                
-                # adjust entries for toolboxes and sidebars
-                vpLength = len(viewProfiles[name][5])
-                if vpLength < len(prefClass.uiDefaults["ViewProfiles"][name][5]):
-                    viewProfiles[name][5].extend(
-                        prefClass.uiDefaults["ViewProfiles"][name][5][vpLength:])
-                vpLength = len(viewProfiles[name][6])
-                if vpLength < len(prefClass.uiDefaults["ViewProfiles"][name][6]):
-                    viewProfiles[name][6].extend(
-                        prefClass.uiDefaults["ViewProfiles"][name][6][vpLength:])
-        else:
-            viewProfiles = prefClass.uiDefaults["ViewProfiles"]
-        return viewProfiles
     elif key in "ViewProfiles2":
         profiles = prefClass.settings.value("UI/ViewProfiles2")
         if profiles is not None:
@@ -1532,9 +1453,7 @@
     @param value the value to be set
     @param prefClass preferences class used as the storage area
     """
-    if key == "ViewProfiles":
-        prefClass.settings.setValue("UI/" + key, value)
-    elif key == "ViewProfiles2":
+    if key == "ViewProfiles2":
         profiles = {}
         for name in ["edit", "debug"]:
             profiles[name] = [
--- a/Utilities/__init__.py	Fri Apr 12 21:04:00 2013 +0200
+++ b/Utilities/__init__.py	Mon Apr 15 20:26:57 2013 +0200
@@ -49,16 +49,17 @@
     qVersion, PYQT_VERSION_STR, QCoreApplication, QCryptographicHash
 from PyQt4.Qsci import QSCINTILLA_VERSION_STR, QsciScintilla
 
+# import these methods into the Utilities namespace
 from Globals import isWindowsPlatform, isLinuxPlatform, isMacPlatform  # __IGNORE_WARNING__
 from Globals import getConfigDir, setConfigDir  # __IGNORE_WARNING__
-# import these methods into the Utilities namespace
 
 from E5Gui.E5Application import e5App
 
 from UI.Info import Program, Version
 
 import Preferences
-from .SyntaxCheck import *
+from .SyntaxCheck import readEncodedFile, decode, \
+    extractLineFlags, normalizeCode, compile_and_check  # __IGNORE_WARNING__
 
 from eric5config import getConfig
 

eric ide

mercurial