Preferences/ConfigurationPages/EditorPropertiesPage.py

changeset 564
b3d966393ba9
parent 97
c4086afea02b
child 791
9ec2ac20e54e
equal deleted inserted replaced
563:e35d2cda9a74 564:b3d966393ba9
30 30
31 self.languages = sorted(list(lexers.keys())[:]) 31 self.languages = sorted(list(lexers.keys())[:])
32 32
33 # set initial values 33 # set initial values
34 # All 34 # All
35 self.allFoldCompactCheckBox.setChecked(\ 35 self.allFoldCompactCheckBox.setChecked(
36 Preferences.getEditor("AllFoldCompact")) 36 Preferences.getEditor("AllFoldCompact"))
37 37
38 # Bash 38 # Bash
39 self.foldBashCommentCheckBox.setChecked(\ 39 self.foldBashCommentCheckBox.setChecked(
40 Preferences.getEditor("BashFoldComment")) 40 Preferences.getEditor("BashFoldComment"))
41 41
42 # CMake 42 # CMake
43 self.cmakeFoldAtElseCheckBox.setChecked(\ 43 self.cmakeFoldAtElseCheckBox.setChecked(
44 Preferences.getEditor("CMakeFoldAtElse")) 44 Preferences.getEditor("CMakeFoldAtElse"))
45 45
46 # C++ 46 # C++
47 self.foldCppCommentCheckBox.setChecked(\ 47 self.foldCppCommentCheckBox.setChecked(
48 Preferences.getEditor("CppFoldComment")) 48 Preferences.getEditor("CppFoldComment"))
49 self.foldCppPreprocessorCheckBox.setChecked(\ 49 self.foldCppPreprocessorCheckBox.setChecked(
50 Preferences.getEditor("CppFoldPreprocessor")) 50 Preferences.getEditor("CppFoldPreprocessor"))
51 self.foldCppAtElseCheckBox.setChecked(\ 51 self.foldCppAtElseCheckBox.setChecked(
52 Preferences.getEditor("CppFoldAtElse")) 52 Preferences.getEditor("CppFoldAtElse"))
53 self.cppIndentOpeningBraceCheckBox.setChecked(\ 53 self.cppIndentOpeningBraceCheckBox.setChecked(
54 Preferences.getEditor("CppIndentOpeningBrace")) 54 Preferences.getEditor("CppIndentOpeningBrace"))
55 self.cppIndentClosingBraceCheckBox.setChecked(\ 55 self.cppIndentClosingBraceCheckBox.setChecked(
56 Preferences.getEditor("CppIndentClosingBrace")) 56 Preferences.getEditor("CppIndentClosingBrace"))
57 self.cppCaseInsensitiveCheckBox.setChecked(\ 57 self.cppCaseInsensitiveCheckBox.setChecked(
58 Preferences.getEditor("CppCaseInsensitiveKeywords")) 58 Preferences.getEditor("CppCaseInsensitiveKeywords"))
59 self.cppDollarAllowedCheckBox.setChecked( 59 self.cppDollarAllowedCheckBox.setChecked(
60 Preferences.getEditor("CppDollarsAllowed")) 60 Preferences.getEditor("CppDollarsAllowed"))
61 61
62 # CSS 62 # CSS
63 self.foldCssCommentCheckBox.setChecked(\ 63 self.foldCssCommentCheckBox.setChecked(
64 Preferences.getEditor("CssFoldComment")) 64 Preferences.getEditor("CssFoldComment"))
65 65
66 # D 66 # D
67 self.foldDCommentCheckBox.setChecked(\ 67 self.foldDCommentCheckBox.setChecked(
68 Preferences.getEditor("DFoldComment")) 68 Preferences.getEditor("DFoldComment"))
69 self.foldDAtElseCheckBox.setChecked(\ 69 self.foldDAtElseCheckBox.setChecked(
70 Preferences.getEditor("DFoldAtElse")) 70 Preferences.getEditor("DFoldAtElse"))
71 self.dIndentOpeningBraceCheckBox.setChecked(\ 71 self.dIndentOpeningBraceCheckBox.setChecked(
72 Preferences.getEditor("DIndentOpeningBrace")) 72 Preferences.getEditor("DIndentOpeningBrace"))
73 self.dIndentClosingBraceCheckBox.setChecked(\ 73 self.dIndentClosingBraceCheckBox.setChecked(
74 Preferences.getEditor("DIndentClosingBrace")) 74 Preferences.getEditor("DIndentClosingBrace"))
75 75
76 # HTML 76 # HTML
77 self.foldHtmlPreprocessorCheckBox.setChecked(\ 77 self.foldHtmlPreprocessorCheckBox.setChecked(
78 Preferences.getEditor("HtmlFoldPreprocessor")) 78 Preferences.getEditor("HtmlFoldPreprocessor"))
79 self.htmlCaseSensitiveTagsCheckBox.setChecked(\ 79 self.htmlCaseSensitiveTagsCheckBox.setChecked(
80 Preferences.getEditor("HtmlCaseSensitiveTags")) 80 Preferences.getEditor("HtmlCaseSensitiveTags"))
81 self.foldHtmlScriptCommentsCheckBox.setChecked( 81 self.foldHtmlScriptCommentsCheckBox.setChecked(
82 Preferences.getEditor("HtmlFoldScriptComments")) 82 Preferences.getEditor("HtmlFoldScriptComments"))
83 self.foldHtmlScriptHereDocsCheckBox.setChecked( 83 self.foldHtmlScriptHereDocsCheckBox.setChecked(
84 Preferences.getEditor("HtmlFoldScriptHeredocs")) 84 Preferences.getEditor("HtmlFoldScriptHeredocs"))
85 85
86 # Pascal 86 # Pascal
87 if "Pascal" in self.languages: 87 if "Pascal" in self.languages:
88 self.pascalGroup.setEnabled(True) 88 self.pascalGroup.setEnabled(True)
89 self.foldPascalCommentCheckBox.setChecked(\ 89 self.foldPascalCommentCheckBox.setChecked(
90 Preferences.getEditor("PascalFoldComment")) 90 Preferences.getEditor("PascalFoldComment"))
91 self.foldPascalPreprocessorCheckBox.setChecked(\ 91 self.foldPascalPreprocessorCheckBox.setChecked(
92 Preferences.getEditor("PascalFoldPreprocessor")) 92 Preferences.getEditor("PascalFoldPreprocessor"))
93 if QSCINTILLA_VERSION() >= 0x020400: 93 if QSCINTILLA_VERSION() >= 0x020400:
94 self.pascalSmartHighlightingCheckBox.setChecked( 94 self.pascalSmartHighlightingCheckBox.setChecked(
95 Preferences.getEditor("PascalSmartHighlighting")) 95 Preferences.getEditor("PascalSmartHighlighting"))
96 else: 96 else:
97 self.pascalSmartHighlightingCheckBox.setEnabled(False) 97 self.pascalSmartHighlightingCheckBox.setEnabled(False)
98 else: 98 else:
99 self.pascalGroup.setEnabled(False) 99 self.pascalGroup.setEnabled(False)
100 100
101 # Perl 101 # Perl
102 self.foldPerlCommentCheckBox.setChecked(\ 102 self.foldPerlCommentCheckBox.setChecked(
103 Preferences.getEditor("PerlFoldComment")) 103 Preferences.getEditor("PerlFoldComment"))
104 self.foldPerlPackagesCheckBox.setChecked( 104 self.foldPerlPackagesCheckBox.setChecked(
105 Preferences.getEditor("PerlFoldPackages")) 105 Preferences.getEditor("PerlFoldPackages"))
106 self.foldPerlPODBlocksCheckBox.setChecked( 106 self.foldPerlPODBlocksCheckBox.setChecked(
107 Preferences.getEditor("PerlFoldPODBlocks")) 107 Preferences.getEditor("PerlFoldPODBlocks"))
108 108
109 # PostScript 109 # PostScript
110 if "PostScript" in self.languages: 110 if "PostScript" in self.languages:
111 self.postscriptGroup.setEnabled(True) 111 self.postscriptGroup.setEnabled(True)
112 self.psFoldAtElseCheckBox.setChecked(\ 112 self.psFoldAtElseCheckBox.setChecked(
113 Preferences.getEditor("PostScriptFoldAtElse")) 113 Preferences.getEditor("PostScriptFoldAtElse"))
114 self.psMarkTokensCheckBox.setChecked(\ 114 self.psMarkTokensCheckBox.setChecked(
115 Preferences.getEditor("PostScriptTokenize")) 115 Preferences.getEditor("PostScriptTokenize"))
116 self.psLevelSpinBox.setValue(\ 116 self.psLevelSpinBox.setValue(
117 Preferences.getEditor("PostScriptLevel")) 117 Preferences.getEditor("PostScriptLevel"))
118 else: 118 else:
119 self.postscriptGroup.setEnabled(False) 119 self.postscriptGroup.setEnabled(False)
120 120
121 # Povray 121 # Povray
122 self.foldPovrayCommentCheckBox.setChecked(\ 122 self.foldPovrayCommentCheckBox.setChecked(
123 Preferences.getEditor("PovFoldComment")) 123 Preferences.getEditor("PovFoldComment"))
124 self.foldPovrayDirectivesCheckBox.setChecked(\ 124 self.foldPovrayDirectivesCheckBox.setChecked(
125 Preferences.getEditor("PovFoldDirectives")) 125 Preferences.getEditor("PovFoldDirectives"))
126 126
127 # Python 127 # Python
128 self.foldPythonCommentCheckBox.setChecked(\ 128 self.foldPythonCommentCheckBox.setChecked(
129 Preferences.getEditor("PythonFoldComment")) 129 Preferences.getEditor("PythonFoldComment"))
130 self.foldPythonStringCheckBox.setChecked(\ 130 self.foldPythonStringCheckBox.setChecked(
131 Preferences.getEditor("PythonFoldString")) 131 Preferences.getEditor("PythonFoldString"))
132 self.pythonBadIndentationCheckBox.setChecked(\ 132 self.pythonBadIndentationCheckBox.setChecked(
133 Preferences.getEditor("PythonBadIndentation")) 133 Preferences.getEditor("PythonBadIndentation"))
134 self.pythonAutoindentCheckBox.setChecked(\ 134 self.pythonAutoindentCheckBox.setChecked(
135 Preferences.getEditor("PythonAutoIndent")) 135 Preferences.getEditor("PythonAutoIndent"))
136 self.pythonV2UnicodeAllowedCheckBox.setChecked( 136 self.pythonV2UnicodeAllowedCheckBox.setChecked(
137 Preferences.getEditor("PythonAllowV2Unicode")) 137 Preferences.getEditor("PythonAllowV2Unicode"))
138 self.pythonV3BinaryAllowedCheckBox.setChecked( 138 self.pythonV3BinaryAllowedCheckBox.setChecked(
139 Preferences.getEditor("PythonAllowV3Binary")) 139 Preferences.getEditor("PythonAllowV3Binary"))
140 self.pythonV3BytesAllowedCheckBox.setChecked( 140 self.pythonV3BytesAllowedCheckBox.setChecked(
141 Preferences.getEditor("PythonAllowV3Bytes")) 141 Preferences.getEditor("PythonAllowV3Bytes"))
142 142
143 # SQL 143 # SQL
144 self.foldSqlCommentCheckBox.setChecked(\ 144 self.foldSqlCommentCheckBox.setChecked(
145 Preferences.getEditor("SqlFoldComment")) 145 Preferences.getEditor("SqlFoldComment"))
146 self.sqlBackslashEscapesCheckBox.setChecked(\ 146 self.sqlBackslashEscapesCheckBox.setChecked(
147 Preferences.getEditor("SqlBackslashEscapes")) 147 Preferences.getEditor("SqlBackslashEscapes"))
148 148
149 # VHDL 149 # VHDL
150 self.vhdlFoldCommentCheckBox.setChecked(\ 150 self.vhdlFoldCommentCheckBox.setChecked(
151 Preferences.getEditor("VHDLFoldComment")) 151 Preferences.getEditor("VHDLFoldComment"))
152 self.vhdlFoldAtElseCheckBox.setChecked(\ 152 self.vhdlFoldAtElseCheckBox.setChecked(
153 Preferences.getEditor("VHDLFoldAtElse")) 153 Preferences.getEditor("VHDLFoldAtElse"))
154 self.vhdlFoldAtBeginCheckBox.setChecked(\ 154 self.vhdlFoldAtBeginCheckBox.setChecked(
155 Preferences.getEditor("VHDLFoldAtBegin")) 155 Preferences.getEditor("VHDLFoldAtBegin"))
156 self.vhdlFoldAtParenthesisCheckBox.setChecked(\ 156 self.vhdlFoldAtParenthesisCheckBox.setChecked(
157 Preferences.getEditor("VHDLFoldAtParenthesis")) 157 Preferences.getEditor("VHDLFoldAtParenthesis"))
158 158
159 # XML 159 # XML
160 self.xmlSyleScriptsCheckBox.setChecked( 160 self.xmlSyleScriptsCheckBox.setChecked(
161 Preferences.getEditor("XMLStyleScripts")) 161 Preferences.getEditor("XMLStyleScripts"))
162 162
163 # YAML 163 # YAML
164 if "YAML" in self.languages: 164 if "YAML" in self.languages:
165 self.yamlGroup.setEnabled(True) 165 self.yamlGroup.setEnabled(True)
166 self.foldYamlCommentCheckBox.setChecked(\ 166 self.foldYamlCommentCheckBox.setChecked(
167 Preferences.getEditor("YAMLFoldComment")) 167 Preferences.getEditor("YAMLFoldComment"))
168 else: 168 else:
169 self.yamlGroup.setEnabled(False) 169 self.yamlGroup.setEnabled(False)
170 170
171 def save(self): 171 def save(self):

eric ide

mercurial