UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager. conda

Fri, 15 Feb 2019 19:58:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 15 Feb 2019 19:58:42 +0100
branch
conda
changeset 6761
0b69fe8314e3
parent 6759
93e219f358e9
child 6768
ac6db5261d48
child 6773
e74931e6b30d

UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.

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	Fri Feb 15 19:52:36 2019 +0100
+++ b/Preferences/ConfigurationPages/InterfacePage.py	Fri Feb 15 19:58:42 2019 +0100
@@ -102,6 +102,8 @@
         # right side
         self.codeDocumentationViewerCheckBox.setChecked(
             Preferences.getUI("ShowCodeDocumentationViewer"))
+        self.condaCheckBox.setChecked(
+            Preferences.getUI("ShowCondaPackageManager"))
         self.cooperationCheckBox.setChecked(
             Preferences.getUI("ShowCooperation"))
         self.ircCheckBox.setChecked(
@@ -200,6 +202,9 @@
             "ShowCodeDocumentationViewer",
             self.codeDocumentationViewerCheckBox.isChecked())
         Preferences.setUI(
+            "ShowCondaPackageManager",
+            self.condaCheckBox.isChecked())
+        Preferences.setUI(
             "ShowCooperation",
             self.cooperationCheckBox.isChecked())
         Preferences.setUI(
--- a/Preferences/ConfigurationPages/InterfacePage.ui	Fri Feb 15 19:52:36 2019 +0100
+++ b/Preferences/ConfigurationPages/InterfacePage.ui	Fri Feb 15 19:58:42 2019 +0100
@@ -517,6 +517,16 @@
           </widget>
          </item>
          <item row="0" column="1">
+          <widget class="QCheckBox" name="condaCheckBox">
+           <property name="toolTip">
+            <string>Select to activate the conda package manager widget</string>
+           </property>
+           <property name="text">
+            <string>Conda Package Manager</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
           <widget class="QCheckBox" name="cooperationCheckBox">
            <property name="toolTip">
             <string>Select to activate the Cooperation widget</string>
@@ -526,7 +536,7 @@
            </property>
           </widget>
          </item>
-         <item row="1" column="0">
+         <item row="1" column="1">
           <widget class="QCheckBox" name="ircCheckBox">
            <property name="toolTip">
             <string>Select to activate the IRC widget</string>
@@ -632,6 +642,7 @@
   <tabstop>fileBrowserCheckBox</tabstop>
   <tabstop>symbolsCheckBox</tabstop>
   <tabstop>codeDocumentationViewerCheckBox</tabstop>
+  <tabstop>condaCheckBox</tabstop>
   <tabstop>cooperationCheckBox</tabstop>
   <tabstop>ircCheckBox</tabstop>
   <tabstop>numbersCheckBox</tabstop>
--- a/Preferences/__init__.py	Fri Feb 15 19:52:36 2019 +0100
+++ b/Preferences/__init__.py	Fri Feb 15 19:58:42 2019 +0100
@@ -171,6 +171,7 @@
         "ShowFileBrowser": True,                # left side
         "ShowSymbolsViewer": True,              # left side
         "ShowCodeDocumentationViewer": True,    # right side
+        "ShowCondaPackageManager": True,        # right side
         "ShowCooperation": True,                # right side
         "ShowIrc": True,                        # right side
         "ShowNumbersViewer": True,              # bottom side
@@ -1989,9 +1990,10 @@
                "LayoutShellEmbedded", "LayoutFileBrowserEmbedded",
                "CheckErrorLog", "NotificationsEnabled", "DynamicOnlineCheck",
                "OpenCrashSessionOnStartup", "CrashSessionEnabled",
-               "ShowCodeDocumentationViewer", "ShowCooperation", "ShowIrc",
-               "ShowTemplateViewer", "ShowFileBrowser", "ShowSymbolsViewer",
-               "ShowNumbersViewer", "UseNativeMenuBar"]:
+               "ShowCodeDocumentationViewer", "ShowCondaPackageManager",
+               "ShowCooperation", "ShowIrc", "ShowTemplateViewer",
+               "ShowFileBrowser", "ShowSymbolsViewer", "ShowNumbersViewer",
+               "UseNativeMenuBar"]:
         return toBool(prefClass.settings.value(
             "UI/" + key, prefClass.uiDefaults[key]))
     elif key in ["TabViewManagerFilenameLength", "CaptionFilenameLength",
--- a/UI/UserInterface.py	Fri Feb 15 19:52:36 2019 +0100
+++ b/UI/UserInterface.py	Fri Feb 15 19:58:42 2019 +0100
@@ -840,13 +840,14 @@
                               UI.PixmapCache.getIcon("debugViewer.png"),
                               self.tr("Debug-Viewer"))
         
-        # Create the conda package manager
-        logging.debug("Creating Conda Package Manager...")
-        from CondaInterface.CondaPackagesWidget import CondaPackagesWidget
-        self.condaWidget = CondaPackagesWidget(self.condaInterface)
-        self.rToolbox.addItem(self.condaWidget,
-                              UI.PixmapCache.getIcon("miniconda.png"),
-                              self.tr("Conda"))
+        if Preferences.getUI("ShowCondaPackageManager"):
+            # Create the conda package manager
+            logging.debug("Creating Conda Package Manager...")
+            from CondaInterface.CondaPackagesWidget import CondaPackagesWidget
+            self.condaWidget = CondaPackagesWidget(self.condaInterface)
+            self.rToolbox.addItem(self.condaWidget,
+                                  UI.PixmapCache.getIcon("miniconda.png"),
+                                  self.tr("Conda"))
 
         if Preferences.getUI("ShowCooperation"):
             # Create the chat part of the user interface
@@ -989,13 +990,14 @@
             self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"),
             self.tr("Debug-Viewer"))
 
-        # Create the conda package manager
-        logging.debug("Creating Conda Package Manager...")
-        from CondaInterface.CondaPackagesWidget import CondaPackagesWidget
-        self.condaWidget = CondaPackagesWidget(self.condaInterface)
-        self.rightSidebar.addTab(
-            self.condaWidget, UI.PixmapCache.getIcon("miniconda.png"),
-            self.tr("Conda"))
+        if Preferences.getUI("ShowCondaPackageManager"):
+            # Create the conda package manager
+            logging.debug("Creating Conda Package Manager...")
+            from CondaInterface.CondaPackagesWidget import CondaPackagesWidget
+            self.condaWidget = CondaPackagesWidget(self.condaInterface)
+            self.rightSidebar.addTab(
+                self.condaWidget, UI.PixmapCache.getIcon("miniconda.png"),
+                self.tr("Conda"))
 
         if Preferences.getUI("ShowCooperation"):
             # Create the chat part of the user interface

eric ide

mercurial