src/eric7/Preferences/ConfigurationPages/InterfacePage.py

branch
eric7
changeset 10248
981456110843
parent 10069
435cc5875135
child 10373
093dcebe5ecb
equal deleted inserted replaced
10247:81f8846b62ad 10248:981456110843
48 48
49 styleIconsPath = ericApp().getStyleIconsPath() 49 styleIconsPath = ericApp().getStyleIconsPath()
50 self.styleIconsPathPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE) 50 self.styleIconsPathPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE)
51 self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath) 51 self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath)
52 52
53 self.itemSelectionStyleComboBox.addItem(self.tr("System Default"), "default")
54 self.itemSelectionStyleComboBox.addItem(self.tr("Double Click"), "doubleclick")
55 self.itemSelectionStyleComboBox.addItem(self.tr("Single Click"), "singleclick")
56
53 for iconBarSize in EricIconBar.BarSizes: 57 for iconBarSize in EricIconBar.BarSizes:
54 self.iconSizeComboBox.addItem( 58 self.iconSizeComboBox.addItem(
55 EricIconBar.BarSizes[iconBarSize][2], iconBarSize 59 EricIconBar.BarSizes[iconBarSize][2], iconBarSize
56 ) 60 )
57 61
77 Preferences.getUI("CaptionShowsFilename") 81 Preferences.getUI("CaptionShowsFilename")
78 ) 82 )
79 self.filenameLengthSpinBox.setValue(Preferences.getUI("CaptionFilenameLength")) 83 self.filenameLengthSpinBox.setValue(Preferences.getUI("CaptionFilenameLength"))
80 self.styleSheetPicker.setText(Preferences.getUI("StyleSheet")) 84 self.styleSheetPicker.setText(Preferences.getUI("StyleSheet"))
81 self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath")) 85 self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath"))
86
87 itemSelectionIndex = self.itemSelectionStyleComboBox.findData(
88 Preferences.getUI("ActivateItemOnSingleClick")
89 )
90 if itemSelectionIndex < 0:
91 itemSelectionIndex = 0
92 self.itemSelectionStyleComboBox.setCurrentIndex(itemSelectionIndex)
82 93
83 layoutType = Preferences.getUI("LayoutType") 94 layoutType = Preferences.getUI("LayoutType")
84 if layoutType == "Sidebars": 95 if layoutType == "Sidebars":
85 index = 0 96 index = 0
86 elif layoutType == "Toolboxes": 97 elif layoutType == "Toolboxes":
130 """ 141 """
131 # save the style settings 142 # save the style settings
132 styleIndex = self.styleComboBox.currentIndex() 143 styleIndex = self.styleComboBox.currentIndex()
133 style = self.styleComboBox.itemData(styleIndex) 144 style = self.styleComboBox.itemData(styleIndex)
134 Preferences.setUI("Style", style) 145 Preferences.setUI("Style", style)
146 Preferences.setUI("StyleSheet", self.styleSheetPicker.text())
147 Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text())
148 Preferences.setUI(
149 "ActivateItemOnSingleClick", self.itemSelectionStyleComboBox.currentData()
150 )
135 151
136 # save the other UI related settings 152 # save the other UI related settings
137 Preferences.setUI( 153 Preferences.setUI(
138 "BrowsersListFoldersFirst", 154 "BrowsersListFoldersFirst",
139 self.uiBrowsersListFoldersFirstCheckBox.isChecked(), 155 self.uiBrowsersListFoldersFirstCheckBox.isChecked(),
152 168
153 Preferences.setUI( 169 Preferences.setUI(
154 "CaptionShowsFilename", self.uiCaptionShowsFilenameGroupBox.isChecked() 170 "CaptionShowsFilename", self.uiCaptionShowsFilenameGroupBox.isChecked()
155 ) 171 )
156 Preferences.setUI("CaptionFilenameLength", self.filenameLengthSpinBox.value()) 172 Preferences.setUI("CaptionFilenameLength", self.filenameLengthSpinBox.value())
157 Preferences.setUI("StyleSheet", self.styleSheetPicker.text())
158 Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text())
159 173
160 # save the language settings 174 # save the language settings
161 uiLanguageIndex = self.languageComboBox.currentIndex() 175 uiLanguageIndex = self.languageComboBox.currentIndex()
162 uiLanguage = ( 176 uiLanguage = (
163 self.languageComboBox.itemData(uiLanguageIndex) if uiLanguageIndex else None 177 self.languageComboBox.itemData(uiLanguageIndex) if uiLanguageIndex else None

eric ide

mercurial