Preferences/ConfigurationPages/InterfacePage.py

changeset 6416
a915f8dd1ca6
parent 6048
82ad8ec9548c
child 6420
4dd44f42a24f
diff -r 6268db2f966d -r a915f8dd1ca6 Preferences/ConfigurationPages/InterfacePage.py
--- a/Preferences/ConfigurationPages/InterfacePage.py	Sun Jul 08 17:33:25 2018 +0200
+++ b/Preferences/ConfigurationPages/InterfacePage.py	Sun Jul 08 18:55:21 2018 +0200
@@ -82,24 +82,14 @@
         else:
             self.brTopButton.setChecked(True)
         
-        layout = Preferences.getUILayout()
-        if layout[0] == "Sidebars":
+        layoutType = Preferences.getUI("LayoutType")
+        if layoutType == "Sidebars":
             index = 0
-        elif layout[0] == "Toolboxes":
+        elif layoutType == "Toolboxes":
             index = 1
         else:
             index = 0   # default for bad values
         self.layoutComboBox.setCurrentIndex(index)
-        if layout[1] == 0:
-            self.separateShellButton.setChecked(True)
-        else:
-            self.debugEmbeddedShellButton.setChecked(True)
-        if layout[2] == 0:
-            self.separateFileBrowserButton.setChecked(True)
-        elif layout[2] == 1:
-            self.debugEmbeddedFileBrowserButton.setChecked(True)
-        else:
-            self.projectEmbeddedFileBrowserButton.setChecked(True)
         
         self.tabsGroupBox.setEnabled(True)
         self.tabsCloseButtonCheckBox.setChecked(
@@ -167,24 +157,13 @@
         Preferences.setUILanguage(uiLanguage)
         
         # save the interface layout settings
-        if self.separateShellButton.isChecked():
-            layout2 = 0
-        else:
-            layout2 = 1
-        if self.separateFileBrowserButton.isChecked():
-            layout3 = 0
-        elif self.debugEmbeddedFileBrowserButton.isChecked():
-            layout3 = 1
+        if self.layoutComboBox.currentIndex() == 0:
+            layoutType = "Sidebars"
+        elif self.layoutComboBox.currentIndex() == 1:
+            layoutType = "Toolboxes"
         else:
-            layout3 = 2
-        if self.layoutComboBox.currentIndex() == 0:
-            layout1 = "Sidebars"
-        elif self.layoutComboBox.currentIndex() == 1:
-            layout1 = "Toolboxes"
-        else:
-            layout1 = "Sidebars"    # just in case
-        layout = (layout1, layout2, layout3)
-        Preferences.setUILayout(layout)
+            layoutType = "Sidebars"    # just in case
+        Preferences.setUI("LayoutType", layoutType)
         
         Preferences.setUI(
             "SingleCloseButton",

eric ide

mercurial