Preferences/ConfigurationPages/EditorPropertiesPage.py

changeset 5420
53ca6ddb4acf
parent 5389
9b1c800daff3
child 5436
af16135f6172
diff -r 6f7a196d25da -r 53ca6ddb4acf Preferences/ConfigurationPages/EditorPropertiesPage.py
--- a/Preferences/ConfigurationPages/EditorPropertiesPage.py	Thu Jan 12 19:26:13 2017 +0100
+++ b/Preferences/ConfigurationPages/EditorPropertiesPage.py	Sat Jan 14 14:12:42 2017 +0100
@@ -57,33 +57,19 @@
             Preferences.getEditor("CppCaseInsensitiveKeywords"))
         self.cppDollarAllowedCheckBox.setChecked(
             Preferences.getEditor("CppDollarsAllowed"))
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.cppStylePreprocessorCheckBox.setChecked(
-                Preferences.getEditor("CppStylePreprocessor"))
-        else:
-            self.cppStylePreprocessorCheckBox.setEnabled(False)
-        if QSCINTILLA_VERSION() >= 0x020600:
-            self.cppHighlightTripleQuotedCheckBox.setChecked(
-                Preferences.getEditor("CppHighlightTripleQuotedStrings"))
-        else:
-            self.cppHighlightTripleQuotedCheckBox.setEnabled(False)
-        if QSCINTILLA_VERSION() >= 0x020700:
-            self.cppHighlightHashQuotedCheckBox.setChecked(
-                Preferences.getEditor("CppHighlightHashQuotedStrings"))
-        else:
-            self.cppHighlightHashQuotedCheckBox.setEnabled(False)
-        if QSCINTILLA_VERSION() >= 0x020900:
-            self.cppHighlightBackQuotedCheckBox.setChecked(
-                Preferences.getEditor("CppHighlightBackQuotedStrings"))
-            self.cppHighlightEsacepSequencesCheckBox.setChecked(
-                Preferences.getEditor("CppHighlightEscapeSequences"))
-            self.cppVerbatimStringEscapeAllowedCheckBox.setChecked(
-                Preferences.getEditor(
-                    "CppVerbatimStringEscapeSequencesAllowed"))
-        else:
-            self.cppHighlightBackQuotedCheckBox.setEnabled(False)
-            self.cppHighlightEsacepSequencesCheckBox.setEnabled(False)
-            self.cppVerbatimStringEscapeAllowedCheckBox.setEnabled(False)
+        self.cppStylePreprocessorCheckBox.setChecked(
+            Preferences.getEditor("CppStylePreprocessor"))
+        self.cppHighlightTripleQuotedCheckBox.setChecked(
+            Preferences.getEditor("CppHighlightTripleQuotedStrings"))
+        self.cppHighlightHashQuotedCheckBox.setChecked(
+            Preferences.getEditor("CppHighlightHashQuotedStrings"))
+        self.cppHighlightBackQuotedCheckBox.setChecked(
+            Preferences.getEditor("CppHighlightBackQuotedStrings"))
+        self.cppHighlightEsacepSequencesCheckBox.setChecked(
+            Preferences.getEditor("CppHighlightEscapeSequences"))
+        self.cppVerbatimStringEscapeAllowedCheckBox.setChecked(
+            Preferences.getEditor(
+                "CppVerbatimStringEscapeSequencesAllowed"))
         
         # CMake
         self.cmakeFoldAtElseCheckBox.setChecked(
@@ -103,17 +89,12 @@
         # CSS
         self.foldCssCommentCheckBox.setChecked(
             Preferences.getEditor("CssFoldComment"))
-        if QSCINTILLA_VERSION() >= 0x020700:
-            self.cssHssCheckBox.setChecked(
-                Preferences.getEditor("CssHssSupport"))
-            self.cssLessCheckBox.setChecked(
-                Preferences.getEditor("CssLessSupport"))
-            self.cssSassyCheckBox.setChecked(
-                Preferences.getEditor("CssSassySupport"))
-        else:
-            self.cssHssCheckBox.setEnabled(False)
-            self.cssLessCheckBox.setEnabled(False)
-            self.cssSassyCheckBox.setEnabled(False)
+        self.cssHssCheckBox.setChecked(
+            Preferences.getEditor("CssHssSupport"))
+        self.cssLessCheckBox.setChecked(
+            Preferences.getEditor("CssLessSupport"))
+        self.cssSassyCheckBox.setChecked(
+            Preferences.getEditor("CssSassySupport"))
         
         # D
         self.foldDCommentCheckBox.setChecked(
@@ -141,29 +122,28 @@
             Preferences.getEditor("HtmlFoldScriptComments"))
         self.foldHtmlScriptHereDocsCheckBox.setChecked(
             Preferences.getEditor("HtmlFoldScriptHeredocs"))
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.htmlDjangoCheckBox.setChecked(
-                Preferences.getEditor("HtmlDjangoTemplates"))
-            self.htmlMakoCheckBox.setChecked(
-                Preferences.getEditor("HtmlMakoTemplates"))
+        self.htmlDjangoCheckBox.setChecked(
+            Preferences.getEditor("HtmlDjangoTemplates"))
+        self.htmlMakoCheckBox.setChecked(
+            Preferences.getEditor("HtmlMakoTemplates"))
+        
+        # JSON
+        if "JSON" in self.languages:
+            self.jsonHighlightCommentsCheckBox.setChecked(
+                Preferences.getEditor("JSONHightlightComments"))
+            self.jsonHighlightEscapeCheckBox.setChecked(
+                Preferences.getEditor("JSONHighlightEscapeSequences"))
         else:
-            self.htmlDjangoCheckBox.setEnabled(False)
-            self.htmlMakoCheckBox.setEnabled(False)
+            self.jsonGroup.setEnabled(False)
         
         # Pascal
-        if "Pascal" in self.languages:
-            self.pascalGroup.setEnabled(True)
-            self.foldPascalCommentCheckBox.setChecked(
-                Preferences.getEditor("PascalFoldComment"))
-            self.foldPascalPreprocessorCheckBox.setChecked(
-                Preferences.getEditor("PascalFoldPreprocessor"))
-            if QSCINTILLA_VERSION() >= 0x020400:
-                self.pascalSmartHighlightingCheckBox.setChecked(
-                    Preferences.getEditor("PascalSmartHighlighting"))
-            else:
-                self.pascalSmartHighlightingCheckBox.setEnabled(False)
-        else:
-            self.pascalGroup.setEnabled(False)
+        self.pascalGroup.setEnabled(True)
+        self.foldPascalCommentCheckBox.setChecked(
+            Preferences.getEditor("PascalFoldComment"))
+        self.foldPascalPreprocessorCheckBox.setChecked(
+            Preferences.getEditor("PascalFoldPreprocessor"))
+        self.pascalSmartHighlightingCheckBox.setChecked(
+            Preferences.getEditor("PascalSmartHighlighting"))
         
         # Perl
         self.foldPerlCommentCheckBox.setChecked(
@@ -172,23 +152,17 @@
             Preferences.getEditor("PerlFoldPackages"))
         self.foldPerlPODBlocksCheckBox.setChecked(
             Preferences.getEditor("PerlFoldPODBlocks"))
-        if QSCINTILLA_VERSION() >= 0x020600:
-            self.foldPerlAtElseCheckBox.setChecked(
-                Preferences.getEditor("PerlFoldAtElse"))
-        else:
-            self.foldPerlAtElseCheckBox.setEnabled(False)
+        self.foldPerlAtElseCheckBox.setChecked(
+            Preferences.getEditor("PerlFoldAtElse"))
         
         # PostScript
-        if "PostScript" in self.languages:
-            self.postscriptGroup.setEnabled(True)
-            self.psFoldAtElseCheckBox.setChecked(
-                Preferences.getEditor("PostScriptFoldAtElse"))
-            self.psMarkTokensCheckBox.setChecked(
-                Preferences.getEditor("PostScriptTokenize"))
-            self.psLevelSpinBox.setValue(
-                Preferences.getEditor("PostScriptLevel"))
-        else:
-            self.postscriptGroup.setEnabled(False)
+        self.postscriptGroup.setEnabled(True)
+        self.psFoldAtElseCheckBox.setChecked(
+            Preferences.getEditor("PostScriptFoldAtElse"))
+        self.psMarkTokensCheckBox.setChecked(
+            Preferences.getEditor("PostScriptTokenize"))
+        self.psLevelSpinBox.setValue(
+            Preferences.getEditor("PostScriptLevel"))
         
         # Povray
         self.foldPovrayCommentCheckBox.setChecked(
@@ -197,11 +171,8 @@
             Preferences.getEditor("PovFoldDirectives"))
         
         # Properties
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.propertiesInitialSpacesCheckBox.setChecked(
-                Preferences.getEditor("PropertiesInitialSpaces"))
-        else:
-            self.propertiesInitialSpacesCheckBox.setEnabled(False)
+        self.propertiesInitialSpacesCheckBox.setChecked(
+            Preferences.getEditor("PropertiesInitialSpaces"))
         
         # Python
         self.pythonBadIndentationComboBox.addItems([
@@ -225,69 +196,44 @@
             Preferences.getEditor("PythonAllowV3Binary"))
         self.pythonV3BytesAllowedCheckBox.setChecked(
             Preferences.getEditor("PythonAllowV3Bytes"))
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.foldPythonQuotesCheckBox.setChecked(
-                Preferences.getEditor("PythonFoldQuotes"))
-            self.pythonStringsOverNewlineCheckBox.setChecked(
-                Preferences.getEditor("PythonStringsOverNewLineAllowed"))
-        else:
-            self.foldPythonQuotesCheckBox.setEnabled(False)
-            self.pythonStringsOverNewlineCheckBox.setEnabled(False)
-        if QSCINTILLA_VERSION() >= 0x020600:
-            self.pythonHighlightSubidentifierCheckBox.setChecked(
-                Preferences.getEditor("PythonHighlightSubidentifier"))
-        else:
-            self.pythonHighlightSubidentifierCheckBox.setEnabled(False)
+        self.foldPythonQuotesCheckBox.setChecked(
+            Preferences.getEditor("PythonFoldQuotes"))
+        self.pythonStringsOverNewlineCheckBox.setChecked(
+            Preferences.getEditor("PythonStringsOverNewLineAllowed"))
+        self.pythonHighlightSubidentifierCheckBox.setChecked(
+            Preferences.getEditor("PythonHighlightSubidentifier"))
         
         # Ruby
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.foldRubyCommentCheckBox.setChecked(
-                Preferences.getEditor("RubyFoldComment"))
-        else:
-            self.foldRubyCommentCheckBox.setEnabled(False)
+        self.foldRubyCommentCheckBox.setChecked(
+            Preferences.getEditor("RubyFoldComment"))
         
         # SQL
         self.foldSqlCommentCheckBox.setChecked(
             Preferences.getEditor("SqlFoldComment"))
         self.sqlBackslashEscapesCheckBox.setChecked(
             Preferences.getEditor("SqlBackslashEscapes"))
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.sqlFoldAtElseCheckBox.setChecked(
-                Preferences.getEditor("SqlFoldAtElse"))
-            self.sqlFoldOnlyBeginCheckBox.setChecked(
-                Preferences.getEditor("SqlFoldOnlyBegin"))
-            self.sqlDottedWordsCheckBox.setChecked(
-                Preferences.getEditor("SqlDottedWords"))
-            self.sqlHashCommentsCheckBox.setChecked(
-                Preferences.getEditor("SqlHashComments"))
-            self.sqlQuotedIdentifiersCheckBox.setChecked(
-                Preferences.getEditor("SqlQuotedIdentifiers"))
-        else:
-            self.sqlFoldAtElseCheckBox.setEnabled(False)
-            self.sqlFoldOnlyBeginCheckBox.setEnabled(False)
-            self.sqlDottedWordsCheckBox.setEnabled(False)
-            self.sqlHashCommentsCheckBox.setEnabled(False)
-            self.sqlQuotedIdentifiersCheckBox.setEnabled(False)
+        self.sqlFoldAtElseCheckBox.setChecked(
+            Preferences.getEditor("SqlFoldAtElse"))
+        self.sqlFoldOnlyBeginCheckBox.setChecked(
+            Preferences.getEditor("SqlFoldOnlyBegin"))
+        self.sqlDottedWordsCheckBox.setChecked(
+            Preferences.getEditor("SqlDottedWords"))
+        self.sqlHashCommentsCheckBox.setChecked(
+            Preferences.getEditor("SqlHashComments"))
+        self.sqlQuotedIdentifiersCheckBox.setChecked(
+            Preferences.getEditor("SqlQuotedIdentifiers"))
         
         # TCL
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.foldTclCommentCheckBox.setChecked(
-                Preferences.getEditor("TclFoldComment"))
-        else:
-            self.foldTclCommentCheckBox.setEnabled(False)
+        self.foldTclCommentCheckBox.setChecked(
+            Preferences.getEditor("TclFoldComment"))
         
         # TeX
-        if QSCINTILLA_VERSION() >= 0x020500:
-            self.foldTexCommentCheckBox.setChecked(
-                Preferences.getEditor("TexFoldComment"))
-            self.texProcessCommentsCheckBox.setChecked(
-                Preferences.getEditor("TexProcessComments"))
-            self.texProcessIfCheckBox.setChecked(
-                Preferences.getEditor("TexProcessIf"))
-        else:
-            self.foldTexCommentCheckBox.setEnabled(False)
-            self.texProcessCommentsCheckBox.setEnabled(False)
-            self.texProcessIfCheckBox.setEnabled(False)
+        self.foldTexCommentCheckBox.setChecked(
+            Preferences.getEditor("TexFoldComment"))
+        self.texProcessCommentsCheckBox.setChecked(
+            Preferences.getEditor("TexProcessComments"))
+        self.texProcessIfCheckBox.setChecked(
+            Preferences.getEditor("TexProcessIf"))
         
         # VHDL
         self.vhdlFoldCommentCheckBox.setChecked(
@@ -304,12 +250,9 @@
             Preferences.getEditor("XMLStyleScripts"))
         
         # YAML
-        if "YAML" in self.languages:
-            self.yamlGroup.setEnabled(True)
-            self.foldYamlCommentCheckBox.setChecked(
-                Preferences.getEditor("YAMLFoldComment"))
-        else:
-            self.yamlGroup.setEnabled(False)
+        self.yamlGroup.setEnabled(True)
+        self.foldYamlCommentCheckBox.setChecked(
+            Preferences.getEditor("YAMLFoldComment"))
         
     def save(self):
         """
@@ -352,18 +295,15 @@
         Preferences.setEditor(
             "CppDollarsAllowed",
             self.cppDollarAllowedCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "CppStylePreprocessor",
-                self.cppStylePreprocessorCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020600:
-            Preferences.setEditor(
-                "CppHighlightTripleQuotedStrings",
-                self.cppHighlightTripleQuotedCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020700:
-            Preferences.setEditor(
-                "CppHighlightHashQuotedStrings",
-                self.cppHighlightHashQuotedCheckBox.isChecked())
+        Preferences.setEditor(
+            "CppStylePreprocessor",
+            self.cppStylePreprocessorCheckBox.isChecked())
+        Preferences.setEditor(
+            "CppHighlightTripleQuotedStrings",
+            self.cppHighlightTripleQuotedCheckBox.isChecked())
+        Preferences.setEditor(
+            "CppHighlightHashQuotedStrings",
+            self.cppHighlightHashQuotedCheckBox.isChecked())
         if QSCINTILLA_VERSION() >= 0x020900:
             Preferences.setEditor(
                 "CppHighlightBackQuotedStrings",
@@ -396,16 +336,15 @@
         Preferences.setEditor(
             "CssFoldComment",
             self.foldCssCommentCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020700:
-            Preferences.setEditor(
-                "CssHssSupport",
-                self.cssHssCheckBox.isChecked())
-            Preferences.setEditor(
-                "CssLessSupport",
-                self.cssLessCheckBox.isChecked())
-            Preferences.setEditor(
-                "CssSassySupport",
-                self.cssSassyCheckBox.isChecked())
+        Preferences.setEditor(
+            "CssHssSupport",
+            self.cssHssCheckBox.isChecked())
+        Preferences.setEditor(
+            "CssLessSupport",
+            self.cssLessCheckBox.isChecked())
+        Preferences.setEditor(
+            "CssSassySupport",
+            self.cssSassyCheckBox.isChecked())
         
         # D
         Preferences.setEditor(
@@ -440,25 +379,30 @@
         Preferences.setEditor(
             "HtmlFoldScriptHeredocs",
             self.foldHtmlScriptHereDocsCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "HtmlDjangoTemplates",
-                self.htmlDjangoCheckBox.isChecked())
-            Preferences.setEditor(
-                "HtmlMakoTemplates",
-                self.htmlMakoCheckBox.isChecked())
+        Preferences.setEditor(
+            "HtmlDjangoTemplates",
+            self.htmlDjangoCheckBox.isChecked())
+        Preferences.setEditor(
+            "HtmlMakoTemplates",
+            self.htmlMakoCheckBox.isChecked())
+        
+        # JSON
+        if "JSON" in self.languages:
+            Preferences.setEditor("JSONHightlightComments",
+                self.jsonHighlightCommentsCheckBox.isChecked())
+            Preferences.setEditor("JSONHighlightEscapeSequences",
+                self.jsonHighlightEscapeCheckBox.isChecked())
         
         # Pascal
-        if "Pascal" in self.languages:
-            Preferences.setEditor(
-                "PascalFoldComment",
-                self.foldPascalCommentCheckBox.isChecked())
-            Preferences.setEditor(
-                "PascalFoldPreprocessor",
-                self.foldPascalPreprocessorCheckBox.isChecked())
-            Preferences.setEditor(
-                "PascalSmartHighlighting",
-                self.pascalSmartHighlightingCheckBox.isChecked())
+        Preferences.setEditor(
+            "PascalFoldComment",
+            self.foldPascalCommentCheckBox.isChecked())
+        Preferences.setEditor(
+            "PascalFoldPreprocessor",
+            self.foldPascalPreprocessorCheckBox.isChecked())
+        Preferences.setEditor(
+            "PascalSmartHighlighting",
+            self.pascalSmartHighlightingCheckBox.isChecked())
         
         # Perl
         Preferences.setEditor(
@@ -470,22 +414,20 @@
         Preferences.setEditor(
             "PerlFoldPODBlocks",
             self.foldPerlPODBlocksCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020600:
-            Preferences.setEditor(
-                "PerlFoldAtElse",
-                self.foldPerlAtElseCheckBox.isChecked())
+        Preferences.setEditor(
+            "PerlFoldAtElse",
+            self.foldPerlAtElseCheckBox.isChecked())
         
         # PostScript
-        if "PostScript" in self.languages:
-            Preferences.setEditor(
-                "PostScriptFoldAtElse",
-                self.psFoldAtElseCheckBox.isChecked())
-            Preferences.setEditor(
-                "PostScriptTokenize",
-                self.psMarkTokensCheckBox.isChecked())
-            Preferences.setEditor(
-                "PostScriptLevel",
-                self.psLevelSpinBox.value())
+        Preferences.setEditor(
+            "PostScriptFoldAtElse",
+            self.psFoldAtElseCheckBox.isChecked())
+        Preferences.setEditor(
+            "PostScriptTokenize",
+            self.psMarkTokensCheckBox.isChecked())
+        Preferences.setEditor(
+            "PostScriptLevel",
+            self.psLevelSpinBox.value())
         
         # Povray
         Preferences.setEditor(
@@ -496,10 +438,9 @@
             self.foldPovrayDirectivesCheckBox.isChecked())
         
         # Properties
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "PropertiesInitialSpaces",
-                self.propertiesInitialSpacesCheckBox.isChecked())
+        Preferences.setEditor(
+            "PropertiesInitialSpaces",
+            self.propertiesInitialSpacesCheckBox.isChecked())
         
         # Python
         Preferences.setEditor(
@@ -523,23 +464,20 @@
         Preferences.setEditor(
             "PythonAllowV3Bytes",
             self.pythonV3BytesAllowedCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "PythonFoldQuotes",
-                self.foldPythonQuotesCheckBox.isChecked())
-            Preferences.setEditor(
-                "PythonStringsOverNewLineAllowed",
-                self.pythonStringsOverNewlineCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020600:
-            Preferences.setEditor(
-                "PythonHighlightSubidentifier",
-                self.pythonHighlightSubidentifierCheckBox.isChecked())
+        Preferences.setEditor(
+            "PythonFoldQuotes",
+            self.foldPythonQuotesCheckBox.isChecked())
+        Preferences.setEditor(
+            "PythonStringsOverNewLineAllowed",
+            self.pythonStringsOverNewlineCheckBox.isChecked())
+        Preferences.setEditor(
+            "PythonHighlightSubidentifier",
+            self.pythonHighlightSubidentifierCheckBox.isChecked())
         
         # Ruby
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "RubyFoldComment",
-                self.foldRubyCommentCheckBox.isChecked())
+        Preferences.setEditor(
+            "RubyFoldComment",
+            self.foldRubyCommentCheckBox.isChecked())
         
         # SQL
         Preferences.setEditor(
@@ -548,40 +486,37 @@
         Preferences.setEditor(
             "SqlBackslashEscapes",
             self.sqlBackslashEscapesCheckBox.isChecked())
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "SqlFoldAtElse",
-                self.sqlFoldAtElseCheckBox.isChecked())
-            Preferences.setEditor(
-                "SqlFoldOnlyBegin",
-                self.sqlFoldOnlyBeginCheckBox.isChecked())
-            Preferences.setEditor(
-                "SqlDottedWords",
-                self.sqlDottedWordsCheckBox.isChecked())
-            Preferences.setEditor(
-                "SqlHashComments",
-                self.sqlHashCommentsCheckBox.isChecked())
-            Preferences.setEditor(
-                "SqlQuotedIdentifiers",
-                self.sqlQuotedIdentifiersCheckBox.isChecked())
+        Preferences.setEditor(
+            "SqlFoldAtElse",
+            self.sqlFoldAtElseCheckBox.isChecked())
+        Preferences.setEditor(
+            "SqlFoldOnlyBegin",
+            self.sqlFoldOnlyBeginCheckBox.isChecked())
+        Preferences.setEditor(
+            "SqlDottedWords",
+            self.sqlDottedWordsCheckBox.isChecked())
+        Preferences.setEditor(
+            "SqlHashComments",
+            self.sqlHashCommentsCheckBox.isChecked())
+        Preferences.setEditor(
+            "SqlQuotedIdentifiers",
+            self.sqlQuotedIdentifiersCheckBox.isChecked())
         
         # TCL
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "TclFoldComment",
-                self.foldTclCommentCheckBox.isChecked())
+        Preferences.setEditor(
+            "TclFoldComment",
+            self.foldTclCommentCheckBox.isChecked())
         
         # TeX
-        if QSCINTILLA_VERSION() >= 0x020500:
-            Preferences.setEditor(
-                "TexFoldComment",
-                self.foldTexCommentCheckBox.isChecked())
-            Preferences.setEditor(
-                "TexProcessComments",
-                self.texProcessCommentsCheckBox.isChecked())
-            Preferences.setEditor(
-                "TexProcessIf",
-                self.texProcessIfCheckBox.isChecked())
+        Preferences.setEditor(
+            "TexFoldComment",
+            self.foldTexCommentCheckBox.isChecked())
+        Preferences.setEditor(
+            "TexProcessComments",
+            self.texProcessCommentsCheckBox.isChecked())
+        Preferences.setEditor(
+            "TexProcessIf",
+            self.texProcessIfCheckBox.isChecked())
         
         # VHDL
         Preferences.setEditor(
@@ -603,10 +538,9 @@
             self.xmlSyleScriptsCheckBox.isChecked())
         
         # YAML
-        if "YAML" in self.languages:
-            Preferences.setEditor(
-                "YAMLFoldComment",
-                self.foldYamlCommentCheckBox.isChecked())
+        Preferences.setEditor(
+            "YAMLFoldComment",
+            self.foldYamlCommentCheckBox.isChecked())
 
 
 def create(dlg):

eric ide

mercurial