eric6/Preferences/ConfigurationPages/EditorFilePage.py

Sun, 11 Apr 2021 18:45:10 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 11 Apr 2021 18:45:10 +0200
changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8258
82b608e352ec
permissions
-rw-r--r--

Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
3 # Copyright (c) 2006 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
1353
e1c0af081a8e Added a syntax check while typing function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
7 Module implementing the Editor File Handling configuration page.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
7319
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
10 import sys
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2424
diff changeset
11
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3515
diff changeset
12 from PyQt5.QtCore import pyqtSlot
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3515
diff changeset
13 from PyQt5.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3515
diff changeset
14 from PyQt5.Qsci import QsciScintilla
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
16 from E5Gui import E5MessageBox
7319
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
17 from E5Gui.E5Application import e5App
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
18
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
19 from .ConfigurationPageBase import ConfigurationPageBase
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
20 from .Ui_EditorFilePage import Ui_EditorFilePage
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 from Utilities import supportedCodecs
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
25
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 class EditorFilePage(ConfigurationPageBase, Ui_EditorFilePage):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
1353
e1c0af081a8e Added a syntax check while typing function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
28 Class implementing the Editor File Handling configuration page.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
8218
7c09585bd960 Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8143
diff changeset
34 super().__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.setupUi(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.setObjectName("EditorFilePage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
38 self.__showsOpenFilters = True
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
39 self.openFileFilters = Preferences.getEditor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
40 "AdditionalOpenFilters")[:]
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
41 self.saveFileFilters = Preferences.getEditor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
42 "AdditionalSaveFilters")[:]
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
43 self.fileFiltersList.addItems(self.openFileFilters)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
44
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
45 self.__setDefaultFiltersLists()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 self.defaultEncodingComboBox.addItems(sorted(supportedCodecs))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
49 self.previewMarkdownHTMLFormatComboBox.addItems(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
50 ["XHTML1", "HTML4", "HTML5"])
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
51 self.previewRestDocutilsHTMLFormatComboBox.addItems(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
52 ["HTML4", "HTML5"])
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
53
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 # set initial values
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
55 self.autosaveSlider.setValue(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 Preferences.getEditor("AutosaveInterval"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
57 self.createBackupFileCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 Preferences.getEditor("CreateBackupFile"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
59 self.defaultEncodingComboBox.setCurrentIndex(
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
60 self.defaultEncodingComboBox.findText(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 Preferences.getEditor("DefaultEncoding")))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
62 self.advEncodingCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 Preferences.getEditor("AdvancedEncodingDetection"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
64 self.warnFilesizeSpinBox.setValue(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 Preferences.getEditor("WarnFilesize"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
66 self.clearBreakpointsCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 Preferences.getEditor("ClearBreaksOnClose"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
68 self.automaticReopenCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 Preferences.getEditor("AutoReopen"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
70 self.stripWhitespaceCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 Preferences.getEditor("StripTrailingWhitespace"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
72 self.openFilesFilterComboBox.setCurrentIndex(
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
73 self.openFilesFilterComboBox.findText(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 Preferences.getEditor("DefaultOpenFilter")))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
75 self.saveFilesFilterComboBox.setCurrentIndex(
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
76 self.saveFilesFilterComboBox.findText(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 Preferences.getEditor("DefaultSaveFilter")))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
78 self.automaticEolConversionCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 Preferences.getEditor("AutomaticEOLConversion"))
6105
cbd34d558bd9 Finished implementing support for EditorConfig for the IDE editor component and the standalone editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
80 self.insertFinalNewlineCheckBox.setChecked(
cbd34d558bd9 Finished implementing support for EditorConfig for the IDE editor component and the standalone editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
81 Preferences.getEditor("InsertFinalNewline"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 eolMode = Preferences.getEditor("EOLMode")
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
84 if eolMode == QsciScintilla.EolMode.EolWindows:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 self.crlfRadioButton.setChecked(True)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
86 elif eolMode == QsciScintilla.EolMode.EolMac:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 self.crRadioButton.setChecked(True)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
88 elif eolMode == QsciScintilla.EolMode.EolUnix:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.lfRadioButton.setChecked(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90
7318
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
91 self.previewRefreshTimeoutSpinBox.setValue(
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
92 Preferences.getEditor("PreviewRefreshWaitTimer"))
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
93
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
94 self.previewHtmlExtensionsEdit.setText(
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
95 " ".join(Preferences.getEditor("PreviewHtmlFileNameExtensions")))
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
96
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
97 self.previewMarkdownExtensionsEdit.setText(
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
98 " ".join(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
99 Preferences.getEditor("PreviewMarkdownFileNameExtensions")))
3979
307b09aae43b Added capability to use 'Sphinx' to preview ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
100 self.previewRestSphinxCheckBox.setChecked(
307b09aae43b Added capability to use 'Sphinx' to preview ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
101 Preferences.getEditor("PreviewRestUseSphinx"))
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
102 self.previewMarkdownNLtoBreakCheckBox.setChecked(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
103 Preferences.getEditor("PreviewMarkdownNLtoBR"))
7301
6df711503ec0 PreviewerHTML: enhanced the Markdown previewer by using the PyMdown extensions, if they are available and have been enabled.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
104 self.previewMarkdownPyMdownCheckBox.setChecked(
6df711503ec0 PreviewerHTML: enhanced the Markdown previewer by using the PyMdown extensions, if they are available and have been enabled.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
105 Preferences.getEditor("PreviewMarkdownUsePyMdownExtensions"))
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
106 self.previewMarkdownMathJaxCheckBox.setChecked(
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
107 Preferences.getEditor("PreviewMarkdownMathJax"))
7309
5a434813eef3 PreviewerHTML, ExporterHTML:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7304
diff changeset
108 self.previewMarkdownMermaidCheckBox.setChecked(
5a434813eef3 PreviewerHTML, ExporterHTML:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7304
diff changeset
109 Preferences.getEditor("PreviewMarkdownMermaid"))
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
110 index = self.previewMarkdownHTMLFormatComboBox.findText(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
111 Preferences.getEditor("PreviewMarkdownHTMLFormat"))
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
112 self.previewMarkdownHTMLFormatComboBox.setCurrentIndex(index)
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
113
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
114 self.previewRestExtensionsEdit.setText(
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
115 " ".join(Preferences.getEditor("PreviewRestFileNameExtensions")))
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
116 index = self.previewRestDocutilsHTMLFormatComboBox.findText(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
117 Preferences.getEditor("PreviewRestDocutilsHTMLFormat"))
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
118 self.previewRestDocutilsHTMLFormatComboBox.setCurrentIndex(index)
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
119
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
120 self.previewQssExtensionsEdit.setText(
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
121 " ".join(Preferences.getEditor("PreviewQssFileNameExtensions")))
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
122
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 def save(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 """
1353
e1c0af081a8e Added a syntax check while typing function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
125 Public slot to save the Editor File Handling configuration.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 """
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
127 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
128 "AutosaveInterval",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 self.autosaveSlider.value())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
130 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
131 "CreateBackupFile",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
132 self.createBackupFileCheckBox.isChecked())
6
52e8c820d0dd Removed some superfluous unicode() calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
133 enc = self.defaultEncodingComboBox.currentText()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 if not enc:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 enc = "utf-8"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 Preferences.setEditor("DefaultEncoding", enc)
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
137 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
138 "AdvancedEncodingDetection",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
139 self.advEncodingCheckBox.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
140 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
141 "WarnFilesize",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 self.warnFilesizeSpinBox.value())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
143 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
144 "ClearBreaksOnClose",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
145 self.clearBreakpointsCheckBox.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
146 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
147 "AutoReopen",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
148 self.automaticReopenCheckBox.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
149 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
150 "StripTrailingWhitespace",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
151 self.stripWhitespaceCheckBox.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
152 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
153 "DefaultOpenFilter",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 self.openFilesFilterComboBox.currentText())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
155 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
156 "DefaultSaveFilter",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 self.saveFilesFilterComboBox.currentText())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
158 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
159 "AutomaticEOLConversion",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
160 self.automaticEolConversionCheckBox.isChecked())
6105
cbd34d558bd9 Finished implementing support for EditorConfig for the IDE editor component and the standalone editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
161 Preferences.setEditor(
cbd34d558bd9 Finished implementing support for EditorConfig for the IDE editor component and the standalone editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
162 "InsertFinalNewline",
cbd34d558bd9 Finished implementing support for EditorConfig for the IDE editor component and the standalone editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
163 self.insertFinalNewlineCheckBox.isChecked())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 if self.crlfRadioButton.isChecked():
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
166 Preferences.setEditor("EOLMode", QsciScintilla.EolMode.EolWindows)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 elif self.crRadioButton.isChecked():
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
168 Preferences.setEditor("EOLMode", QsciScintilla.EolMode.EolMac)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 elif self.lfRadioButton.isChecked():
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
170 Preferences.setEditor("EOLMode", QsciScintilla.EolMode.EolUnix)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
171
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
172 self.__extractFileFilters()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
173 Preferences.setEditor("AdditionalOpenFilters", self.openFileFilters)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
174 Preferences.setEditor("AdditionalSaveFilters", self.saveFileFilters)
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
175
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
176 Preferences.setEditor(
7318
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
177 "PreviewRefreshWaitTimer",
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
178 self.previewRefreshTimeoutSpinBox.value())
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
179
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7309
diff changeset
180 Preferences.setEditor(
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
181 "PreviewHtmlFileNameExtensions",
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
182 [ext.strip() for ext in
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
183 self.previewHtmlExtensionsEdit.text().split()])
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
184
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
185 Preferences.setEditor(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
186 "PreviewMarkdownFileNameExtensions",
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
187 [ext.strip() for ext in
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
188 self.previewMarkdownExtensionsEdit.text().split()])
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
189 Preferences.setEditor(
3979
307b09aae43b Added capability to use 'Sphinx' to preview ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
190 "PreviewRestUseSphinx",
307b09aae43b Added capability to use 'Sphinx' to preview ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
191 self.previewRestSphinxCheckBox.isChecked())
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
192 Preferences.setEditor(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
193 "PreviewMarkdownNLtoBR",
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
194 self.previewMarkdownNLtoBreakCheckBox.isChecked())
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
195 Preferences.setEditor(
7301
6df711503ec0 PreviewerHTML: enhanced the Markdown previewer by using the PyMdown extensions, if they are available and have been enabled.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
196 "PreviewMarkdownUsePyMdownExtensions",
6df711503ec0 PreviewerHTML: enhanced the Markdown previewer by using the PyMdown extensions, if they are available and have been enabled.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
197 self.previewMarkdownPyMdownCheckBox.isChecked())
6df711503ec0 PreviewerHTML: enhanced the Markdown previewer by using the PyMdown extensions, if they are available and have been enabled.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
198 Preferences.setEditor(
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
199 "PreviewMarkdownMathJax",
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
200 self.previewMarkdownMathJaxCheckBox.isChecked())
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
201 Preferences.setEditor(
7309
5a434813eef3 PreviewerHTML, ExporterHTML:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7304
diff changeset
202 "PreviewMarkdownMermaid",
5a434813eef3 PreviewerHTML, ExporterHTML:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7304
diff changeset
203 self.previewMarkdownMermaidCheckBox.isChecked())
5a434813eef3 PreviewerHTML, ExporterHTML:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7304
diff changeset
204 Preferences.setEditor(
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
205 "PreviewMarkdownHTMLFormat",
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
206 self.previewMarkdownHTMLFormatComboBox.currentText())
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
207
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
208 Preferences.setEditor(
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
209 "PreviewRestFileNameExtensions",
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
210 [ext.strip() for ext in
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
211 self.previewRestExtensionsEdit.text().split()])
5837
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
212 Preferences.setEditor(
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
213 "PreviewRestDocutilsHTMLFormat",
9ef6a28f1694 - Exporter
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5599
diff changeset
214 self.previewRestDocutilsHTMLFormatComboBox.currentText())
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
215
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
216 Preferences.setEditor(
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
217 "PreviewQssFileNameExtensions",
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
218 [ext.strip() for ext in
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
219 self.previewQssExtensionsEdit.text().split()])
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
220
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
221 def __setDefaultFiltersLists(self, keepSelection=False):
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
222 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
223 Private slot to set the default file filter combo boxes.
746
d80c427636a4 Fixed an issue with the new file filter configuration code and corrected some source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 743
diff changeset
224
d80c427636a4 Fixed an issue with the new file filter configuration code and corrected some source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 743
diff changeset
225 @param keepSelection flag indicating to keep the current selection
d80c427636a4 Fixed an issue with the new file filter configuration code and corrected some source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 743
diff changeset
226 if possible (boolean)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
227 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
228 if keepSelection:
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
229 selectedOpenFilter = self.openFilesFilterComboBox.currentText()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
230 selectedSaveFilter = self.saveFilesFilterComboBox.currentText()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
231
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
232 import QScintilla.Lexers
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
233 openFileFiltersList = QScintilla.Lexers.getOpenFileFiltersList(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
234 False, withAdditional=False) + self.openFileFilters
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
235 openFileFiltersList.sort()
743
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
236 self.openFilesFilterComboBox.clear()
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
237 self.openFilesFilterComboBox.addItems(openFileFiltersList)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
238 saveFileFiltersList = QScintilla.Lexers.getSaveFileFiltersList(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
239 False, withAdditional=False) + self.saveFileFilters
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
240 saveFileFiltersList.sort()
743
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
241 self.saveFilesFilterComboBox.clear()
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
242 self.saveFilesFilterComboBox.addItems(saveFileFiltersList)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
243
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
244 if keepSelection:
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
245 self.openFilesFilterComboBox.setCurrentIndex(
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
246 self.openFilesFilterComboBox.findText(selectedOpenFilter))
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
247 self.saveFilesFilterComboBox.setCurrentIndex(
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
248 self.saveFilesFilterComboBox.findText(selectedSaveFilter))
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
249
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
250 def __extractFileFilters(self):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
251 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
252 Private method to extract the file filters.
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
253 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
254 filters = []
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
255 for row in range(self.fileFiltersList.count()):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
256 filters.append(self.fileFiltersList.item(row).text())
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
257 if self.__showsOpenFilters:
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
258 self.openFileFilters = filters
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
259 else:
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
260 self.saveFileFilters = filters
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
261
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
262 def __checkFileFilter(self, fileFilter):
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
263 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
264 Private method to check a file filter for validity.
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
265
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
266 @param fileFilter file filter pattern to check (string)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
267 @return flag indicating validity (boolean)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
268 """
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
269 if (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
270 not self.__showsOpenFilters and
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
271 fileFilter.count("*") != 1
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
272 ):
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
273 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
274 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
275 self.tr("Add File Filter"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
276 self.tr("""A Save File Filter must contain exactly one"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
277 """ wildcard pattern. Yours contains {0}.""")
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
278 .format(fileFilter.count("*")))
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
279 return False
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
280
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
281 if fileFilter.count("*") == 0:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
282 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
283 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
284 self.tr("Add File Filter"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
285 self.tr("""A File Filter must contain at least one"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
286 """ wildcard pattern."""))
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
287 return False
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
288
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
289 return True
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
290
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
291 @pyqtSlot()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
292 def on_addFileFilterButton_clicked(self):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
293 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
294 Private slot to add a file filter to the list.
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
295 """
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
296 fileFilter, ok = QInputDialog.getText(
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
297 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
298 self.tr("Add File Filter"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
299 self.tr("Enter the file filter entry:"),
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
300 QLineEdit.EchoMode.Normal)
8222
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
301 if ok and fileFilter and self.__checkFileFilter(fileFilter):
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
302 self.fileFiltersList.addItem(fileFilter)
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
303 self.__extractFileFilters()
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
304 self.__setDefaultFiltersLists(keepSelection=True)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
305
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
306 @pyqtSlot()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
307 def on_editFileFilterButton_clicked(self):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
308 """
743
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
309 Private slot called to edit a file filter entry.
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
310 """
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
311 fileFilter = self.fileFiltersList.currentItem().text()
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
312 fileFilter, ok = QInputDialog.getText(
743
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
313 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
314 self.tr("Add File Filter"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
315 self.tr("Enter the file filter entry:"),
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
316 QLineEdit.EchoMode.Normal,
5599
033967644b1f Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
317 fileFilter)
8222
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
318 if ok and fileFilter and self.__checkFileFilter(fileFilter):
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
319 self.fileFiltersList.currentItem().setText(fileFilter)
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
320 self.__extractFileFilters()
5994b80b8760 Applied some more code simplifications suggested by the new Simplify checker (Y102: use single if) (batch 1).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8218
diff changeset
321 self.__setDefaultFiltersLists(keepSelection=True)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
322
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
323 @pyqtSlot()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
324 def on_deleteFileFilterButton_clicked(self):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
325 """
743
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
326 Private slot called to delete a file filter entry.
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
327 """
743
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
328 self.fileFiltersList.takeItem(self.fileFiltersList.currentRow())
c58faf72e308 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 742
diff changeset
329 self.__extractFileFilters()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
330 self.__setDefaultFiltersLists(keepSelection=True)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
331
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
332 @pyqtSlot(bool)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
333 def on_openFiltersButton_toggled(self, checked):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
334 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
335 Private slot to switch the list of file filters.
746
d80c427636a4 Fixed an issue with the new file filter configuration code and corrected some source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 743
diff changeset
336
d80c427636a4 Fixed an issue with the new file filter configuration code and corrected some source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 743
diff changeset
337 @param checked flag indicating the check state of the button (boolean)
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
338 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
339 self.__extractFileFilters()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
340 self.__showsOpenFilters = checked
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
341 self.fileFiltersList.clear()
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
342 if checked:
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
343 self.fileFiltersList.addItems(self.openFileFilters)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
344 else:
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
345 self.fileFiltersList.addItems(self.saveFileFilters)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
346
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
347 @pyqtSlot(QListWidgetItem, QListWidgetItem)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
348 def on_fileFiltersList_currentItemChanged(self, current, previous):
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
349 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
350 Private slot to set the state of the edit and delete buttons.
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
351
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
352 @param current new current item (QListWidgetItem)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
353 @param previous previous current item (QListWidgetItem)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
354 """
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
355 self.editFileFilterButton.setEnabled(current is not None)
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
356 self.deleteFileFilterButton.setEnabled(current is not None)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
357
7319
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
358 @pyqtSlot()
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
359 def on_previewMarkdownPyMdownInstallPushButton_clicked(self):
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
360 """
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
361 Private slot to install the pymdown extensions package via pip.
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
362 """
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
363 pip = e5App().getObject("Pip")
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
364 pip.installPackages(["pymdown-extensions"], interpreter=sys.executable)
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
365
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
366
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
367 def create(dlg):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
368 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
369 Module function to create the configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
370
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
371 @param dlg reference to the configuration dialog
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
372 @return reference to the instantiated page (ConfigurationPageBase)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
373 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
374 page = EditorFilePage()
742
30fc855257e9 Continued implementing user defined file filters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
375 return page

eric ide

mercurial