eric6/Preferences/ConfigurationPages/InterfacePage.py

changeset 6998
a63ca2373f44
parent 6987
3371a03ed0a7
child 7054
fb84d8489bc1
--- a/eric6/Preferences/ConfigurationPages/InterfacePage.py	Sat May 04 14:34:51 2019 +0200
+++ b/eric6/Preferences/ConfigurationPages/InterfacePage.py	Sat May 04 14:44:11 2019 +0200
@@ -47,6 +47,7 @@
         # set initial values
         self.__populateStyleCombo()
         self.__populateLanguageCombo()
+        self.__populateShellPositionCombo()
         
         self.uiBrowsersListFoldersFirstCheckBox.setChecked(
             Preferences.getUI("BrowsersListFoldersFirst"))
@@ -97,10 +98,6 @@
         self.numbersCheckBox.setChecked(
             Preferences.getUI("ShowNumbersViewer"))
         
-        self.tabsGroupBox.setEnabled(True)
-        self.tabsCloseButtonCheckBox.setChecked(
-            Preferences.getUI("SingleCloseButton"))
-        
         self.delaySpinBox.setValue(Preferences.getUI("SidebarDelay"))
         
     def save(self):
@@ -157,6 +154,11 @@
             layoutType = "Sidebars"    # just in case
         Preferences.setUI("LayoutType", layoutType)
         
+        # save the shell position setting
+        shellPositionIndex = self.shellPositionComboBox.currentIndex()
+        shellPosition = self.shellPositionComboBox.itemData(shellPositionIndex)
+        Preferences.setUI("ShellPosition", shellPosition)
+        
         # save the integrated tools activation
         # left side
         Preferences.setUI(
@@ -189,10 +191,6 @@
             "ShowNumbersViewer",
             self.numbersCheckBox.isChecked())
         
-        Preferences.setUI(
-            "SingleCloseButton",
-            self.tabsCloseButtonCheckBox.isChecked())
-        
         Preferences.setUI("SidebarDelay", self.delaySpinBox.value())
         
     def __populateStyleCombo(self):
@@ -211,8 +209,7 @@
         
     def __populateLanguageCombo(self):
         """
-        Private method to initialize the language combobox of the Interface
-        configuration page.
+        Private method to initialize the language combo box.
         """
         self.languageComboBox.clear()
         
@@ -248,7 +245,21 @@
         for locale in localeList:
             self.languageComboBox.addItem(locales[locale], locale)
         self.languageComboBox.setCurrentIndex(currentIndex)
+    
+    def __populateShellPositionCombo(self):
+        """
+        Private method to initialize the shell position combo box.
+        """
+        self.shellPositionComboBox.addItem(self.tr("Left Side"), "left")
+        self.shellPositionComboBox.addItem(self.tr("Right Side"), "right")
+        self.shellPositionComboBox.addItem(self.tr("Bottom Side"), "bottom")
         
+        shellPosition = Preferences.getUI("ShellPosition")
+        if shellPosition not in ("left", "right", "bottom"):
+            shellPosition = "bottom"
+        index = self.shellPositionComboBox.findData(shellPosition)
+        self.shellPositionComboBox.setCurrentIndex(index)
+    
     @pyqtSlot()
     def on_resetLayoutButton_clicked(self):
         """

eric ide

mercurial