src/eric7/Preferences/ConfigurationPages/InterfacePage.py

branch
eric7
changeset 10248
981456110843
parent 10069
435cc5875135
child 10373
093dcebe5ecb
--- a/src/eric7/Preferences/ConfigurationPages/InterfacePage.py	Fri Oct 13 16:44:53 2023 +0200
+++ b/src/eric7/Preferences/ConfigurationPages/InterfacePage.py	Sat Oct 14 18:10:36 2023 +0200
@@ -50,6 +50,10 @@
         self.styleIconsPathPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE)
         self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath)
 
+        self.itemSelectionStyleComboBox.addItem(self.tr("System Default"), "default")
+        self.itemSelectionStyleComboBox.addItem(self.tr("Double Click"), "doubleclick")
+        self.itemSelectionStyleComboBox.addItem(self.tr("Single Click"), "singleclick")
+
         for iconBarSize in EricIconBar.BarSizes:
             self.iconSizeComboBox.addItem(
                 EricIconBar.BarSizes[iconBarSize][2], iconBarSize
@@ -80,6 +84,13 @@
         self.styleSheetPicker.setText(Preferences.getUI("StyleSheet"))
         self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath"))
 
+        itemSelectionIndex = self.itemSelectionStyleComboBox.findData(
+            Preferences.getUI("ActivateItemOnSingleClick")
+        )
+        if itemSelectionIndex < 0:
+            itemSelectionIndex = 0
+        self.itemSelectionStyleComboBox.setCurrentIndex(itemSelectionIndex)
+
         layoutType = Preferences.getUI("LayoutType")
         if layoutType == "Sidebars":
             index = 0
@@ -132,6 +143,11 @@
         styleIndex = self.styleComboBox.currentIndex()
         style = self.styleComboBox.itemData(styleIndex)
         Preferences.setUI("Style", style)
+        Preferences.setUI("StyleSheet", self.styleSheetPicker.text())
+        Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text())
+        Preferences.setUI(
+            "ActivateItemOnSingleClick", self.itemSelectionStyleComboBox.currentData()
+        )
 
         # save the other UI related settings
         Preferences.setUI(
@@ -154,8 +170,6 @@
             "CaptionShowsFilename", self.uiCaptionShowsFilenameGroupBox.isChecked()
         )
         Preferences.setUI("CaptionFilenameLength", self.filenameLengthSpinBox.value())
-        Preferences.setUI("StyleSheet", self.styleSheetPicker.text())
-        Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text())
 
         # save the language settings
         uiLanguageIndex = self.languageComboBox.currentIndex()

eric ide

mercurial