eric7/Preferences/ConfigurationPages/EditorPropertiesPage.py

branch
eric7
changeset 8322
b422b4e77d19
parent 8312
800c432b34c8
child 8881
54e42bc2437a
equal deleted inserted replaced
8319:ea11a3948f40 8322:b422b4e77d19
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the Editor Properties configuration page. 7 Module implementing the Editor Properties configuration page.
8 """ 8 """
9
10 from PyQt6.Qsci import QsciLexerPython
9 11
10 from .ConfigurationPageBase import ConfigurationPageBase 12 from .ConfigurationPageBase import ConfigurationPageBase
11 from .Ui_EditorPropertiesPage import Ui_EditorPropertiesPage 13 from .Ui_EditorPropertiesPage import Ui_EditorPropertiesPage
12 14
13 import Preferences 15 import Preferences
177 self.tr("Tabs after Spaces"), 179 self.tr("Tabs after Spaces"),
178 self.tr("Spaces"), 180 self.tr("Spaces"),
179 self.tr("Tabs"), 181 self.tr("Tabs"),
180 ]) 182 ])
181 self.pythonBadIndentationComboBox.setCurrentIndex( 183 self.pythonBadIndentationComboBox.setCurrentIndex(
182 Preferences.getEditor("PythonBadIndentation")) 184 Preferences.getEditor("PythonBadIndentation").value)
183 self.foldPythonCommentCheckBox.setChecked( 185 self.foldPythonCommentCheckBox.setChecked(
184 Preferences.getEditor("PythonFoldComment")) 186 Preferences.getEditor("PythonFoldComment"))
185 self.foldPythonStringCheckBox.setChecked( 187 self.foldPythonStringCheckBox.setChecked(
186 Preferences.getEditor("PythonFoldString")) 188 Preferences.getEditor("PythonFoldString"))
187 self.pythonAutoindentCheckBox.setChecked( 189 self.pythonAutoindentCheckBox.setChecked(
446 Preferences.setEditor( 448 Preferences.setEditor(
447 "PythonFoldString", 449 "PythonFoldString",
448 self.foldPythonStringCheckBox.isChecked()) 450 self.foldPythonStringCheckBox.isChecked())
449 Preferences.setEditor( 451 Preferences.setEditor(
450 "PythonBadIndentation", 452 "PythonBadIndentation",
451 self.pythonBadIndentationComboBox.currentIndex()) 453 QsciLexerPython.IndentationWarning(
454 self.pythonBadIndentationComboBox.currentIndex()))
452 Preferences.setEditor( 455 Preferences.setEditor(
453 "PythonAutoIndent", 456 "PythonAutoIndent",
454 self.pythonAutoindentCheckBox.isChecked()) 457 self.pythonAutoindentCheckBox.isChecked())
455 Preferences.setEditor( 458 Preferences.setEditor(
456 "PythonAllowV2Unicode", 459 "PythonAllowV2Unicode",

eric ide

mercurial