275 def save(self): |
275 def save(self): |
276 """ |
276 """ |
277 Public slot to save the Editor Properties (1) configuration. |
277 Public slot to save the Editor Properties (1) configuration. |
278 """ |
278 """ |
279 # All |
279 # All |
280 Preferences.setEditor("AllFoldCompact", |
280 Preferences.setEditor( |
|
281 "AllFoldCompact", |
281 self.allFoldCompactCheckBox.isChecked()) |
282 self.allFoldCompactCheckBox.isChecked()) |
282 |
283 |
283 # Bash |
284 # Bash |
284 Preferences.setEditor("BashFoldComment", |
285 Preferences.setEditor( |
|
286 "BashFoldComment", |
285 self.foldBashCommentCheckBox.isChecked()) |
287 self.foldBashCommentCheckBox.isChecked()) |
286 |
288 |
287 # CMake |
289 # CMake |
288 Preferences.setEditor("CMakeFoldAtElse", |
290 Preferences.setEditor( |
|
291 "CMakeFoldAtElse", |
289 self.cmakeFoldAtElseCheckBox.isChecked()) |
292 self.cmakeFoldAtElseCheckBox.isChecked()) |
290 |
293 |
291 # C++ |
294 # C++ |
292 Preferences.setEditor("CppFoldComment", |
295 Preferences.setEditor( |
|
296 "CppFoldComment", |
293 self.foldCppCommentCheckBox.isChecked()) |
297 self.foldCppCommentCheckBox.isChecked()) |
294 Preferences.setEditor("CppFoldPreprocessor", |
298 Preferences.setEditor( |
|
299 "CppFoldPreprocessor", |
295 self.foldCppPreprocessorCheckBox.isChecked()) |
300 self.foldCppPreprocessorCheckBox.isChecked()) |
296 Preferences.setEditor("CppFoldAtElse", |
301 Preferences.setEditor( |
|
302 "CppFoldAtElse", |
297 self.foldCppAtElseCheckBox.isChecked()) |
303 self.foldCppAtElseCheckBox.isChecked()) |
298 Preferences.setEditor("CppIndentOpeningBrace", |
304 Preferences.setEditor( |
|
305 "CppIndentOpeningBrace", |
299 self.cppIndentOpeningBraceCheckBox.isChecked()) |
306 self.cppIndentOpeningBraceCheckBox.isChecked()) |
300 Preferences.setEditor("CppIndentClosingBrace", |
307 Preferences.setEditor( |
|
308 "CppIndentClosingBrace", |
301 self.cppIndentClosingBraceCheckBox.isChecked()) |
309 self.cppIndentClosingBraceCheckBox.isChecked()) |
302 Preferences.setEditor("CppCaseInsensitiveKeywords", |
310 Preferences.setEditor( |
|
311 "CppCaseInsensitiveKeywords", |
303 self.cppCaseInsensitiveCheckBox.isChecked()) |
312 self.cppCaseInsensitiveCheckBox.isChecked()) |
304 Preferences.setEditor("CppDollarsAllowed", |
313 Preferences.setEditor( |
|
314 "CppDollarsAllowed", |
305 self.cppDollarAllowedCheckBox.isChecked()) |
315 self.cppDollarAllowedCheckBox.isChecked()) |
306 if QSCINTILLA_VERSION() >= 0x020500: |
316 if QSCINTILLA_VERSION() >= 0x020500: |
307 Preferences.setEditor("CppStylePreprocessor", |
317 Preferences.setEditor( |
|
318 "CppStylePreprocessor", |
308 self.cppStylePreprocessorCheckBox.isChecked()) |
319 self.cppStylePreprocessorCheckBox.isChecked()) |
309 if QSCINTILLA_VERSION() >= 0x020600: |
320 if QSCINTILLA_VERSION() >= 0x020600: |
310 Preferences.setEditor("CppHighlightTripleQuotedStrings", |
321 Preferences.setEditor( |
|
322 "CppHighlightTripleQuotedStrings", |
311 self.cppHighlightTripleQuotedCheckBox.isChecked()) |
323 self.cppHighlightTripleQuotedCheckBox.isChecked()) |
312 if QSCINTILLA_VERSION() >= 0x020700: |
324 if QSCINTILLA_VERSION() >= 0x020700: |
313 Preferences.setEditor("CppHighlightHashQuotedStrings", |
325 Preferences.setEditor( |
|
326 "CppHighlightHashQuotedStrings", |
314 self.cppHighlightHashQuotedCheckBox.isChecked()) |
327 self.cppHighlightHashQuotedCheckBox.isChecked()) |
315 |
328 |
316 # CSS |
329 # CSS |
317 Preferences.setEditor("CssFoldComment", |
330 Preferences.setEditor( |
|
331 "CssFoldComment", |
318 self.foldCssCommentCheckBox.isChecked()) |
332 self.foldCssCommentCheckBox.isChecked()) |
319 if QSCINTILLA_VERSION() >= 0x020700: |
333 if QSCINTILLA_VERSION() >= 0x020700: |
320 Preferences.setEditor("CssHssSupport", |
334 Preferences.setEditor( |
|
335 "CssHssSupport", |
321 self.cssHssCheckBox.isChecked()) |
336 self.cssHssCheckBox.isChecked()) |
322 Preferences.setEditor("CssLessSupport", |
337 Preferences.setEditor( |
|
338 "CssLessSupport", |
323 self.cssLessCheckBox.isChecked()) |
339 self.cssLessCheckBox.isChecked()) |
324 Preferences.setEditor("CssSassySupport", |
340 Preferences.setEditor( |
|
341 "CssSassySupport", |
325 self.cssSassyCheckBox.isChecked()) |
342 self.cssSassyCheckBox.isChecked()) |
326 |
343 |
327 # D |
344 # D |
328 Preferences.setEditor("DFoldComment", |
345 Preferences.setEditor( |
|
346 "DFoldComment", |
329 self.foldDCommentCheckBox.isChecked()) |
347 self.foldDCommentCheckBox.isChecked()) |
330 Preferences.setEditor("DFoldAtElse", |
348 Preferences.setEditor( |
|
349 "DFoldAtElse", |
331 self.foldDAtElseCheckBox.isChecked()) |
350 self.foldDAtElseCheckBox.isChecked()) |
332 Preferences.setEditor("DIndentOpeningBrace", |
351 Preferences.setEditor( |
|
352 "DIndentOpeningBrace", |
333 self.dIndentOpeningBraceCheckBox.isChecked()) |
353 self.dIndentOpeningBraceCheckBox.isChecked()) |
334 Preferences.setEditor("DIndentClosingBrace", |
354 Preferences.setEditor( |
|
355 "DIndentClosingBrace", |
335 self.dIndentClosingBraceCheckBox.isChecked()) |
356 self.dIndentClosingBraceCheckBox.isChecked()) |
336 |
357 |
337 # HTML |
358 # HTML |
338 Preferences.setEditor("HtmlFoldPreprocessor", |
359 Preferences.setEditor( |
|
360 "HtmlFoldPreprocessor", |
339 self.foldHtmlPreprocessorCheckBox.isChecked()) |
361 self.foldHtmlPreprocessorCheckBox.isChecked()) |
340 Preferences.setEditor("HtmlCaseSensitiveTags", |
362 Preferences.setEditor( |
|
363 "HtmlCaseSensitiveTags", |
341 self.htmlCaseSensitiveTagsCheckBox.isChecked()) |
364 self.htmlCaseSensitiveTagsCheckBox.isChecked()) |
342 Preferences.setEditor("HtmlFoldScriptComments", |
365 Preferences.setEditor( |
|
366 "HtmlFoldScriptComments", |
343 self.foldHtmlScriptCommentsCheckBox.isChecked()) |
367 self.foldHtmlScriptCommentsCheckBox.isChecked()) |
344 Preferences.setEditor("HtmlFoldScriptHeredocs", |
368 Preferences.setEditor( |
|
369 "HtmlFoldScriptHeredocs", |
345 self.foldHtmlScriptHereDocsCheckBox.isChecked()) |
370 self.foldHtmlScriptHereDocsCheckBox.isChecked()) |
346 if QSCINTILLA_VERSION() >= 0x020500: |
371 if QSCINTILLA_VERSION() >= 0x020500: |
347 Preferences.setEditor("HtmlDjangoTemplates", |
372 Preferences.setEditor( |
|
373 "HtmlDjangoTemplates", |
348 self.htmlDjangoCheckBox.isChecked()) |
374 self.htmlDjangoCheckBox.isChecked()) |
349 Preferences.setEditor("HtmlMakoTemplates", |
375 Preferences.setEditor( |
|
376 "HtmlMakoTemplates", |
350 self.htmlMakoCheckBox.isChecked()) |
377 self.htmlMakoCheckBox.isChecked()) |
351 |
378 |
352 # Pascal |
379 # Pascal |
353 if "Pascal" in self.languages: |
380 if "Pascal" in self.languages: |
354 Preferences.setEditor("PascalFoldComment", |
381 Preferences.setEditor( |
|
382 "PascalFoldComment", |
355 self.foldPascalCommentCheckBox.isChecked()) |
383 self.foldPascalCommentCheckBox.isChecked()) |
356 Preferences.setEditor("PascalFoldPreprocessor", |
384 Preferences.setEditor( |
|
385 "PascalFoldPreprocessor", |
357 self.foldPascalPreprocessorCheckBox.isChecked()) |
386 self.foldPascalPreprocessorCheckBox.isChecked()) |
358 Preferences.setEditor("PascalSmartHighlighting", |
387 Preferences.setEditor( |
|
388 "PascalSmartHighlighting", |
359 self.pascalSmartHighlightingCheckBox.isChecked()) |
389 self.pascalSmartHighlightingCheckBox.isChecked()) |
360 |
390 |
361 # Perl |
391 # Perl |
362 Preferences.setEditor("PerlFoldComment", |
392 Preferences.setEditor( |
|
393 "PerlFoldComment", |
363 self.foldPerlCommentCheckBox.isChecked()) |
394 self.foldPerlCommentCheckBox.isChecked()) |
364 Preferences.setEditor("PerlFoldPackages", |
395 Preferences.setEditor( |
|
396 "PerlFoldPackages", |
365 self.foldPerlPackagesCheckBox.isChecked()) |
397 self.foldPerlPackagesCheckBox.isChecked()) |
366 Preferences.setEditor("PerlFoldPODBlocks", |
398 Preferences.setEditor( |
|
399 "PerlFoldPODBlocks", |
367 self.foldPerlPODBlocksCheckBox.isChecked()) |
400 self.foldPerlPODBlocksCheckBox.isChecked()) |
368 if QSCINTILLA_VERSION() >= 0x020600: |
401 if QSCINTILLA_VERSION() >= 0x020600: |
369 Preferences.setEditor("PerlFoldAtElse", |
402 Preferences.setEditor( |
|
403 "PerlFoldAtElse", |
370 self.foldPerlAtElseCheckBox.isChecked()) |
404 self.foldPerlAtElseCheckBox.isChecked()) |
371 |
405 |
372 # PostScript |
406 # PostScript |
373 if "PostScript" in self.languages: |
407 if "PostScript" in self.languages: |
374 Preferences.setEditor("PostScriptFoldAtElse", |
408 Preferences.setEditor( |
|
409 "PostScriptFoldAtElse", |
375 self.psFoldAtElseCheckBox.isChecked()) |
410 self.psFoldAtElseCheckBox.isChecked()) |
376 Preferences.setEditor("PostScriptTokenize", |
411 Preferences.setEditor( |
|
412 "PostScriptTokenize", |
377 self.psMarkTokensCheckBox.isChecked()) |
413 self.psMarkTokensCheckBox.isChecked()) |
378 Preferences.setEditor("PostScriptLevel", |
414 Preferences.setEditor( |
|
415 "PostScriptLevel", |
379 self.psLevelSpinBox.value()) |
416 self.psLevelSpinBox.value()) |
380 |
417 |
381 # Povray |
418 # Povray |
382 Preferences.setEditor("PovFoldComment", |
419 Preferences.setEditor( |
|
420 "PovFoldComment", |
383 self.foldPovrayCommentCheckBox.isChecked()) |
421 self.foldPovrayCommentCheckBox.isChecked()) |
384 Preferences.setEditor("PovFoldDirectives", |
422 Preferences.setEditor( |
|
423 "PovFoldDirectives", |
385 self.foldPovrayDirectivesCheckBox.isChecked()) |
424 self.foldPovrayDirectivesCheckBox.isChecked()) |
386 |
425 |
387 # Properties |
426 # Properties |
388 if QSCINTILLA_VERSION() >= 0x020500: |
427 if QSCINTILLA_VERSION() >= 0x020500: |
389 Preferences.setEditor("PropertiesInitialSpaces", |
428 Preferences.setEditor( |
|
429 "PropertiesInitialSpaces", |
390 self.propertiesInitialSpacesCheckBox.isChecked()) |
430 self.propertiesInitialSpacesCheckBox.isChecked()) |
391 |
431 |
392 # Python |
432 # Python |
393 Preferences.setEditor("PythonFoldComment", |
433 Preferences.setEditor( |
|
434 "PythonFoldComment", |
394 self.foldPythonCommentCheckBox.isChecked()) |
435 self.foldPythonCommentCheckBox.isChecked()) |
395 Preferences.setEditor("PythonFoldString", |
436 Preferences.setEditor( |
|
437 "PythonFoldString", |
396 self.foldPythonStringCheckBox.isChecked()) |
438 self.foldPythonStringCheckBox.isChecked()) |
397 Preferences.setEditor("PythonBadIndentation", |
439 Preferences.setEditor( |
|
440 "PythonBadIndentation", |
398 self.pythonBadIndentationCheckBox.isChecked()) |
441 self.pythonBadIndentationCheckBox.isChecked()) |
399 Preferences.setEditor("PythonAutoIndent", |
442 Preferences.setEditor( |
|
443 "PythonAutoIndent", |
400 self.pythonAutoindentCheckBox.isChecked()) |
444 self.pythonAutoindentCheckBox.isChecked()) |
401 Preferences.setEditor("PythonAllowV2Unicode", |
445 Preferences.setEditor( |
|
446 "PythonAllowV2Unicode", |
402 self.pythonV2UnicodeAllowedCheckBox.isChecked()) |
447 self.pythonV2UnicodeAllowedCheckBox.isChecked()) |
403 Preferences.setEditor("PythonAllowV3Binary", |
448 Preferences.setEditor( |
|
449 "PythonAllowV3Binary", |
404 self.pythonV3BinaryAllowedCheckBox.isChecked()) |
450 self.pythonV3BinaryAllowedCheckBox.isChecked()) |
405 Preferences.setEditor("PythonAllowV3Bytes", |
451 Preferences.setEditor( |
|
452 "PythonAllowV3Bytes", |
406 self.pythonV3BytesAllowedCheckBox.isChecked()) |
453 self.pythonV3BytesAllowedCheckBox.isChecked()) |
407 if QSCINTILLA_VERSION() >= 0x020500: |
454 if QSCINTILLA_VERSION() >= 0x020500: |
408 Preferences.setEditor("PythonFoldQuotes", |
455 Preferences.setEditor( |
|
456 "PythonFoldQuotes", |
409 self.foldPythonQuotesCheckBox.isChecked()) |
457 self.foldPythonQuotesCheckBox.isChecked()) |
410 Preferences.setEditor("PythonStringsOverNewLineAllowed", |
458 Preferences.setEditor( |
|
459 "PythonStringsOverNewLineAllowed", |
411 self.pythonStringsOverNewlineCheckBox.isChecked()) |
460 self.pythonStringsOverNewlineCheckBox.isChecked()) |
412 if QSCINTILLA_VERSION() >= 0x020600: |
461 if QSCINTILLA_VERSION() >= 0x020600: |
413 Preferences.setEditor("PythonHighlightSubidentifier", |
462 Preferences.setEditor( |
|
463 "PythonHighlightSubidentifier", |
414 self.pythonHighlightSubidentifierCheckBox.isChecked()) |
464 self.pythonHighlightSubidentifierCheckBox.isChecked()) |
415 |
465 |
416 # Ruby |
466 # Ruby |
417 if QSCINTILLA_VERSION() >= 0x020500: |
467 if QSCINTILLA_VERSION() >= 0x020500: |
418 Preferences.setEditor("RubyFoldComment", |
468 Preferences.setEditor( |
|
469 "RubyFoldComment", |
419 self.foldRubyCommentCheckBox.isChecked()) |
470 self.foldRubyCommentCheckBox.isChecked()) |
420 |
471 |
421 # SQL |
472 # SQL |
422 Preferences.setEditor("SqlFoldComment", |
473 Preferences.setEditor( |
|
474 "SqlFoldComment", |
423 self.foldSqlCommentCheckBox.isChecked()) |
475 self.foldSqlCommentCheckBox.isChecked()) |
424 Preferences.setEditor("SqlBackslashEscapes", |
476 Preferences.setEditor( |
|
477 "SqlBackslashEscapes", |
425 self.sqlBackslashEscapesCheckBox.isChecked()) |
478 self.sqlBackslashEscapesCheckBox.isChecked()) |
426 if QSCINTILLA_VERSION() >= 0x020500: |
479 if QSCINTILLA_VERSION() >= 0x020500: |
427 Preferences.setEditor("SqlFoldAtElse", |
480 Preferences.setEditor( |
|
481 "SqlFoldAtElse", |
428 self.sqlFoldAtElseCheckBox.isChecked()) |
482 self.sqlFoldAtElseCheckBox.isChecked()) |
429 Preferences.setEditor("SqlFoldOnlyBegin", |
483 Preferences.setEditor( |
|
484 "SqlFoldOnlyBegin", |
430 self.sqlFoldOnlyBeginCheckBox.isChecked()) |
485 self.sqlFoldOnlyBeginCheckBox.isChecked()) |
431 Preferences.setEditor("SqlDottedWords", |
486 Preferences.setEditor( |
|
487 "SqlDottedWords", |
432 self.sqlDottedWordsCheckBox.isChecked()) |
488 self.sqlDottedWordsCheckBox.isChecked()) |
433 Preferences.setEditor("SqlHashComments", |
489 Preferences.setEditor( |
|
490 "SqlHashComments", |
434 self.sqlHashCommentsCheckBox.isChecked()) |
491 self.sqlHashCommentsCheckBox.isChecked()) |
435 Preferences.setEditor("SqlQuotedIdentifiers", |
492 Preferences.setEditor( |
|
493 "SqlQuotedIdentifiers", |
436 self.sqlQuotedIdentifiersCheckBox.isChecked()) |
494 self.sqlQuotedIdentifiersCheckBox.isChecked()) |
437 |
495 |
438 # TCL |
496 # TCL |
439 if QSCINTILLA_VERSION() >= 0x020500: |
497 if QSCINTILLA_VERSION() >= 0x020500: |
440 Preferences.setEditor("TclFoldComment", |
498 Preferences.setEditor( |
|
499 "TclFoldComment", |
441 self.foldTclCommentCheckBox.isChecked()) |
500 self.foldTclCommentCheckBox.isChecked()) |
442 |
501 |
443 # TeX |
502 # TeX |
444 if QSCINTILLA_VERSION() >= 0x020500: |
503 if QSCINTILLA_VERSION() >= 0x020500: |
445 Preferences.setEditor("TexFoldComment", |
504 Preferences.setEditor( |
|
505 "TexFoldComment", |
446 self.foldTexCommentCheckBox.isChecked()) |
506 self.foldTexCommentCheckBox.isChecked()) |
447 Preferences.setEditor("TexProcessComments", |
507 Preferences.setEditor( |
|
508 "TexProcessComments", |
448 self.texProcessCommentsCheckBox.isChecked()) |
509 self.texProcessCommentsCheckBox.isChecked()) |
449 Preferences.setEditor("TexProcessIf", |
510 Preferences.setEditor( |
|
511 "TexProcessIf", |
450 self.texProcessIfCheckBox.isChecked()) |
512 self.texProcessIfCheckBox.isChecked()) |
451 |
513 |
452 # VHDL |
514 # VHDL |
453 Preferences.setEditor("VHDLFoldComment", |
515 Preferences.setEditor( |
|
516 "VHDLFoldComment", |
454 self.vhdlFoldCommentCheckBox.isChecked()) |
517 self.vhdlFoldCommentCheckBox.isChecked()) |
455 Preferences.setEditor("VHDLFoldAtElse", |
518 Preferences.setEditor( |
|
519 "VHDLFoldAtElse", |
456 self.vhdlFoldAtElseCheckBox.isChecked()) |
520 self.vhdlFoldAtElseCheckBox.isChecked()) |
457 Preferences.setEditor("VHDLFoldAtBegin", |
521 Preferences.setEditor( |
|
522 "VHDLFoldAtBegin", |
458 self.vhdlFoldAtBeginCheckBox.isChecked()) |
523 self.vhdlFoldAtBeginCheckBox.isChecked()) |
459 Preferences.setEditor("VHDLFoldAtParenthesis", |
524 Preferences.setEditor( |
|
525 "VHDLFoldAtParenthesis", |
460 self.vhdlFoldAtParenthesisCheckBox.isChecked()) |
526 self.vhdlFoldAtParenthesisCheckBox.isChecked()) |
461 |
527 |
462 # XML |
528 # XML |
463 Preferences.setEditor("XMLStyleScripts", |
529 Preferences.setEditor( |
|
530 "XMLStyleScripts", |
464 self.xmlSyleScriptsCheckBox.isChecked()) |
531 self.xmlSyleScriptsCheckBox.isChecked()) |
465 |
532 |
466 # YAML |
533 # YAML |
467 if "YAML" in self.languages: |
534 if "YAML" in self.languages: |
468 Preferences.setEditor("YAMLFoldComment", |
535 Preferences.setEditor( |
|
536 "YAMLFoldComment", |
469 self.foldYamlCommentCheckBox.isChecked()) |
537 self.foldYamlCommentCheckBox.isChecked()) |
470 |
538 |
471 |
539 |
472 def create(dlg): |
540 def create(dlg): |
473 """ |
541 """ |