Preferences, InterfacePage: introduced configuration options to make the activation of the Template-Viewer, File-Browser, Symbols widget and Numbers widget optional.

Tue, 10 Jul 2018 19:41:30 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 10 Jul 2018 19:41:30 +0200
changeset 6424
5e74c4e22e9a
parent 6423
a9e6ae68170b
child 6425
2f37e52a6c70

Preferences, InterfacePage: introduced configuration options to make the activation of the Template-Viewer, File-Browser, Symbols widget and Numbers widget optional.

Preferences/ConfigurationPages/InterfacePage.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/InterfacePage.ui file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/Preferences/ConfigurationPages/InterfacePage.py	Tue Jul 10 19:16:02 2018 +0200
+++ b/Preferences/ConfigurationPages/InterfacePage.py	Tue Jul 10 19:41:30 2018 +0200
@@ -91,12 +91,24 @@
             index = 0   # default for bad values
         self.layoutComboBox.setCurrentIndex(index)
         
+        # integrated tools activation
+        # left side
+        self.templateViewerCheckBox.setChecked(
+            Preferences.getUI("ShowTemplateViewer"))
+        self.fileBrowserCheckBox.setChecked(
+            Preferences.getUI("ShowFileBrowser"))
+        self.symbolsCheckBox.setChecked(
+            Preferences.getUI("ShowSymbolsViewer"))
+        # right side
         self.codeDocumentationViewerCheckBox.setChecked(
             Preferences.getUI("ShowCodeDocumentationViewer"))
         self.cooperationCheckBox.setChecked(
             Preferences.getUI("ShowCooperation"))
         self.ircCheckBox.setChecked(
             Preferences.getUI("ShowIrc"))
+        # bottom side
+        self.numbersCheckBox.setChecked(
+            Preferences.getUI("ShowNumbersViewer"))
         
         self.tabsGroupBox.setEnabled(True)
         self.tabsCloseButtonCheckBox.setChecked(
@@ -172,6 +184,18 @@
             layoutType = "Sidebars"    # just in case
         Preferences.setUI("LayoutType", layoutType)
         
+        # save the integrated tools activation
+        # left side
+        Preferences.setUI(
+            "ShowTemplateViewer",
+            self.templateViewerCheckBox.isChecked())
+        Preferences.setUI(
+            "ShowFileBrowser",
+            self.fileBrowserCheckBox.isChecked())
+        Preferences.setUI(
+            "ShowSymbolsViewer",
+            self.symbolsCheckBox.isChecked())
+        # right side
         Preferences.setUI(
             "ShowCodeDocumentationViewer",
             self.codeDocumentationViewerCheckBox.isChecked())
@@ -181,6 +205,10 @@
         Preferences.setUI(
             "ShowIrc",
             self.ircCheckBox.isChecked())
+        # bottom side
+        Preferences.setUI(
+            "ShowNumbersViewer",
+            self.numbersCheckBox.isChecked())
         
         Preferences.setUI(
             "SingleCloseButton",
--- a/Preferences/ConfigurationPages/InterfacePage.ui	Tue Jul 10 19:16:02 2018 +0200
+++ b/Preferences/ConfigurationPages/InterfacePage.ui	Tue Jul 10 19:41:30 2018 +0200
@@ -7,10 +7,10 @@
     <x>0</x>
     <y>0</y>
     <width>557</width>
-    <height>1121</height>
+    <height>1300</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
+  <layout class="QVBoxLayout" name="verticalLayout_3">
    <item>
     <widget class="QLabel" name="headerLabel">
      <property name="text">
@@ -460,35 +460,102 @@
      <property name="title">
       <string>Integrated Tools Activation</string>
      </property>
-     <layout class="QGridLayout" name="gridLayout_4">
-      <item row="0" column="0">
-       <widget class="QCheckBox" name="codeDocumentationViewerCheckBox">
-        <property name="toolTip">
-         <string>Select to activate the Code Documentation Viewer</string>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QGroupBox" name="groupBox_10">
+        <property name="title">
+         <string>Left Side</string>
         </property>
-        <property name="text">
-         <string>Code Documentation Viewer</string>
-        </property>
+        <layout class="QGridLayout" name="gridLayout_5">
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="templateViewerCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the Template viewer</string>
+           </property>
+           <property name="text">
+            <string>Template-Viewer</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QCheckBox" name="fileBrowserCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the File-Browser widget</string>
+           </property>
+           <property name="text">
+            <string>File-Browser</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="symbolsCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the Symbols widget</string>
+           </property>
+           <property name="text">
+            <string>Symbols</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
-      <item row="0" column="1">
-       <widget class="QCheckBox" name="cooperationCheckBox">
-        <property name="toolTip">
-         <string>Select to activate the Cooperation widget</string>
+      <item>
+       <widget class="QGroupBox" name="groupBox_9">
+        <property name="title">
+         <string>Right Side</string>
         </property>
-        <property name="text">
-         <string>Cooperation</string>
-        </property>
+        <layout class="QGridLayout" name="gridLayout_4">
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="codeDocumentationViewerCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the Code Documentation Viewer</string>
+           </property>
+           <property name="text">
+            <string>Code Documentation Viewer</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QCheckBox" name="cooperationCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the Cooperation widget</string>
+           </property>
+           <property name="text">
+            <string>Cooperation</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="ircCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the IRC widget</string>
+           </property>
+           <property name="text">
+            <string>IRC</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
-      <item row="1" column="0">
-       <widget class="QCheckBox" name="ircCheckBox">
-        <property name="toolTip">
-         <string>Select to activate the IRC widget</string>
+      <item>
+       <widget class="QGroupBox" name="groupBox_11">
+        <property name="title">
+         <string>Bottom Side</string>
         </property>
-        <property name="text">
-         <string>IRC</string>
-        </property>
+        <layout class="QGridLayout" name="gridLayout_6">
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="numbersCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the Numbers widget</string>
+           </property>
+           <property name="text">
+            <string>Numbers</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
      </layout>
@@ -561,9 +628,13 @@
   <tabstop>delaySpinBox</tabstop>
   <tabstop>languageComboBox</tabstop>
   <tabstop>layoutComboBox</tabstop>
+  <tabstop>templateViewerCheckBox</tabstop>
+  <tabstop>fileBrowserCheckBox</tabstop>
+  <tabstop>symbolsCheckBox</tabstop>
   <tabstop>codeDocumentationViewerCheckBox</tabstop>
   <tabstop>cooperationCheckBox</tabstop>
   <tabstop>ircCheckBox</tabstop>
+  <tabstop>numbersCheckBox</tabstop>
   <tabstop>tabsCloseButtonCheckBox</tabstop>
   <tabstop>resetLayoutButton</tabstop>
  </tabstops>
--- a/Preferences/__init__.py	Tue Jul 10 19:16:02 2018 +0200
+++ b/Preferences/__init__.py	Tue Jul 10 19:41:30 2018 +0200
@@ -167,9 +167,13 @@
         "ShowFilePreview": True,
         "ShowFilePreviewJS": True,
         "ShowFilePreviewSSI": True,
-        "ShowCodeDocumentationViewer": True,
-        "ShowCooperation": True,
-        "ShowIrc": True,
+        "ShowTemplateViewer": True,             # left side
+        "ShowFileBrowser": True,                # left side
+        "ShowSymbolsViewer": True,              # left side
+        "ShowCodeDocumentationViewer": True,    # right side
+        "ShowCooperation": True,                # right side
+        "ShowIrc": True,                        # right side
+        "ShowNumbersViewer": True,              # bottom side
         "ViewProfiles2": {
             "edit": [
                 # saved state main window with toolbox windows (0)
@@ -1965,7 +1969,8 @@
                "CheckErrorLog", "NotificationsEnabled", "DynamicOnlineCheck",
                "OpenCrashSessionOnStartup", "CrashSessionEnabled",
                "ShowCodeDocumentationViewer", "ShowCooperation", "ShowIrc",
-               "UseNativeMenuBar"]:
+               "ShowTemplateViewer", "ShowFileBrowser", "ShowSymbolsViewer",
+               "ShowNumbersViewer", "UseNativeMenuBar"]:
         return toBool(prefClass.settings.value(
             "UI/" + key, prefClass.uiDefaults[key]))
     elif key in ["TabViewManagerFilenameLength", "CaptionFilenameLength",
--- a/UI/UserInterface.py	Tue Jul 10 19:16:02 2018 +0200
+++ b/UI/UserInterface.py	Tue Jul 10 19:41:30 2018 +0200
@@ -131,7 +131,8 @@
         self.buffer += str(s)
         self.__nWrite(self.__bufferedWrite())
 
-# TODO: make "File-Browser", "Symbols" and "Numbers" configurable
+
+# TODO: make "Template-Viewer", "File-Browser", "Symbols" and "Numbers" configurable
 class UserInterface(E5MainWindow):
     """
     Class implementing the main user interface.

eric ide

mercurial