47 |
47 |
48 styleIconsPath = ericApp().getStyleIconsPath() |
48 styleIconsPath = ericApp().getStyleIconsPath() |
49 self.styleIconsPathPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE) |
49 self.styleIconsPathPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE) |
50 self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath) |
50 self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath) |
51 |
51 |
|
52 self.itemSelectionStyleComboBox.addItem(self.tr("System Default"), "default") |
|
53 self.itemSelectionStyleComboBox.addItem(self.tr("Double Click"), "doubleclick") |
|
54 self.itemSelectionStyleComboBox.addItem(self.tr("Single Click"), "singleclick") |
|
55 |
52 # set initial values |
56 # set initial values |
53 self.__populateStyleCombo() |
57 self.__populateStyleCombo() |
54 self.__populateLanguageCombo() |
58 self.__populateLanguageCombo() |
55 |
59 |
56 self.styleSheetPicker.setText(Preferences.getUI("StyleSheet")) |
60 self.styleSheetPicker.setText(Preferences.getUI("StyleSheet")) |
57 self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath")) |
61 self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath")) |
|
62 |
|
63 itemSelectionIndex = self.itemSelectionStyleComboBox.findData( |
|
64 Preferences.getUI("ActivateItemOnSingleClick") |
|
65 ) |
|
66 if itemSelectionIndex < 0: |
|
67 itemSelectionIndex = 0 |
|
68 self.itemSelectionStyleComboBox.setCurrentIndex(itemSelectionIndex) |
58 |
69 |
59 def save(self): |
70 def save(self): |
60 """ |
71 """ |
61 Public slot to save the Interface configuration. |
72 Public slot to save the Interface configuration. |
62 """ |
73 """ |
64 styleIndex = self.styleComboBox.currentIndex() |
75 styleIndex = self.styleComboBox.currentIndex() |
65 style = self.styleComboBox.itemData(styleIndex) |
76 style = self.styleComboBox.itemData(styleIndex) |
66 Preferences.setUI("Style", style) |
77 Preferences.setUI("Style", style) |
67 Preferences.setUI("StyleSheet", self.styleSheetPicker.text()) |
78 Preferences.setUI("StyleSheet", self.styleSheetPicker.text()) |
68 Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text()) |
79 Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text()) |
|
80 Preferences.setUI( |
|
81 "ActivateItemOnSingleClick", self.itemSelectionStyleComboBox.currentData() |
|
82 ) |
69 |
83 |
70 # save the language settings |
84 # save the language settings |
71 uiLanguageIndex = self.languageComboBox.currentIndex() |
85 uiLanguageIndex = self.languageComboBox.currentIndex() |
72 uiLanguage = ( |
86 uiLanguage = ( |
73 self.languageComboBox.itemData(uiLanguageIndex) if uiLanguageIndex else None |
87 self.languageComboBox.itemData(uiLanguageIndex) if uiLanguageIndex else None |