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