Preferences/ConfigurationPages/EditorPropertiesPage.py

changeset 948
fe7b94ed01ec
parent 945
8cd4d08fa9f6
child 1131
7781e396c903
equal deleted inserted replaced
946:daf90a162be4 948:fe7b94ed01ec
57 Preferences.getEditor("CppIndentClosingBrace")) 57 Preferences.getEditor("CppIndentClosingBrace"))
58 self.cppCaseInsensitiveCheckBox.setChecked( 58 self.cppCaseInsensitiveCheckBox.setChecked(
59 Preferences.getEditor("CppCaseInsensitiveKeywords")) 59 Preferences.getEditor("CppCaseInsensitiveKeywords"))
60 self.cppDollarAllowedCheckBox.setChecked( 60 self.cppDollarAllowedCheckBox.setChecked(
61 Preferences.getEditor("CppDollarsAllowed")) 61 Preferences.getEditor("CppDollarsAllowed"))
62 if QSCINTILLA_VERSION() >= 0x020500:
63 self.cppStylePreprocessorCheckBox.setChecked(
64 Preferences.getEditor("CppStylePreprocessor"))
65 else:
66 self.cppStylePreprocessorCheckBox.setEnabled(False)
62 67
63 # CSS 68 # CSS
64 self.foldCssCommentCheckBox.setChecked( 69 self.foldCssCommentCheckBox.setChecked(
65 Preferences.getEditor("CssFoldComment")) 70 Preferences.getEditor("CssFoldComment"))
66 71
81 Preferences.getEditor("HtmlCaseSensitiveTags")) 86 Preferences.getEditor("HtmlCaseSensitiveTags"))
82 self.foldHtmlScriptCommentsCheckBox.setChecked( 87 self.foldHtmlScriptCommentsCheckBox.setChecked(
83 Preferences.getEditor("HtmlFoldScriptComments")) 88 Preferences.getEditor("HtmlFoldScriptComments"))
84 self.foldHtmlScriptHereDocsCheckBox.setChecked( 89 self.foldHtmlScriptHereDocsCheckBox.setChecked(
85 Preferences.getEditor("HtmlFoldScriptHeredocs")) 90 Preferences.getEditor("HtmlFoldScriptHeredocs"))
91 if QSCINTILLA_VERSION() >= 0x020500:
92 self.htmlDjangoCheckBox.setChecked(
93 Preferences.getEditor("HtmlDjangoTemplates"))
94 self.htmlMakoCheckBox.setChecked(
95 Preferences.getEditor("HtmlMakoTemplates"))
96 else:
97 self.htmlDjangoCheckBox.setEnabled(False)
98 self.htmlMakoCheckBox.setEnabled(False)
86 99
87 # Pascal 100 # Pascal
88 if "Pascal" in self.languages: 101 if "Pascal" in self.languages:
89 self.pascalGroup.setEnabled(True) 102 self.pascalGroup.setEnabled(True)
90 self.foldPascalCommentCheckBox.setChecked( 103 self.foldPascalCommentCheckBox.setChecked(
122 # Povray 135 # Povray
123 self.foldPovrayCommentCheckBox.setChecked( 136 self.foldPovrayCommentCheckBox.setChecked(
124 Preferences.getEditor("PovFoldComment")) 137 Preferences.getEditor("PovFoldComment"))
125 self.foldPovrayDirectivesCheckBox.setChecked( 138 self.foldPovrayDirectivesCheckBox.setChecked(
126 Preferences.getEditor("PovFoldDirectives")) 139 Preferences.getEditor("PovFoldDirectives"))
140
141 # Properties
142 if QSCINTILLA_VERSION() >= 0x020500:
143 self.propertiesInitialSpacesCheckBox.setChecked(
144 Preferences.getEditor("PropertiesInitialSpaces"))
145 else:
146 self.propertiesInitialSpacesCheckBox.setEnabled(False)
127 147
128 # Python 148 # Python
129 self.foldPythonCommentCheckBox.setChecked( 149 self.foldPythonCommentCheckBox.setChecked(
130 Preferences.getEditor("PythonFoldComment")) 150 Preferences.getEditor("PythonFoldComment"))
131 self.foldPythonStringCheckBox.setChecked( 151 self.foldPythonStringCheckBox.setChecked(
138 Preferences.getEditor("PythonAllowV2Unicode")) 158 Preferences.getEditor("PythonAllowV2Unicode"))
139 self.pythonV3BinaryAllowedCheckBox.setChecked( 159 self.pythonV3BinaryAllowedCheckBox.setChecked(
140 Preferences.getEditor("PythonAllowV3Binary")) 160 Preferences.getEditor("PythonAllowV3Binary"))
141 self.pythonV3BytesAllowedCheckBox.setChecked( 161 self.pythonV3BytesAllowedCheckBox.setChecked(
142 Preferences.getEditor("PythonAllowV3Bytes")) 162 Preferences.getEditor("PythonAllowV3Bytes"))
163 if QSCINTILLA_VERSION() >= 0x020500:
164 self.foldPythonQuotesCheckBox.setChecked(
165 Preferences.getEditor("PythonFoldQuotes"))
166 self.pythonStringsOverNewlineCheckBox.setChecked(
167 Preferences.getEditor("PythonStringsOverNewLineAllowed"))
168 else:
169 self.foldPythonQuotesCheckBox.setEnabled(False)
170 self.pythonStringsOverNewlineCheckBox.setEnabled(False)
171
172 # Ruby
173 if QSCINTILLA_VERSION() >= 0x020500:
174 self.foldRubyCommentCheckBox.setChecked(
175 Preferences.getEditor("RubyFoldComment"))
176 else:
177 self.foldRubyCommentCheckBox.setEnabled(False)
143 178
144 # SQL 179 # SQL
145 self.foldSqlCommentCheckBox.setChecked( 180 self.foldSqlCommentCheckBox.setChecked(
146 Preferences.getEditor("SqlFoldComment")) 181 Preferences.getEditor("SqlFoldComment"))
147 self.sqlBackslashEscapesCheckBox.setChecked( 182 self.sqlBackslashEscapesCheckBox.setChecked(
148 Preferences.getEditor("SqlBackslashEscapes")) 183 Preferences.getEditor("SqlBackslashEscapes"))
184 if QSCINTILLA_VERSION() >= 0x020500:
185 self.sqlFoldAtElseCheckBox.setChecked(
186 Preferences.getEditor("SqlFoldAtElse"))
187 self.sqlFoldOnlyBeginCheckBox.setChecked(
188 Preferences.getEditor("SqlFoldOnlyBegin"))
189 self.sqlDottedWordsCheckBox.setChecked(
190 Preferences.getEditor("SqlDottedWords"))
191 self.sqlHashCommentsCheckBox.setChecked(
192 Preferences.getEditor("SqlHashComments"))
193 self.sqlQuotedIdentifiersCheckBox.setChecked(
194 Preferences.getEditor("SqlQuotedIdentifiers"))
195 else:
196 self.sqlFoldAtElseCheckBox.setEnabled(False)
197 self.sqlFoldOnlyBeginCheckBox.setEnabled(False)
198 self.sqlDottedWordsCheckBox.setEnabled(False)
199 self.sqlHashCommentsCheckBox.setEnabled(False)
200 self.sqlQuotedIdentifiersCheckBox.setEnabled(False)
201
202 # TCL
203 if QSCINTILLA_VERSION() >= 0x020500:
204 self.foldTclCommentCheckBox.setChecked(
205 Preferences.getEditor("TclFoldComment"))
206 else:
207 self.foldTclCommentCheckBox.setEnabled(False)
208
209 # TeX
210 if QSCINTILLA_VERSION() >= 0x020500:
211 self.foldTexCommentCheckBox.setChecked(
212 Preferences.getEditor("TexFoldComment"))
213 self.texProcessCommentsCheckBox.setChecked(
214 Preferences.getEditor("TexProcessComments"))
215 self.texProcessIfCheckBox.setChecked(
216 Preferences.getEditor("TexProcessIf"))
217 else:
218 self.foldTexCommentCheckBox.setEnabled(False)
219 self.texProcessCommentsCheckBox.setEnabled(False)
220 self.texProcessIfCheckBox.setEnabled(False)
149 221
150 # VHDL 222 # VHDL
151 self.vhdlFoldCommentCheckBox.setChecked( 223 self.vhdlFoldCommentCheckBox.setChecked(
152 Preferences.getEditor("VHDLFoldComment")) 224 Preferences.getEditor("VHDLFoldComment"))
153 self.vhdlFoldAtElseCheckBox.setChecked( 225 self.vhdlFoldAtElseCheckBox.setChecked(
198 self.cppIndentClosingBraceCheckBox.isChecked()) 270 self.cppIndentClosingBraceCheckBox.isChecked())
199 Preferences.setEditor("CppCaseInsensitiveKeywords", 271 Preferences.setEditor("CppCaseInsensitiveKeywords",
200 self.cppCaseInsensitiveCheckBox.isChecked()) 272 self.cppCaseInsensitiveCheckBox.isChecked())
201 Preferences.setEditor("CppDollarsAllowed", 273 Preferences.setEditor("CppDollarsAllowed",
202 self.cppDollarAllowedCheckBox.isChecked()) 274 self.cppDollarAllowedCheckBox.isChecked())
275 if QSCINTILLA_VERSION() >= 0x020500:
276 Preferences.setEditor("CppStylePreprocessor",
277 self.cppStylePreprocessorCheckBox.isChecked())
203 278
204 # CSS 279 # CSS
205 Preferences.setEditor("CssFoldComment", 280 Preferences.setEditor("CssFoldComment",
206 self.foldCssCommentCheckBox.isChecked()) 281 self.foldCssCommentCheckBox.isChecked())
207 282
222 self.htmlCaseSensitiveTagsCheckBox.isChecked()) 297 self.htmlCaseSensitiveTagsCheckBox.isChecked())
223 Preferences.setEditor("HtmlFoldScriptComments", 298 Preferences.setEditor("HtmlFoldScriptComments",
224 self.foldHtmlScriptCommentsCheckBox.isChecked()) 299 self.foldHtmlScriptCommentsCheckBox.isChecked())
225 Preferences.setEditor("HtmlFoldScriptHeredocs", 300 Preferences.setEditor("HtmlFoldScriptHeredocs",
226 self.foldHtmlScriptHereDocsCheckBox.isChecked()) 301 self.foldHtmlScriptHereDocsCheckBox.isChecked())
302 if QSCINTILLA_VERSION() >= 0x020500:
303 Preferences.setEditor("HtmlDjangoTemplates",
304 self.htmlDjangoCheckBox.isChecked())
305 Preferences.setEditor("HtmlMakoTemplates",
306 self.htmlMakoCheckBox.isChecked())
227 307
228 # Pascal 308 # Pascal
229 if "Pascal" in self.languages: 309 if "Pascal" in self.languages:
230 Preferences.setEditor("PascalFoldComment", 310 Preferences.setEditor("PascalFoldComment",
231 self.foldPascalCommentCheckBox.isChecked()) 311 self.foldPascalCommentCheckBox.isChecked())
254 # Povray 334 # Povray
255 Preferences.setEditor("PovFoldComment", 335 Preferences.setEditor("PovFoldComment",
256 self.foldPovrayCommentCheckBox.isChecked()) 336 self.foldPovrayCommentCheckBox.isChecked())
257 Preferences.setEditor("PovFoldDirectives", 337 Preferences.setEditor("PovFoldDirectives",
258 self.foldPovrayDirectivesCheckBox.isChecked()) 338 self.foldPovrayDirectivesCheckBox.isChecked())
339
340 # Properties
341 if QSCINTILLA_VERSION() >= 0x020500:
342 Preferences.setEditor("PropertiesInitialSpaces",
343 self.propertiesInitialSpacesCheckBox.isChecked())
259 344
260 # Python 345 # Python
261 Preferences.setEditor("PythonFoldComment", 346 Preferences.setEditor("PythonFoldComment",
262 self.foldPythonCommentCheckBox.isChecked()) 347 self.foldPythonCommentCheckBox.isChecked())
263 Preferences.setEditor("PythonFoldString", 348 Preferences.setEditor("PythonFoldString",
270 self.pythonV2UnicodeAllowedCheckBox.isChecked()) 355 self.pythonV2UnicodeAllowedCheckBox.isChecked())
271 Preferences.setEditor("PythonAllowV3Binary", 356 Preferences.setEditor("PythonAllowV3Binary",
272 self.pythonV3BinaryAllowedCheckBox.isChecked()) 357 self.pythonV3BinaryAllowedCheckBox.isChecked())
273 Preferences.setEditor("PythonAllowV3Bytes", 358 Preferences.setEditor("PythonAllowV3Bytes",
274 self.pythonV3BytesAllowedCheckBox.isChecked()) 359 self.pythonV3BytesAllowedCheckBox.isChecked())
360 if QSCINTILLA_VERSION() >= 0x020500:
361 Preferences.setEditor("PythonFoldQuotes",
362 self.foldPythonQuotesCheckBox.isChecked())
363 Preferences.setEditor("PythonStringsOverNewLineAllowed",
364 self.pythonStringsOverNewlineCheckBox.isChecked())
365
366 # Ruby
367 if QSCINTILLA_VERSION() >= 0x020500:
368 Preferences.setEditor("RubyFoldComment",
369 self.foldRubyCommentCheckBox.isChecked())
275 370
276 # SQL 371 # SQL
277 Preferences.setEditor("SqlFoldComment", 372 Preferences.setEditor("SqlFoldComment",
278 self.foldSqlCommentCheckBox.isChecked()) 373 self.foldSqlCommentCheckBox.isChecked())
279 Preferences.setEditor("SqlBackslashEscapes", 374 Preferences.setEditor("SqlBackslashEscapes",
280 self.sqlBackslashEscapesCheckBox.isChecked()) 375 self.sqlBackslashEscapesCheckBox.isChecked())
376 if QSCINTILLA_VERSION() >= 0x020500:
377 Preferences.setEditor("SqlFoldAtElse",
378 self.sqlFoldAtElseCheckBox.isChecked())
379 Preferences.setEditor("SqlFoldOnlyBegin",
380 self.sqlFoldOnlyBeginCheckBox.isChecked())
381 Preferences.setEditor("SqlDottedWords",
382 self.sqlDottedWordsCheckBox.isChecked())
383 Preferences.setEditor("SqlHashComments",
384 self.sqlHashCommentsCheckBox.isChecked())
385 Preferences.setEditor("SqlQuotedIdentifiers",
386 self.sqlQuotedIdentifiersCheckBox.isChecked())
387
388 # TCL
389 if QSCINTILLA_VERSION() >= 0x020500:
390 Preferences.setEditor("TclFoldComment",
391 self.foldTclCommentCheckBox.isChecked())
392
393 # TeX
394 if QSCINTILLA_VERSION() >= 0x020500:
395 Preferences.setEditor("TexFoldComment",
396 self.foldTexCommentCheckBox.isChecked())
397 Preferences.setEditor("TexProcessComments",
398 self.texProcessCommentsCheckBox.isChecked())
399 Preferences.setEditor("TexProcessIf",
400 self.texProcessIfCheckBox.isChecked())
281 401
282 # VHDL 402 # VHDL
283 Preferences.setEditor("VHDLFoldComment", 403 Preferences.setEditor("VHDLFoldComment",
284 self.vhdlFoldCommentCheckBox.isChecked()) 404 self.vhdlFoldCommentCheckBox.isChecked())
285 Preferences.setEditor("VHDLFoldAtElse", 405 Preferences.setEditor("VHDLFoldAtElse",

eric ide

mercurial