src/eric7/Preferences/__init__.py

Sat, 26 Nov 2022 15:54:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Nov 2022 15:54:32 +0100
branch
eric7
changeset 9536
c1c84299bef3
parent 9534
5ed8445f3b31
child 9537
66a2e32ecba9
permissions
-rw-r--r--

Qt Tools
- added a configuration option for the path of the 'qhelpgenerator' tool (it is installed differently by various Linux distributions)

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
8881
54e42bc2437a Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8875
diff changeset
3 # Copyright (c) 2002 - 2022 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 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Package implementing the preferences interface.
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 The preferences interface consists of a class, which defines the default
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 values for all configuration items and stores the actual values. These
8314
e3642a6a1e71 Finished renaming eric6 to eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
11 values are read and written to the eric7 preferences file by module
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
12 functions. The data is stored in a file in a subdirectory of the users home
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
13 directory. The individual configuration data is accessed by accessor functions
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
14 defined on the module level. The module is simply imported wherever it is
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
15 needed with the statement 'from eric7 import Preferences'. Do not use
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
16 'from eric7.Preferences import *' to import it.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7598
diff changeset
19 import ast
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
20 import fnmatch
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
21 import json
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 import os
9152
8a68afaf1ba2 Started replacing the use of "QFileInfo()" with Python equivalents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9038
diff changeset
23 import pathlib
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 import shutil
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
25
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
26 from PyQt6.Qsci import QsciLexerPython, QsciScintilla
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8314
diff changeset
27 from PyQt6.QtCore import (
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
28 QByteArray,
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
29 QCoreApplication,
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
30 QDateTime,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
31 QDir,
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
32 QLibraryInfo,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
33 QLocale,
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
34 QPoint,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
35 QSettings,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
36 QSize,
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
37 Qt,
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
38 QtMsgType,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
39 QUrl,
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
40 )
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8314
diff changeset
41 from PyQt6.QtGui import QColor, QFont, QPalette
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8314
diff changeset
42 from PyQt6.QtWidgets import QApplication
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
43
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
44 try:
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
45 from PyQt6.QtWebEngineCore import QWebEngineProfile, QWebEngineSettings
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
46 except ImportError:
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
47 QWebEngineSettings = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
49 from eric7 import Globals
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9470
diff changeset
50 from eric7.EricNetwork.EricFtp import EricFtpProxyType
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
51 from eric7.EricWidgets import EricFileDialog
9482
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
52 from eric7.EricWidgets.EricApplication import ericApp
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
53 from eric7.EricWidgets.EricIconBar import EricIconBar
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
54 from eric7.QScintilla.Shell import ShellHistoryStyle
9482
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
55 from eric7.Utilities.crypto import pwConvert
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
56 from eric7.Utilities.crypto.py3PBKDF2 import hashPassword
5798
e4f9552f7f93 Started improving the Shell window history handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5785
diff changeset
57
4917
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4913
diff changeset
58
8207
d359172d11be Applied some more code simplifications suggested by the new Simplify checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8205
diff changeset
59 class Prefs:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 A class to hold all configuration items for the application.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
63
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 # defaults for the variables window
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
65 varDefaults = {"LocalsFilter": "[]", "GlobalsFilter": "[]"}
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
66
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 # defaults for the debugger
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 debuggerDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
69 "RemoteDbgEnabled": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
70 "RemoteHost": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
71 "RemoteExecution": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
72 "PassiveDbgEnabled": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
73 "PassiveDbgPort": 42424,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
74 "PassiveDbgType": "Python",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
75 "AutomaticReset": False,
3081
d50cc9efc7c7 Changed the default for the 'Autosave' config to be 'True'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3076
diff changeset
76 "Autosave": True,
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
77 "ThreeStateBreakPoints": False,
6034
4f88f70d2cd4 Added the capability to remember the most recently used file names and conditions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5970
diff changeset
78 "RecentNumber": 9,
4f88f70d2cd4 Added the capability to remember the most recently used file names and conditions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5970
diff changeset
79 # max. number of file names to be remembered for the add breakpoint
4f88f70d2cd4 Added the capability to remember the most recently used file names and conditions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5970
diff changeset
80 # dialog
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
81 "BreakAlways": False,
8539
24daea9ad41b Editor: added code to move a breakpoint to a line actually creating some byte code (Python only).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8538
diff changeset
82 "IntelligentBreakpoints": True,
3974
01991e605ba0 Added capability to show exceptions in the shell window.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3929
diff changeset
83 "ShowExceptionInShell": True,
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
84 "Python3VirtualEnv": "",
3354
8d69c9dfb5e2 Fixed an issue in the Ruby debugger interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3341
diff changeset
85 "RubyInterpreter": "",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
86 "DebugClientType3": "standard",
5247
1fb624677956 Remove obsolete threaded option from preferences.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5239
diff changeset
87 # supported "standard", "custom"
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
88 "DebugClient3": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
89 "DebugEnvironmentReplace": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
90 "DebugEnvironment": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
91 "PythonRedirect": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
92 "PythonNoEncoding": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
93 "Python3Redirect": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
94 "Python3NoEncoding": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
95 "RubyRedirect": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
96 "ConsoleDbgEnabled": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
97 "ConsoleDbgCommand": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
98 "PathTranslation": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
99 "PathTranslationRemote": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
100 "PathTranslationLocal": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
101 "NetworkInterface": "127.0.0.1",
9522
f46abb15aab2 Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9514
diff changeset
102 "NetworkPortFixed": False,
f46abb15aab2 Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9514
diff changeset
103 "NetworkPortIncrement": False,
f46abb15aab2 Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9514
diff changeset
104 "NetworkPort": 35000,
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1953
diff changeset
105 "AutoViewSourceCode": False,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
106 "MaxVariableSize": 0, # Bytes, 0 = no limit
7012
cc3f83d1a605 Colors for highlighting are configurable through Debugger->General
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6977
diff changeset
107 "BgColorNew": QColor("#28FFEEAA"),
cc3f83d1a605 Colors for highlighting are configurable through Debugger->General
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6977
diff changeset
108 "BgColorChanged": QColor("#2870FF66"),
7192
a22eee00b052 Started removing runtime support for Python2 and PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7161
diff changeset
109 "AllowedHosts": ["127.0.0.1", "::1%0"],
3926
6492acd0a352 Fixed an issue in the debugger interfaces setting an initial translate function. and changed the Python default extensions '.py' and '.pyw' depending on used interpreter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3918
diff changeset
110 # space separated list of Python3 extensions
7422
9a008ab4811b Started implementing the patching of the os module.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
111 "Python3Extensions": ".py .pyw .py3 .pyw3",
9a008ab4811b Started implementing the patching of the os module.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
112 # Global Multiprocess Debugging Support
9a008ab4811b Started implementing the patching of the os module.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
113 "MultiProcessEnabled": True,
7192
a22eee00b052 Started removing runtime support for Python2 and PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7161
diff changeset
114 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
116 # defaults for the UI settings
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 uiDefaults = {
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
118 "KeyboardInputInterval": 0, # 0 = use system default
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119 "BackgroundServiceProcesses": 0, # 0 = max. CPUs minus one
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
120 "Language": "System",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
121 "Style": "System",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
122 "StyleSheet": "",
8864
4a0f7105dbd8 Added configuration capability for the path containing the style icon sub-directories.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8843
diff changeset
123 "StyleIconsPath": "",
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
124 "ViewManager": "tabview",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
125 "LayoutType": "Sidebars", # "Toolboxes" or "Sidebars"
8727
e2f8a0fbf738 Added an interface option that shows all integrated tools in the left sidebar. The right one is not used. This is recommended for screens less FHD.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8723
diff changeset
126 "CombinedLeftRightSidebar": False, # place all tools into the
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
127 # left sidebar
8583
aac629a05f8b Modernized the look of the side bars.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8582
diff changeset
128 "IconBarColor": QColor("#008800"),
8587
78971b458d25 Made the height/width of the icons bar configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8583
diff changeset
129 "IconBarSize": EricIconBar.DefaultBarSize,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
130 "BrowsersListFoldersFirst": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
131 "BrowsersHideNonPublic": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
132 "BrowsersListContentsByOccurrence": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
133 "BrowsersListHiddenFiles": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
134 "BrowsersFileFilters": "*.py[co];*.so;*.dll",
7757
1f9f35f9be6d File Browser, Project Source Browser, Editor Outline: added option to suppress the source code encoding line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7750
diff changeset
135 "BrowserShowCoding": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
136 "LogViewerAutoRaise": True,
4083
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4031
diff changeset
137 "LogViewerStdoutFilter": [],
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4031
diff changeset
138 "LogViewerStderrFilter": [],
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4031
diff changeset
139 "LogViewerStdxxxFilter": [],
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
140 "SingleApplicationMode": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
141 "CaptionShowsFilename": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
142 "CaptionFilenameLength": 100,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
143 "RecentNumber": 9,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
144 "TabViewManagerFilenameLength": 40,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
145 "TabViewManagerFilenameOnly": True,
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
146 "ShowFilePreview": True,
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
147 "ShowFilePreviewJS": True,
2537
0ff250733d45 Fixed a few PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2506
diff changeset
148 "ShowFilePreviewSSI": True,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
149 "ShowTemplateViewer": True, # left side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
150 "ShowFileBrowser": True, # left side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
151 "ShowSymbolsViewer": True, # left side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
152 "ShowFindFileWidget": True, # left side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
153 "ShowFindLocationWidget": True, # left side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
154 "ShowCodeDocumentationViewer": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
155 "ShowPyPIPackageManager": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
156 "ShowCondaPackageManager": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
157 "ShowCooperation": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
158 "ShowIrc": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
159 "ShowMicroPython": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
160 "ShowInternalHelpViewer": True, # right side
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
161 "ShowNumbersViewer": True, # bottom side
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
162 "ViewProfiles": {
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
163 "edit": [
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
164 # saved state main window with toolbox windows (0)
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
165 QByteArray(),
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
166 # visibility of the toolboxes/sidebars (1)
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
167 # left, bottom, right
3539
0c2dc1446ebf Fixed a few code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3515
diff changeset
168 [True, True, True],
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
169 # saved states of the splitters and sidebars of the
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
170 # sidebars layout (2)
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
171 # horizontal splitter, vertical splitter,
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
172 # left sidebar, bottom sidebar, right sidebar
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
173 [QByteArray(), QByteArray(), "", "", ""],
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
174 ],
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
175 "debug": [
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
176 # saved state main window with toolbox windows (0)
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
177 QByteArray(),
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
178 # visibility of the toolboxes/sidebars (1)
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
179 # left, bottom, right
3539
0c2dc1446ebf Fixed a few code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3515
diff changeset
180 [False, True, True],
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
181 # saved states of the splitters and sidebars of the
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
182 # sidebars layout (2)
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
183 # horizontal splitter, vertical splitter,
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
184 # left sidebar, bottom sidebar, right sidebar
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
185 [QByteArray(), QByteArray(), "", "", ""],
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
186 ],
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
187 },
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
188 "ToolbarManagerState": QByteArray(),
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
189 "PreviewSplitterState": QByteArray(),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
190 "ShowSplash": True,
3547
c2a187c63209 Added code to save the editor split direction.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3539
diff changeset
191 "SplitOrientationVertical": False,
6193
0313134e20b1 Preferences: added config option to disable the use of the global menu bar on Linux
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6151
diff changeset
192 "UseNativeMenuBar": True,
6987
3371a03ed0a7 Performed some interface cleanups.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6977
diff changeset
193 "PerformVersionCheck": 3,
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
194 # 0 = off
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
195 # 1 = at startup
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
196 # 2 = daily
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
197 # 3 = weekly
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
198 # 4 = monthly
8580
e91b276e0771 Re-introduced the Internet reachability checks.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8578
diff changeset
199 "DynamicOnlineCheck": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
200 "UseProxy": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
201 "UseSystemProxy": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
202 "UseHttpProxyForAll": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
203 "ProxyHost/Http": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
204 "ProxyHost/Https": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
205 "ProxyHost/Ftp": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
206 "ProxyPort/Http": 80,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
207 "ProxyPort/Https": 443,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
208 "ProxyPort/Ftp": 21,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
209 "ProxyUser/Http": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
210 "ProxyUser/Https": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
211 "ProxyUser/Ftp": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
212 "ProxyPassword/Http": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
213 "ProxyPassword/Https": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
214 "ProxyPassword/Ftp": "",
8354
12ebd3934fef Renamed 'E5Utilities' to 'EricUtilities' and 'E5Network' to 'EricNetwork'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8336
diff changeset
215 "ProxyType/Ftp": EricFtpProxyType.NO_PROXY,
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2005
diff changeset
216 "ProxyAccount/Ftp": "",
4349
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4348
diff changeset
217 "ProxyExceptions": "localhost,127.0.0.,::1",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
218 "PluginRepositoryUrl7": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
219 "https://eric-ide.python-projects.org/plugins7/repository.xml"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
220 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
221 "OpenOnStartup": 0, # 0 = nothing
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
222 # 1 = last file
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
223 # 2 = last project
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
224 # 3 = last multiproject
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
225 # 4 = last global session
5371
01c4c059142b Added an option to configure the crash session startup behavior, added the '--no-crash' option to suppress looking for a crash session and changed some command line options:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5349
diff changeset
226 "OpenCrashSessionOnStartup": True,
5379
0f14e170a803 Added the '--disable-crash' option to temporarily disable the crash session support through the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5375
diff changeset
227 "CrashSessionEnabled": True,
8994
3bebd76dc6ea Fine tuned the upgrader behavior and introduced a configurable delay to give eric sufficient time to exit before doing the upgrade.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8989
diff changeset
228 "UpgraderDelay": 5,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
229 "DownloadPath": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
230 "RequestDownloadFilename": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
231 "CheckErrorLog": True,
8319
ea11a3948f40 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
232 "MinimumMessageTypeSeverity": QtMsgType.QtCriticalMsg.value,
ea11a3948f40 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
233 # 0 = QtMsgType.QtDebugMsg
ea11a3948f40 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
234 # 1 = QtMsgType.QtWarningMsg
ea11a3948f40 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
235 # 2 = QtMsgType.QtCriticalMsg
ea11a3948f40 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
236 # 3 = QtMsgType.QtFatalMsg
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: 8109
diff changeset
237 "LogStdErrColour": QColor(Qt.GlobalColor.red),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
238 "NotificationTimeout": 5, # time in seconds the notification
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
239 # is shown
2190
abd65b78425e Added a notification system and updated the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2182
diff changeset
240 "NotificationPosition": QPoint(10, 10),
7959
44e15eda6506 Improved the Notification system by supporting colored notifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7955
diff changeset
241 "NotificationWarningForeground": "#606000",
44e15eda6506 Improved the Notification system by supporting colored notifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7955
diff changeset
242 "NotificationWarningBackground": "#ffffd0",
44e15eda6506 Improved the Notification system by supporting colored notifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7955
diff changeset
243 "NotificationCriticalForeground": "#600000",
44e15eda6506 Improved the Notification system by supporting colored notifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7955
diff changeset
244 "NotificationCriticalBackground": "#ffd0d0",
9534
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
245 "LoadUnknownMimeTypeFiles": False,
4097
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
246 "TextMimeTypes": [
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
247 "application/bookmarks.xbel",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
248 "application/x-xbel",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
249 "application/opensearchdescription+xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
250 "application/x-actionscript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
251 "application/x-actionscript3",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
252 "application/x-awk",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
253 "application/x-sh",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
254 "application/x-shellscript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
255 "application/x-shell-session",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
256 "application/x-dos-batch",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
257 "application/x-befunge",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
258 "application/x-brainfuck",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
259 "application/x-javascript+cheetah",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
260 "application/x-javascript+spitfire",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
261 "application/x-cheetah",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
262 "application/x-spitfire",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
263 "application/xml+cheetah",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
264 "application/xml+spitfire",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
265 "application/x-clojure",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
266 "application/x-coldfusion",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
267 "application/x-cython",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
268 "application/x-django-templating",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
269 "application/x-jinja",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
270 "application/xml-dtd",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
271 "application/x-ecl",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
272 "application/x-ruby-templating",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
273 "application/x-evoque",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
274 "application/xml+evoque",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
275 "application/x-fantom",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
276 "application/x-genshi",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
277 "application/x-kid",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
278 "application/x-genshi-text",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
279 "application/x-gettext",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
280 "application/x-troff",
9534
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
281 "application/x-troff-man",
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
282 "application/x-troff-me",
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
283 "application/x-troff-ms",
4097
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
284 "application/xhtml+xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
285 "application/x-php",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
286 "application/x-httpd-php",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
287 "application/x-httpd-php3",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
288 "application/x-httpd-php4",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
289 "application/x-httpd-php5",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
290 "application/x-hybris",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
291 "application/x-javascript+django",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
292 "application/x-javascript+jinja",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
293 "application/x-javascript+ruby",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
294 "application/x-javascript+genshi",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
295 "application/javascript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
296 "application/x-javascript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
297 "application/x-javascript+php",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
298 "application/x-javascript+smarty",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
299 "application/json",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
300 "application/x-jsp",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
301 "application/x-julia",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
302 "application/x-httpd-lasso",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
303 "application/x-httpd-lasso[89]",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
304 "application/x-httpd-lasso8",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
305 "application/x-httpd-lasso9",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
306 "application/x-javascript+lasso",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
307 "application/xml+lasso",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
308 "application/x-lua",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
309 "application/x-javascript+mako",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
310 "application/x-mako",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
311 "application/xml+mako",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
312 "application/x-gooddata-maql",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
313 "application/x-mason",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
314 "application/x-moonscript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
315 "application/x-javascript+myghty",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
316 "application/x-myghty",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
317 "application/xml+myghty",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
318 "application/x-newlisp",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
319 "application/x-openedge",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
320 "application/x-perl",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
321 "application/postscript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
322 "application/x-pypylog",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
323 "application/x-python3",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
324 "application/x-python",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
325 "application/x-qml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
326 "application/x-racket",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
327 "application/x-pygments-tokens",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
328 "application/x-ruby",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
329 "application/x-standardml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
330 "application/x-scheme",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
331 "application/x-sh-session",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
332 "application/x-smarty",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
333 "application/x-ssp",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
334 "application/x-tcl",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
335 "application/x-csh",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
336 "application/x-urbiscript",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
337 "application/xml+velocity",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
338 "application/xquery",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
339 "application/xml+django",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
340 "application/xml+jinja",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
341 "application/xml+ruby",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
342 "application/xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
343 "application/rss+xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
344 "application/atom+xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
345 "application/xml+php",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
346 "application/xml+smarty",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
347 "application/xsl+xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
348 "application/xslt+xml",
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
349 "application/x-desktop",
9534
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
350 "application/x-latex",
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
351 "application/x-tex",
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
352 "application/x-texinfo",
4097
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
353 "image/svg+xml",
9534
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
354 "message/rfc822",
4097
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4083
diff changeset
355 ],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
356 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
357
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
358 iconsDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
359 "Path": [],
7521
17974c348101 Icons page, Icons preview dialog: added option to select the default icons and extended preview functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7451
diff changeset
360 "DefaultIconsPath": "automatic",
17974c348101 Icons page, Icons preview dialog: added option to select the default icons and extended preview functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7451
diff changeset
361 # automatic, breeze-dark, breeze-light, oxygen
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
362 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
363
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
364 # defaults for the cooperation settings
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
365 cooperationDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
366 "ServerPort": 42000,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
367 "AutoStartServer": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
368 "TryOtherPorts": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
369 "MaxPortsToTry": 100,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
370 "AutoAcceptConnections": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
371 "BannedUsers": [],
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
372 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
373
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
374 # defaults for the editor settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
375 editorDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
376 "AutosaveInterval": 0,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
377 "TabWidth": 4,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
378 "IndentWidth": 4,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
379 "TabIndentOverride": "{}", # JSON formatted dictionary
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
380 "IndentationGuides": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
381 "LinenoMargin": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
382 "FoldingMargin": True,
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
383 "FoldingStyle": QsciScintilla.FoldStyle.PlainFoldStyle.value,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
384 "TabForIndentation": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
385 "TabIndents": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
386 "ConvertTabsOnLoad": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
387 "AutomaticEOLConversion": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
388 "ShowWhitespace": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
389 "WhitespaceSize": 1,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
390 "ShowEOL": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
391 "UseMonospacedFont": False,
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: 8109
diff changeset
392 "WrapLongLinesMode": QsciScintilla.WrapMode.WrapNone,
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: 8109
diff changeset
393 "WrapVisualFlag": QsciScintilla.WrapVisualFlag.WrapFlagNone,
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: 8109
diff changeset
394 "WrapIndentMode": QsciScintilla.WrapIndentMode.WrapIndentFixed,
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
395 "WrapStartIndent": 0,
9405
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9357
diff changeset
396 "WarnFilesize": 1024,
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9357
diff changeset
397 "RejectFilesize": 4096,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
398 "ClearBreaksOnClose": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
399 "StripTrailingWhitespace": False,
6105
cbd34d558bd9 Finished implementing support for EditorConfig for the IDE editor component and the standalone editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6098
diff changeset
400 "InsertFinalNewline": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
401 "CommentColumn0": True,
1566
0cb791cc631a Fixed the issue where a non matching background was shown in the editor for lines below the end of the text, if a lexer with a non-standard background was set.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
402 "OverrideEditAreaColours": False,
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: 8109
diff changeset
403 "EdgeMode": QsciScintilla.EdgeMode.EdgeNone,
9176
193da71cc417 Changed edge column and max. line length pf code style checker to 88 characters because this gives better looking code (see 'Black' tool).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9152
diff changeset
404 "EdgeColumn": 88,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
405 "AutoIndentation": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
406 "BraceHighlighting": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
407 "CreateBackupFile": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
408 "CaretLineVisible": False,
3067
8fd7ae10de2b Implemented support for the new QScintilla feature to always highlight the caret line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3038
diff changeset
409 "CaretLineAlwaysVisible": False,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
410 "CaretWidth": 1,
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
411 "CaretLineFrameWidth": 0,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
412 "ColourizeSelText": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
413 "CustomSelectionColours": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
414 "ExtendSelectionToEol": False,
5733
aed3e558407f Reintroduced the highlighting of current instruction line and the error line using colored background. It is configurable whether to use these backgrounds or the arrows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5706
diff changeset
415 "LineMarkersBackground": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
416 "AutoPrepareAPIs": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
417 "AutoCompletionEnabled": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
418 "AutoCompletionCaseSensitivity": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
419 "AutoCompletionReplaceWord": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
420 "AutoCompletionShowSingle": False,
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: 8109
diff changeset
421 "AutoCompletionSource": QsciScintilla.AutoCompletionSource.AcsDocument,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
422 "AutoCompletionThreshold": 2,
5932
af9aa23e12ec Fallback option for using QScintilla if no auto completion found by plug-ins.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5928
diff changeset
423 # timeout in ms before auto-completion is started
5886
ba6d27371e25 Implemented support for asynchroneous completion lists in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5868
diff changeset
424 "AutoCompletionTimeout": 200,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
425 "AutoCompletionFillups": False,
5932
af9aa23e12ec Fallback option for using QScintilla if no auto completion found by plug-ins.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5928
diff changeset
426 # show QScintilla completions, if plug-in fails
af9aa23e12ec Fallback option for using QScintilla if no auto completion found by plug-ins.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5928
diff changeset
427 "AutoCompletionScintillaOnFail": False,
5886
ba6d27371e25 Implemented support for asynchroneous completion lists in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5868
diff changeset
428 "AutoCompletionReversedList": False,
6755
009812744917 Editor: added an option to disable the caching of completion results.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
429 "AutoCompletionCacheEnabled": True,
5888
f23f3d2b7516 Added a cache for the already determined completion lists.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5886
diff changeset
430 "AutoCompletionCacheSize": 100,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
431 "AutoCompletionCacheTime": 300, # 5 minutes
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
432 "AutoCompletionWatchdogTime": 3000, # ms
8481
02865597d820 QsciScintillaCompat: fixed an issue causing completion lists to go off-screen.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8469
diff changeset
433 "AutoCompletionMaxLines": 5,
6305
7652b925c25e Resize auto complete list box to fit with contents.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6300
diff changeset
434 "AutoCompletionMaxChars": 40,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
435 "CallTipsEnabled": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
436 "CallTipsVisible": 0,
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: 8109
diff changeset
437 "CallTipsStyle": QsciScintilla.CallTipsStyle.CallTipsNoContext,
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8314
diff changeset
438 "CallTipsPosition": QsciScintilla.CallTipsPosition.CallTipsBelowText,
5932
af9aa23e12ec Fallback option for using QScintilla if no auto completion found by plug-ins.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5928
diff changeset
439 # show QScintilla calltips, if plug-in fails
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
440 "CallTipsScintillaOnFail": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
441 "AutoCheckSyntax": True,
1353
e1c0af081a8e Added a syntax check while typing function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1337
diff changeset
442 "OnlineSyntaxCheck": True,
e1c0af081a8e Added a syntax check while typing function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1337
diff changeset
443 "OnlineSyntaxCheckInterval": 5,
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2084
diff changeset
444 "OnlineChangeTrace": True,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
445 "OnlineChangeTraceInterval": 500, # 500 milliseconds
8505
bbe43ddfae56 Added editor configuration parameters to support mouse hover help information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8481
diff changeset
446 "MouseHoverHelp": False,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
447 "MouseHoverTimeout": 500, # 500 milliseconds
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
448 "AutoReopen": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
449 "AnnotationsEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
450 "MiniContextMenu": False,
5416
16366120b523 Added an option to hide the format buttons bar, if formatting is not supported for the editor text type (only supported for HTML, Markdown and reStructured Text).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
451 "HideFormatButtons": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
452 "SearchMarkersEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
453 "QuickSearchMarkersEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
454 "MarkOccurrencesEnabled": True,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
455 "MarkOccurrencesTimeout": 500, # 500 milliseconds
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
456 "SearchRegexpMode": 0, # 0: POSIX mode, 1: CXX11 mode
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
457 "AdvancedEncodingDetection": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
458 "SpellCheckingEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
459 "AutoSpellCheckingEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
460 "AutoSpellCheckChunkSize": 30,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
461 "SpellCheckStringsOnly": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
462 "SpellCheckingMinWordSize": 3,
1123
4ed80ed7e433 Fixed the spell checking default language.
detlev@die-offenbachs.de
parents: 1114
diff changeset
463 "SpellCheckingDefaultLanguage": "en_US",
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
464 "SpellCheckingPersonalWordList": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
465 "SpellCheckingPersonalExcludeList": "",
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
466 "FullSpellCheckExtensions": ["md", "markdown", "rst", "txt"],
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
467 "FullSpellCheckUnknown": False,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
468 "DefaultEncoding": "utf-8",
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3647
diff changeset
469 "DefaultOpenFilter": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
470 "Lexers", "Python Files (*.py *.py3)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
471 ),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3647
diff changeset
472 "DefaultSaveFilter": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
473 "Lexers", "Python3 Files (*.py)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
474 ),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
475 "AdditionalOpenFilters": [],
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
476 "AdditionalSaveFilters": [],
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
477 "ZoomFactor": 0,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
478 "PreviewRefreshWaitTimer": 500, # wait time in milliseconds
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
479 "PreviewHtmlFileNameExtensions": ["html", "htm", "svg", "asp", "kid"],
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
480 "PreviewMarkdownFileNameExtensions": ["md", "markdown"],
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
481 "PreviewRestFileNameExtensions": ["rst"],
3458
64bbac483843 Refactored the previewer code to allow to add more previewers and started adding support for a QSS previewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3354
diff changeset
482 "PreviewQssFileNameExtensions": ["qss"],
3979
307b09aae43b Added capability to use 'Sphinx' to preview ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3974
diff changeset
483 "PreviewRestUseSphinx": False,
7319
49ea50a9a61e EditorFilePage: added a button to install the PyMdown extensions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7318
diff changeset
484 "PreviewMarkdownNLtoBR": False,
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: 7281
diff changeset
485 "PreviewMarkdownUsePyMdownExtensions": True,
7304
b072a364dd8d PreviewerHTML: more enhancments for the Markdown previewer related to MathJax.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7301
diff changeset
486 "PreviewMarkdownMathJax": True,
7309
5a434813eef3 PreviewerHTML, ExporterHTML:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7304
diff changeset
487 "PreviewMarkdownMermaid": True,
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: 7281
diff changeset
488 "PreviewMarkdownHTMLFormat": "HTML5", # XHTML1, HTML4, HTML5
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
489 "PreviewRestDocutilsHTMLFormat": "HTML5", # HTML4, HTML5
2659
7f46c5a7ed73 Added support for virtual space to the Editor and Mini Editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
490 "VirtualSpaceOptions": QsciScintilla.SCVS_NONE,
4288
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4271
diff changeset
491 "MouseClickHandlersEnabled": True,
6278
13fd8759f981 Editor, E5MapWidget: added a configuration option (Editor->Style page) to show the marker map on the left or right of the editor
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6237
diff changeset
492 "ShowMarkerMapOnRight": True,
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
493 "ShowMarkerChanges": True,
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
494 "ShowMarkerCoverage": True,
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
495 "ShowMarkerSearch": True,
7690
a59680062837 Continued implementing the editor outline widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7674
diff changeset
496 "ShowSourceOutline": True,
a59680062837 Continued implementing the editor outline widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7674
diff changeset
497 "SourceOutlineWidth": 200,
7750
b16930e5baa9 Editor Outline Viewer: made the width step size configurable and optimized the context menu handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7726
diff changeset
498 "SourceOutlineStepSize": 50,
7757
1f9f35f9be6d File Browser, Project Source Browser, Editor Outline: added option to suppress the source code encoding line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7750
diff changeset
499 "SourceOutlineShowCoding": True,
7998
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7962
diff changeset
500 "DocstringType": "ericdoc",
8002
6002378278c9 Editor: added configuration option (Editor->General page) to enable the automatic generation of docstrings, if a docstring start sequenz was entered (default on).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7998
diff changeset
501 "DocstringAutoGenerate": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
502 # All (most) lexers
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
503 "AllFoldCompact": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
504 # Bash specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
505 "BashFoldComment": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
506 # CMake specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
507 "CMakeFoldAtElse": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
508 # C++ specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
509 "CppCaseInsensitiveKeywords": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
510 "CppFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
511 "CppFoldPreprocessor": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
512 "CppFoldAtElse": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
513 "CppIndentOpeningBrace": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
514 "CppIndentClosingBrace": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
515 "CppDollarsAllowed": True,
992
566e87428fc8 Fixed a few PEP-8 issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
516 "CppStylePreprocessor": False,
1444
552d2d74f5cf Started to add support for QScintilla 2.6 (and newer).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1425
diff changeset
517 "CppHighlightTripleQuotedStrings": False,
2261
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2257
diff changeset
518 "CppHighlightHashQuotedStrings": False,
4206
8f0d697e6384 Added support for the new C++ lexer properties (as of QScintilla V. 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4176
diff changeset
519 "CppHighlightBackQuotedStrings": False,
8f0d697e6384 Added support for the new C++ lexer properties (as of QScintilla V. 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4176
diff changeset
520 "CppHighlightEscapeSequences": False,
8f0d697e6384 Added support for the new C++ lexer properties (as of QScintilla V. 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4176
diff changeset
521 "CppVerbatimStringEscapeSequencesAllowed": False,
3647
fef91a1eb27b Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3557
diff changeset
522 # CoffeeScript specifics
fef91a1eb27b Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3557
diff changeset
523 "CoffeScriptFoldComment": False,
fef91a1eb27b Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3557
diff changeset
524 "CoffeeScriptDollarsAllowed": True,
fef91a1eb27b Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3557
diff changeset
525 "CoffeeScriptStylePreprocessor": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
526 # CSS specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
527 "CssFoldComment": True,
2261
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2257
diff changeset
528 "CssHssSupport": False,
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2257
diff changeset
529 "CssLessSupport": False,
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2257
diff changeset
530 "CssSassySupport": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 # D specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
532 "DFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
533 "DFoldAtElse": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
534 "DIndentOpeningBrace": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
535 "DIndentClosingBrace": False,
3557
3ea8ba471d96 Added support for the QScintilla Gettext lexer (QsciLexerPO) as of QScintilla 2.8.2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
536 # Gettext specifics
3ea8ba471d96 Added support for the QScintilla Gettext lexer (QsciLexerPO) as of QScintilla 2.8.2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
537 "PoFoldComment": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 # HTML specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
539 "HtmlFoldPreprocessor": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
540 "HtmlFoldScriptComments": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
541 "HtmlFoldScriptHeredocs": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
542 "HtmlCaseSensitiveTags": False,
948
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
543 "HtmlDjangoTemplates": False,
992
566e87428fc8 Fixed a few PEP-8 issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
544 "HtmlMakoTemplates": False,
5420
53ca6ddb4acf Added support for the new QScintilla JSON lexer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5416
diff changeset
545 # JSON specifics
53ca6ddb4acf Added support for the new QScintilla JSON lexer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5416
diff changeset
546 "JSONHightlightComments": True,
53ca6ddb4acf Added support for the new QScintilla JSON lexer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5416
diff changeset
547 "JSONHighlightEscapeSequences": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 # Pascal specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
549 "PascalFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
550 "PascalFoldPreprocessor": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
551 "PascalSmartHighlighting": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552 # Perl specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
553 "PerlFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
554 "PerlFoldPackages": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
555 "PerlFoldPODBlocks": True,
1444
552d2d74f5cf Started to add support for QScintilla 2.6 (and newer).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1425
diff changeset
556 "PerlFoldAtElse": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 # PostScript specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
558 "PostScriptTokenize": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
559 "PostScriptLevel": 3,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
560 "PostScriptFoldAtElse": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561 # Povray specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
562 "PovFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
563 "PovFoldDirectives": False,
948
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
564 # Properties specifics
992
566e87428fc8 Fixed a few PEP-8 issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
565 "PropertiesInitialSpaces": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 # Python specifics
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
567 "PythonBadIndentation": (QsciLexerPython.IndentationWarning.Inconsistent),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
568 "PythonFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
569 "PythonFoldString": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
570 "PythonAutoIndent": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
571 "PythonAllowV2Unicode": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
572 "PythonAllowV3Binary": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
573 "PythonAllowV3Bytes": True,
948
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
574 "PythonFoldQuotes": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
575 "PythonStringsOverNewLineAllowed": False,
1444
552d2d74f5cf Started to add support for QScintilla 2.6 (and newer).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1425
diff changeset
576 "PythonHighlightSubidentifier": True,
948
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
577 # Ruby specifics
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
578 "RubyFoldComment": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579 # SQL specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
580 "SqlFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
581 "SqlBackslashEscapes": False,
948
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
582 "SqlDottedWords": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
583 "SqlFoldAtElse": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
584 "SqlFoldOnlyBegin": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
585 "SqlHashComments": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
586 "SqlQuotedIdentifiers": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
587 # TCL specifics
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
588 "TclFoldComment": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
589 # TeX specifics
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
590 "TexFoldComment": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
591 "TexProcessComments": False,
fe7b94ed01ec Added support for new lexer properties (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
592 "TexProcessIf": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
593 # VHDL specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
594 "VHDLFoldComment": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
595 "VHDLFoldAtElse": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
596 "VHDLFoldAtBegin": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
597 "VHDLFoldAtParenthesis": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
598 # XML specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
599 "XMLStyleScripts": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
600 # YAML specifics
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
601 "YAMLFoldComment": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
602 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
603
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
604 if Globals.isWindowsPlatform():
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: 8109
diff changeset
605 editorDefaults["EOLMode"] = QsciScintilla.EolMode.EolWindows
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
606 else:
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: 8109
diff changeset
607 editorDefaults["EOLMode"] = QsciScintilla.EolMode.EolUnix
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
608
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
609 editorColourDefaults = {
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: 8109
diff changeset
610 "CurrentMarker": QColor(Qt.GlobalColor.yellow),
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: 8109
diff changeset
611 "ErrorMarker": QColor(Qt.GlobalColor.red),
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: 8109
diff changeset
612 "MatchingBrace": QColor(Qt.GlobalColor.green),
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: 8109
diff changeset
613 "MatchingBraceBack": QColor(Qt.GlobalColor.white),
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: 8109
diff changeset
614 "NonmatchingBrace": QColor(Qt.GlobalColor.red),
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: 8109
diff changeset
615 "NonmatchingBraceBack": QColor(Qt.GlobalColor.white),
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: 8109
diff changeset
616 "CallTipsBackground": QColor(Qt.GlobalColor.white),
7536
861e46f99d65 Editor, Shell: added configuration option for the calltips foreground and highlight color.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7535
diff changeset
617 "CallTipsForeground": QColor("#7f7f7f"),
861e46f99d65 Editor, Shell: added configuration option for the calltips foreground and highlight color.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7535
diff changeset
618 "CallTipsHighlight": QColor("#00007f"),
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: 8109
diff changeset
619 "CaretForeground": QColor(Qt.GlobalColor.black),
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: 8109
diff changeset
620 "CaretLineBackground": QColor(Qt.GlobalColor.white),
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: 8109
diff changeset
621 "Edge": QColor(Qt.GlobalColor.lightGray),
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: 8109
diff changeset
622 "SelectionBackground": QColor(Qt.GlobalColor.black),
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: 8109
diff changeset
623 "SelectionForeground": QColor(Qt.GlobalColor.white),
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: 8109
diff changeset
624 "SearchMarkers": QColor(Qt.GlobalColor.blue),
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: 8109
diff changeset
625 "MarginsBackground": QColor(Qt.GlobalColor.lightGray),
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: 8109
diff changeset
626 "MarginsForeground": QColor(Qt.GlobalColor.black),
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
627 "FoldmarginBackground": QColor("#e6e6e6"),
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: 8109
diff changeset
628 "FoldMarkersForeground": QColor(Qt.GlobalColor.white),
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: 8109
diff changeset
629 "FoldMarkersBackground": QColor(Qt.GlobalColor.black),
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: 8109
diff changeset
630 "SpellingMarkers": QColor(Qt.GlobalColor.red),
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
631 "AnnotationsWarningForeground": QColor("#606000"),
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
632 "AnnotationsWarningBackground": QColor("#ffffd0"),
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
633 "AnnotationsErrorForeground": QColor("#600000"),
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
634 "AnnotationsErrorBackground": QColor("#ffd0d0"),
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2769
diff changeset
635 "AnnotationsStyleForeground": QColor("#000060"),
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2769
diff changeset
636 "AnnotationsStyleBackground": QColor("#d0d0ff"),
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: 8109
diff changeset
637 "WhitespaceForeground": QColor(Qt.GlobalColor.darkGray),
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: 8109
diff changeset
638 "WhitespaceBackground": QColor(Qt.GlobalColor.white),
2164
d67b14a3f884 Improved the change tracing function by marking saved and unsaved changes differently.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
639 "OnlineChangeTraceMarkerUnsaved": QColor("#ff8888"),
d67b14a3f884 Improved the change tracing function by marking saved and unsaved changes differently.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
640 "OnlineChangeTraceMarkerSaved": QColor("#88ff88"),
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: 8109
diff changeset
641 "IndentationGuidesBackground": QColor(Qt.GlobalColor.white),
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: 8109
diff changeset
642 "IndentationGuidesForeground": QColor(Qt.GlobalColor.black),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
643 "HighlightMarker": QColor("#200000FF"), # ARGB format
3341
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
644 # colors for the marker map
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
645 "BookmarksMap": QColor("#f8c700"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
646 "ErrorsMap": QColor("#dd0000"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
647 "WarningsMap": QColor("#606000"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
648 "BreakpointsMap": QColor("#f55c07"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
649 "TasksMap": QColor("#2278f8"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
650 "CoverageMap": QColor("#ad3636"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
651 "ChangesMap": QColor("#00b000"),
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
652 "CurrentMap": QColor("#000000"),
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: 8109
diff changeset
653 "SearchMarkersMap": QColor(Qt.GlobalColor.blue),
6111
d38b38117d83 Added VCS conflict markers to the types shown on the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6105
diff changeset
654 "VcsConflictMarkersMap": QColor("#dd00dd"),
3341
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
655 "MarkerMapBackground": QColor("#e7e7e7"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
657
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 editorOtherFontsDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
659 "MarginsFont": "Sans Serif,10,-1,5,50,0,0,0,0,0",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
660 "DefaultFont": "Sans Serif,10,-1,5,50,0,0,0,0,0",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
661 "MonospacedFont": "Courier,10,-1,5,50,0,0,0,0,0",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
662 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
663
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
664 editorTypingDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
665 "Python/EnabledTypingAids": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
666 "Python/InsertClosingBrace": True,
2502
f31954903e39 Changed the default for "Python/IndentBrace" to False (seems to be more logical).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
667 "Python/IndentBrace": False,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
668 "Python/SkipBrace": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
669 "Python/InsertQuote": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
670 "Python/DedentElse": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
671 "Python/DedentExcept": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
672 "Python/InsertImport": True,
6997
24eabcea4c59 Python and Ruby Typing: added support for 'from ... import (...)' and changed the indentation when the previous line ends with '(', '[' or '{'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
673 "Python/ImportBraceType": False,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
674 "Python/InsertSelf": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
675 "Python/InsertBlank": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
676 "Python/ColonDetection": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
677 "Python/DedentDef": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
678 "Ruby/EnabledTypingAids": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
679 "Ruby/InsertClosingBrace": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
680 "Ruby/IndentBrace": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
681 "Ruby/SkipBrace": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
682 "Ruby/InsertQuote": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
683 "Ruby/InsertBlank": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
684 "Ruby/InsertHereDoc": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
685 "Ruby/InsertInlineDoc": True,
7280
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
686 "Yaml/EnabledTypingAids": True,
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
687 "Yaml/InsertClosingBrace": True,
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
688 "Yaml/SkipBrace": True,
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
689 "Yaml/InsertQuote": True,
7281
8087ef6df2e4 Editor: added a typing aid for YAML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7280
diff changeset
690 "Yaml/AutoIndentation": True,
7280
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
691 "Yaml/ColonDetection": True,
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
692 "Yaml/InsertBlankDash": True,
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
693 "Yaml/InsertBlankColon": True,
eb15faf0e3e2 Started implementing a typing completer for Yaml.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7278
diff changeset
694 "Yaml/InsertBlankQuestion": True,
7281
8087ef6df2e4 Editor: added a typing aid for YAML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7280
diff changeset
695 "Yaml/InsertBlankComma": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
696 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
697
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
698 editorExporterDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
699 "HTML/WYSIWYG": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
700 "HTML/Folding": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
701 "HTML/OnlyStylesUsed": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
702 "HTML/FullPathAsTitle": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
703 "HTML/UseTabs": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
704 "RTF/WYSIWYG": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
705 "RTF/UseTabs": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
706 "RTF/Font": "Courier New,10,-1,5,50,0,0,0,0,0",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
707 "PDF/Magnification": 0,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
708 "PDF/Font": "Helvetica", # must be Courier, Helvetica or Times
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
709 "PDF/PageSize": "A4", # must be A4 or Letter
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
710 "PDF/MarginLeft": 36,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
711 "PDF/MarginRight": 36,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
712 "PDF/MarginTop": 36,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
713 "PDF/MarginBottom": 36,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
714 "TeX/OnlyStylesUsed": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
715 "TeX/FullPathAsTitle": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
716 "ODT/WYSIWYG": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
717 "ODT/OnlyStylesUsed": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
718 "ODT/UseTabs": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
719 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
720
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
721 # defaults for the printer settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
722 printerDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
723 "PrinterName": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
724 "ColorMode": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
725 "FirstPageFirst": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
726 "Magnification": -3,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
727 "Orientation": 0,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
728 "PageSize": 0,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
729 "HeaderFont": "Serif,10,-1,5,50,0,0,0,0,0",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
730 "LeftMargin": 1.0,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
731 "RightMargin": 1.0,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
732 "TopMargin": 1.0,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
733 "BottomMargin": 1.0,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
734 "Resolution": 150, # printer resolution in DPI
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
736
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
737 # defaults for the project settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
738 projectDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
739 "SearchNewFiles": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
740 "SearchNewFilesRecursively": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
741 "AutoIncludeNewFiles": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
742 "AutoLoadSession": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
743 "AutoSaveSession": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
744 "SessionAllBreakpoints": False,
8031
ce5858a237d2 Changed the Project and MultiProject configuration option "XMLTimestamp" to "TimestampFile". A configuration check is suggested.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
745 "TimestampFile": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
746 "AutoCompileForms": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
747 "AutoCompileResources": False,
6237
8abadfc5b7cb Preferences: added a project setting to perform a 'make' run before executing the project main script.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6231
diff changeset
748 "AutoExecuteMake": False,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
749 "AutoLoadDbgProperties": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
750 "AutoSaveDbgProperties": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
751 "FollowEditor": True,
2769
8cbebde7a984 Added support to highlight the current class/method name of the current editor to the project sources viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2737
diff changeset
752 "FollowCursorLine": True,
8cbebde7a984 Added support to highlight the current class/method name of the current editor to the project sources viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2737
diff changeset
753 "AutoPopulateItems": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
754 "RecentNumber": 9,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
755 "DeterminePyFromProject": True,
5105
8a773a100c34 Added an option to the project to rescan the project for tasks upon open.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5070
diff changeset
756 "TasksProjectAutoSave": True,
8a773a100c34 Added an option to the project to rescan the project for tasks upon open.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5070
diff changeset
757 "TasksProjectRescanOnOpen": True,
5525
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
758 "DebugClientsHistory": [],
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
759 "DebuggerInterpreterHistory": [],
6576
ea60ea85067a VitualEnv Manager:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6563
diff changeset
760 "RestartShellForProject": True,
8109
486984bb52e3 File Browser
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8091
diff changeset
761 "BrowsersListHiddenFiles": False,
9357
f10a57275bce Project
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9350
diff changeset
762 "AutoSaveProject": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
763 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
764
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
765 # defaults for the multi project settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
766 multiProjectDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
767 "OpenMasterAutomatically": True,
8031
ce5858a237d2 Changed the Project and MultiProject configuration option "XMLTimestamp" to "TimestampFile". A configuration check is suggested.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
768 "TimestampFile": True,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
769 "RecentNumber": 9,
1939
eadb2328d7d4 Introduced a "workspace" directory that is used as the default for opening or saving new files or projects (configurable on Multiproject config page).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1926
diff changeset
770 "Workspace": "",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
771 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
772
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
773 # defaults for the project browser lists settings
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
774 projectBrowsersDefaults = {
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
775 "allBrowsers": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
776 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
777 "forms",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
778 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
779 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
780 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
781 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
782 "protocols",
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
783 ),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
784 "PyQt5": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
785 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
786 "forms",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
787 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
788 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
789 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
790 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
791 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
792 ),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
793 "PyQt5C": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
794 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
795 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
796 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
797 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
798 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
799 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
800 ),
7907
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
801 "PyQt6": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
802 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
803 "forms",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
804 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
805 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
806 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
807 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
808 ),
7907
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
809 "PyQt6C": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
810 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
811 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
812 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
813 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
814 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
815 ),
8336
d566c2970f39 Changed the E6Plugin project type to E7Plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
816 "E7Plugin": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
817 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
818 "forms",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
819 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
820 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
821 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
822 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
823 ),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
824 "Console": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
825 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
826 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
827 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
828 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
829 ),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
830 "Other": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
831 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
832 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
833 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
834 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
835 ),
6291
94e0e688dcad PySide2 support: started to implement support for PySide2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6281
diff changeset
836 "PySide2": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
837 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
838 "forms",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
839 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
840 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
841 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
842 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
843 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
844 ),
6291
94e0e688dcad PySide2 support: started to implement support for PySide2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6281
diff changeset
845 "PySide2C": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
846 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
847 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
848 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
849 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
850 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
851 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
852 ),
7911
4621c9082a43 Added support for PySide6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7907
diff changeset
853 "PySide6": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
854 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
855 "forms",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
856 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
857 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
858 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
859 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
860 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
861 ),
7911
4621c9082a43 Added support for PySide6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7907
diff changeset
862 "PySide6C": (
9531
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
863 "sources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
864 "resources",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
865 "translations",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
866 "others",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
867 "interfaces",
155b2646799a Corrected some code style, code formatting and imports order issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9527
diff changeset
868 "protocols",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
869 ),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
870 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
871
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
872 # defaults for the project browser colour settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
873 projectBrowserColourDefaults = {
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: 8109
diff changeset
874 "Highlighted": QColor(Qt.GlobalColor.red),
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: 8109
diff changeset
875 "VcsAdded": QColor(Qt.GlobalColor.blue),
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: 8109
diff changeset
876 "VcsConflict": QColor(Qt.GlobalColor.red),
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: 8109
diff changeset
877 "VcsModified": QColor(Qt.GlobalColor.yellow),
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: 8109
diff changeset
878 "VcsReplaced": QColor(Qt.GlobalColor.cyan),
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: 8109
diff changeset
879 "VcsUpdate": QColor(Qt.GlobalColor.green),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
880 "VcsRemoved": QColor(Qt.GlobalColor.magenta),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
881 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
882
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
883 # defaults for the help settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
884 helpDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
885 "CustomViewer": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
886 "PythonDocDir": "",
2298
fa4f79c34e0c Added support for Qt5 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2294
diff changeset
887 "Qt5DocDir": "",
7902
a5248d27c8a9 User Interface
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7802
diff changeset
888 "Qt6DocDir": "",
8059
32ba069e1328 Preferences: added the PyQt5 web site documentation page as the default for PyQt5 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8053
diff changeset
889 "PyQt5DocDir": "https://www.riverbankcomputing.com/static/Docs/PyQt5/",
8538
01b7559d3f4e Preferences: added a default value for PyQt6 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8505
diff changeset
890 "PyQt6DocDir": "https://www.riverbankcomputing.com/static/Docs/PyQt6/",
6291
94e0e688dcad PySide2 support: started to implement support for PySide2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6281
diff changeset
891 "PySide2DocDir": "",
7911
4621c9082a43 Added support for PySide6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7907
diff changeset
892 "PySide6DocDir": "",
4621
b46304716d28 Added a configuration entry for the eric API documentation to the Help Documents configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4619
diff changeset
893 "EricDocDir": "",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
894 "HelpViewerType": 0, # internal help viewer
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
895 "Bookmarks": "[]", # empty JSON list
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
896 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
897
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
898 # defaults for the web browser settings
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
899 webBrowserDefaults = {
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
900 "SingleWebBrowserWindow": True,
5745
4f4316e83318 -- added a super menu to modernize the look & feel
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5739
diff changeset
901 "ShowToolbars": False,
4f4316e83318 -- added a super menu to modernize the look & feel
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5739
diff changeset
902 "BookmarksToolBarVisible": True,
4f4316e83318 -- added a super menu to modernize the look & feel
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5739
diff changeset
903 "MenuBarVisible": False,
4f4316e83318 -- added a super menu to modernize the look & feel
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5739
diff changeset
904 "StatusBarVisible": True,
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
905 "SaveGeometry": True,
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
906 "WebBrowserState": QByteArray(),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
907 "StartupBehavior": 2, # show speed dial
5782
60874802161b Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5779
diff changeset
908 # 0 open empty page
60874802161b Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5779
diff changeset
909 # 1 open home page
60874802161b Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5779
diff changeset
910 # 2 open speed dial
60874802161b Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5779
diff changeset
911 # 3 restore last session
60874802161b Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5779
diff changeset
912 # 4 ask user for session
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
913 "NewTabBehavior": 2, # show speed dial
5783
44a9f08de394 Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5782
diff changeset
914 # 0 open empty page
44a9f08de394 Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5782
diff changeset
915 # 1 open home page
44a9f08de394 Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5782
diff changeset
916 # 2 open speed dial
4864
00a215a67f25 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4859
diff changeset
917 "HomePage": "eric:home",
5785
7c7c5f9e4fad Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5783
diff changeset
918 "LoadTabOnActivation": True,
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
919 "WarnOnMultipleClose": True,
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
920 "DefaultScheme": "https://",
4725
b19ff70ba509 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4715
diff changeset
921 "UserStyleSheet": "",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
922 "ZoomValuesDB": "{}", # empty JSON dictionary
4734
ce0b1f024da9 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4726
diff changeset
923 "HistoryLimit": 30,
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
924 "WebSearchSuggestions": True,
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
925 "WebSearchEngine": "DuckDuckGo",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
926 "WebSearchKeywords": [], # array of two tuples (keyword,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
927 # search engine name)
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
928 "SearchLanguage": QLocale().language(),
4957
55c9bb589b0a Added a configuration for the image search to the web browser config page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4955
diff changeset
929 "ImageSearchEngine": "Google",
4758
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
930 "RssFeeds": [],
4779
173e0d2ab1f9 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4776
diff changeset
931 "ShowPreview": True,
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
932 "DiskCacheEnabled": True,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
933 "DiskCacheSize": 50, # 50 MB
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
934 "SslExceptionsDB": "{}", # empty JSON dictionary
7570
a7a5750aded4 Web Browser: made the URL entry background configurable and harmonized certificate handling for the web page and its web icon (favicon).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7567
diff changeset
935 "AlwaysRejectFaultyCertificates": False,
4825
b5fb58f3830b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4817
diff changeset
936 "DoNotTrack": False,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
937 "RefererSendReferer": 0, # never send a referrer
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
938 "RefererDefaultPolicy": 3, # don't send a referrer when downgrading
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
939 "RefererTrimmingPolicy": 0, # send full URL (no trimming)
4825
b5fb58f3830b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4817
diff changeset
940 "SendRefererWhitelist": ["qt-apps.org", "kde-apps.org"],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
941 "AcceptCookies": 2, # CookieJar.AcceptOnlyFromSitesNavigatedTo
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
942 "KeepCookiesUntil": 0, # CookieJar.KeepUntilExpire
4845
2d22ff71c005 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4825
diff changeset
943 "FilterTrackingCookies": True,
7567
bb196e51827d Web Browser: added a configurable URL entry color to indicate sites with certificate issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7565
diff changeset
944 "SecureUrlColor": QColor(184, 248, 169),
bb196e51827d Web Browser: added a configurable URL entry color to indicate sites with certificate issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7565
diff changeset
945 "InsecureUrlColor": QColor(248, 227, 169),
bb196e51827d Web Browser: added a configurable URL entry color to indicate sites with certificate issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7565
diff changeset
946 "MaliciousUrlColor": QColor(255, 132, 140),
bb196e51827d Web Browser: added a configurable URL entry color to indicate sites with certificate issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7565
diff changeset
947 "PrivateModeUrlColor": QColor(220, 220, 220),
4906
939ff20f712d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4895
diff changeset
948 "UserAgent": "",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
949 "AcceptQuotaRequest": 2, # yes/no/ask (0, 1, 2)
6410
98a5d0cd72f5 Webbrowser: finished upgrading to Qt 5.11.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6398
diff changeset
950 "AcceptProtocolHandlerRequest": 2, # yes/no/ask (0, 1, 2)
9350
8d2b507f8588 Web Browser
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9326
diff changeset
951 "AcceptFileSystemAccessRequest": 2, # yes/no/ask (0, 1, 2)
4958
ef400197e7d5 Implemented the auto scroller for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4957
diff changeset
952 # Auto Scroller
ef400197e7d5 Implemented the auto scroller for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4957
diff changeset
953 "AutoScrollEnabled": True,
ef400197e7d5 Implemented the auto scroller for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4957
diff changeset
954 "AutoScrollDivider": 8.0,
4979
7ac0959842f9 Added a tab manager window to the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4965
diff changeset
955 # Tab Manager
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
956 "TabManagerGroupByType": 0, # TabManagerWidget.GroupByWindow
4766
5f8d08aa2217 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4761
diff changeset
957 # Grease Monkey
5f8d08aa2217 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4761
diff changeset
958 "GreaseMonkeyDisabledScripts": [],
4769
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
959 # Downloads
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
960 "DownloadManagerRemovePolicy": 0, # never delete downloads
6224
08875555771a Web Browser (NG): some more improvements of the download manager
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6193
diff changeset
961 "DownloadManagerSize": QSize(450, 600),
4769
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
962 "DownloadManagerPosition": QPoint(),
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
963 "DownloadManagerDownloads": [],
6224
08875555771a Web Browser (NG): some more improvements of the download manager
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6193
diff changeset
964 "DownloadManagerAutoOpen": False,
08875555771a Web Browser (NG): some more improvements of the download manager
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6193
diff changeset
965 "DownloadManagerAutoClose": False,
5530
93f95c4b3153 Started upgrading the new web browser to the Qt 5.8 offerings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5526
diff changeset
966 # Spell Checking
93f95c4b3153 Started upgrading the new web browser to the Qt 5.8 offerings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5526
diff changeset
967 "SpellCheckEnabled": False,
93f95c4b3153 Started upgrading the new web browser to the Qt 5.8 offerings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5526
diff changeset
968 "SpellCheckLanguages": [],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
969 "SpellCheckDictionariesUrl": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
970 "https://eric-ide.python-projects.org/qwebengine_dictionaries/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
971 "dictionaries.xml"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
972 ),
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
973 # Sync
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
974 "SyncEnabled": False,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
975 "SyncBookmarks": True,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
976 "SyncHistory": True,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
977 "SyncPasswords": False,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
978 "SyncUserAgents": True,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
979 "SyncSpeedDial": True,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
980 "SyncEncryptData": False,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
981 "SyncEncryptionKey": "",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
982 "SyncEncryptionKeyLength": 32, # 16, 24 or 32
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
983 "SyncEncryptPasswordsOnly": False,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
984 "SyncType": 0,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
985 "SyncFtpServer": "",
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
986 "SyncFtpUser": "",
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
987 "SyncFtpPassword": "",
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
988 "SyncFtpPath": "",
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
989 "SyncFtpPort": 21,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
990 "SyncFtpIdleTimeout": 30,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
991 "SyncDirectoryPath": "",
4847
a1a8eac81b54 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4845
diff changeset
992 # AdBlock
a1a8eac81b54 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4845
diff changeset
993 "AdBlockEnabled": False,
a1a8eac81b54 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4845
diff changeset
994 "AdBlockSubscriptions": [],
a1a8eac81b54 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4845
diff changeset
995 "AdBlockUpdatePeriod": 1,
a1a8eac81b54 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4845
diff changeset
996 "AdBlockExceptions": [],
4859
36c4b21c9f7b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4847
diff changeset
997 "AdBlockUseLimitedEasyList": True,
7674
60fdbaf3508f Preferences: fixed an issue left over from old QtWebKit based browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7667
diff changeset
998 # PIM:
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
999 "PimFullName": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1000 "PimFirstName": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1001 "PimLastName": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1002 "PimEmail": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1003 "PimPhone": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1004 "PimMobile": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1005 "PimAddress": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1006 "PimCity": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1007 "PimZip": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1008 "PimState": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1009 "PimCountry": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1010 "PimHomePage": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1011 "PimSpecial1": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1012 "PimSpecial2": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1013 "PimSpecial3": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1014 "PimSpecial4": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1015 # VirusTotal:
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1016 "VirusTotalEnabled": False,
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1017 "VirusTotalServiceKey": "",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
1018 "VirusTotalSecure": True,
5777
2c4441d65ee3 Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5769
diff changeset
1019 # Sessions
2c4441d65ee3 Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5769
diff changeset
1020 "SessionAutoSave": True,
2c4441d65ee3 Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5769
diff changeset
1021 "SessionAutoSaveInterval": 15, # interval in seconds
5779
b53fabc86f3c Continued implementing session support for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5777
diff changeset
1022 "SessionLastActivePath": "",
5808
7bf90dcae4e1 Started implementing the SafeBrowsingUrl class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5799
diff changeset
1023 # Google Safe Browsing
7bf90dcae4e1 Started implementing the SafeBrowsingUrl class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5799
diff changeset
1024 "SafeBrowsingEnabled": True,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1025 "SafeBrowsingApiKey": "", # API key
5829
d3448873ced3 Finished coding the safe browsing module of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5808
diff changeset
1026 "SafeBrowsingFilterPlatform": True,
5839
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
1027 "SafeBrowsingAutoUpdate": False,
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
1028 "SafeBrowsingUpdateDateTime": QDateTime(),
6231
fdfcd201f783 Preferences: introduced a setting to enable the use of the Safe Browsing Lookup API (v4)
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6224
diff changeset
1029 "SafeBrowsingUseLookupApi": False,
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1030 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1031
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1032 @classmethod
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1033 def initWebEngineSettingsDefaults(cls):
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1034 """
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1035 Class method to initialize the web engine settings related defaults.
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1036 """
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1037 if QWebEngineSettings is None:
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1038 return
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1039
8556
766e1566cb74 Next batch of changes for QtWebEngine as of Qt 6.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8553
diff changeset
1040 webEngineSettings = QWebEngineProfile.defaultProfile().settings()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1041 cls.webBrowserDefaults.update(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1042 {
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1043 # fonts
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1044 "StandardFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1045 QWebEngineSettings.FontFamily.StandardFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1046 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1047 "FixedFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1048 QWebEngineSettings.FontFamily.FixedFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1049 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1050 "SerifFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1051 QWebEngineSettings.FontFamily.StandardFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1052 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1053 "SansSerifFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1054 QWebEngineSettings.FontFamily.SansSerifFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1055 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1056 "CursiveFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1057 QWebEngineSettings.FontFamily.CursiveFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1058 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1059 "FantasyFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1060 QWebEngineSettings.FontFamily.FantasyFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1061 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1062 "PictographFontFamily": webEngineSettings.fontFamily(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1063 QWebEngineSettings.FontFamily.PictographFont
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1064 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1065 # font sizes
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1066 "DefaultFontSize": webEngineSettings.fontSize(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1067 QWebEngineSettings.FontSize.DefaultFontSize
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1068 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1069 "DefaultFixedFontSize": webEngineSettings.fontSize(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1070 QWebEngineSettings.FontSize.DefaultFixedFontSize
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1071 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1072 "MinimumFontSize": webEngineSettings.fontSize(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1073 QWebEngineSettings.FontSize.MinimumFontSize
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1074 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1075 "MinimumLogicalFontSize": webEngineSettings.fontSize(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1076 QWebEngineSettings.FontSize.MinimumLogicalFontSize
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1077 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1078 # text encoding
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1079 "DefaultTextEncoding": webEngineSettings.defaultTextEncoding(),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1080 # web attributes
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1081 "AutoLoadImages": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1082 QWebEngineSettings.WebAttribute.AutoLoadImages
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1083 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1084 "JavaScriptEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1085 QWebEngineSettings.WebAttribute.JavascriptEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1086 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1087 "JavaScriptCanOpenWindows": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1088 QWebEngineSettings.WebAttribute.JavascriptCanOpenWindows
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1089 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1090 "JavaScriptCanAccessClipboard": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1091 QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1092 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1093 "LinksIncludedInFocusChain": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1094 QWebEngineSettings.WebAttribute.LinksIncludedInFocusChain
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1095 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1096 "LocalStorageEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1097 QWebEngineSettings.WebAttribute.LocalStorageEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1098 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1099 "LocalContentCanAccessRemoteUrls": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1100 QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1101 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1102 "XSSAuditingEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1103 QWebEngineSettings.WebAttribute.XSSAuditingEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1104 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1105 "SpatialNavigationEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1106 QWebEngineSettings.WebAttribute.SpatialNavigationEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1107 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1108 "LocalContentCanAccessFileUrls": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1109 QWebEngineSettings.WebAttribute.LocalContentCanAccessFileUrls
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1110 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1111 "ScrollAnimatorEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1112 QWebEngineSettings.WebAttribute.ScrollAnimatorEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1113 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1114 "ErrorPageEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1115 QWebEngineSettings.WebAttribute.ErrorPageEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1116 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1117 "PluginsEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1118 QWebEngineSettings.WebAttribute.PluginsEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1119 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1120 "FullScreenSupportEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1121 QWebEngineSettings.WebAttribute.FullScreenSupportEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1122 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1123 "ScreenCaptureEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1124 QWebEngineSettings.WebAttribute.ScreenCaptureEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1125 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1126 "WebGLEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1127 QWebEngineSettings.WebAttribute.WebGLEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1128 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1129 "Accelerated2dCanvasEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1130 QWebEngineSettings.WebAttribute.Accelerated2dCanvasEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1131 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1132 "AutoLoadIconsForPage": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1133 QWebEngineSettings.WebAttribute.AutoLoadIconsForPage
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1134 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1135 "FocusOnNavigationEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1136 QWebEngineSettings.WebAttribute.FocusOnNavigationEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1137 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1138 "PrintElementBackgrounds": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1139 QWebEngineSettings.WebAttribute.PrintElementBackgrounds
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1140 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1141 "AllowRunningInsecureContent": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1142 QWebEngineSettings.WebAttribute.AllowRunningInsecureContent
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1143 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1144 "AllowGeolocationOnInsecureOrigins": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1145 QWebEngineSettings.WebAttribute.AllowGeolocationOnInsecureOrigins
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1146 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1147 "AllowWindowActivationFromJavaScript": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1148 QWebEngineSettings.WebAttribute.AllowWindowActivationFromJavaScript
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1149 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1150 "ShowScrollBars": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1151 QWebEngineSettings.WebAttribute.ShowScrollBars
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1152 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1153 "PlaybackRequiresUserGesture": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1154 QWebEngineSettings.WebAttribute.PlaybackRequiresUserGesture
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1155 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1156 "JavaScriptCanPaste": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1157 QWebEngineSettings.WebAttribute.JavascriptCanPaste
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1158 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1159 "WebRTCPublicInterfacesOnly": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1160 QWebEngineSettings.WebAttribute.WebRTCPublicInterfacesOnly
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1161 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1162 "DnsPrefetchEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1163 QWebEngineSettings.WebAttribute.DnsPrefetchEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1164 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1165 "PdfViewerEnabled": webEngineSettings.testAttribute(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1166 QWebEngineSettings.WebAttribute.PdfViewerEnabled
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1167 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1168 }
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1169 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1170
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1171 cls.webEngineSettingsIntitialized = True
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1172
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1173 webEngineSettingsIntitialized = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1174
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1175 # defaults for system settings
107
918a6be6f051 Deleted the code setting the default encoding because this has to be (and is automatically set to) utf-8 for Python3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 101
diff changeset
1176 sysDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1177 "StringEncoding": "utf-8",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1178 "IOEncoding": "utf-8",
107
918a6be6f051 Deleted the code setting the default encoding because this has to be (and is automatically set to) utf-8 for Python3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 101
diff changeset
1179 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1180
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1181 # defaults for the shell settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1182 shellDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1183 "LinenoMargin": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1184 "AutoCompletionEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1185 "CallTipsEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1186 "WrapEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1187 "MaxHistoryEntries": 100,
8265
0090cfa83159 Converted enum names to use all uppercase letters (except for E5PathPickerModes to keep plug-ins using this compatible with previous eric releases).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8259
diff changeset
1188 "HistoryStyle": ShellHistoryStyle.LINUXSTYLE,
5799
e87f52c0374a Finished improving the Shell window history handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5798
diff changeset
1189 "HistoryWrap": False,
e87f52c0374a Finished improving the Shell window history handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5798
diff changeset
1190 "HistoryNavigateByCursor": False,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1191 "SyntaxHighlightingEnabled": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1192 "ShowStdOutErr": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1193 "UseMonospacedFont": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1194 "MonospacedFont": "Courier,10,-1,5,50,0,0,0,0,0",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1195 "MarginsFont": "Sans Serif,10,-1,5,50,0,0,0,0,0",
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
1196 "LastVirtualEnvironment": "",
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
1197 "StartWithMostRecentlyUsedEnvironment": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1198 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1199
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1200 # defaults for Qt related stuff
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1201 qtDefaults = {
8549
15eca21fd968 Changed some forgotten references to Qt5 to Qt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8539
diff changeset
1202 "Qt6TranslationsDir": "",
5070
4e4651e88674 Added capability to set the path to the Qt tools manually (because they are not included in the PyQt5 wheels).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5047
diff changeset
1203 "QtToolsDir": "",
7198
684261ef2165 Removed the Qt4 runtime stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
1204 "QtToolsPrefix": "",
684261ef2165 Removed the Qt4 runtime stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
1205 "QtToolsPostfix": "",
9536
c1c84299bef3 Qt Tools
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9534
diff changeset
1206 "QHelpGenerator": "",
3845
949682ceda54 Added functionality to modify pyuic options.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3730
diff changeset
1207 "PyuicIndent": 4,
949682ceda54 Added functionality to modify pyuic options.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3730
diff changeset
1208 "PyuicFromImports": False,
7451
f04328aef87a PySide2 support: separated pyside2-uic options from those for pyuic5 and fixed tool detection for PySide2
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7446
diff changeset
1209 "PyuicExecute": True,
7907
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
1210 "PyQtVenvName": "",
5696
68af0e9c57ad Started implementing the capability to configure the path to the PyQt tools or determine it based on the current Python interpreter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5532
diff changeset
1211 "PyQtToolsDir": "",
7907
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
1212 "Pyuic6Indent": 4,
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
1213 "Pyuic6Execute": True,
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
1214 "PyQt6VenvName": "",
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
1215 "PyQt6ToolsDir": "",
7451
f04328aef87a PySide2 support: separated pyside2-uic options from those for pyuic5 and fixed tool detection for PySide2
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7446
diff changeset
1216 "PySide2FromImports": False,
7907
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
1217 "PySide2VenvName": "",
7446
67b21645ffec PySide2 support: added a configuration option to enter the path containing the PySide2 tools (see Qt configuration page).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
1218 "PySide2ToolsDir": "",
7911
4621c9082a43 Added support for PySide6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7907
diff changeset
1219 "PySide6FromImports": False,
4621c9082a43 Added support for PySide6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7907
diff changeset
1220 "PySide6VenvName": "",
4621c9082a43 Added support for PySide6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7907
diff changeset
1221 "PySide6ToolsDir": "",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1222 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1223
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1224 # defaults for corba related stuff
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1225 corbaDefaults = {"omniidl": ""}
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1226
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
1227 # defaults for protobuf related stuff
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
1228 protobufDefaults = {
5970
411f7ba577d5 Continued to add support for Google protobuf protocol files. Added support for gRPC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5968
diff changeset
1229 "protoc": "",
411f7ba577d5 Continued to add support for Google protobuf protocol files. Added support for gRPC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5968
diff changeset
1230 "grpcPython": "",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1231 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1232
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1233 # defaults for user related stuff
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1234 userDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1235 "Email": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1236 "MailServer": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1237 "Signature": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1238 "MailServerAuthentication": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1239 "MailServerUser": "",
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1240 "MailServerPassword": "",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1241 "MailServerEncryption": "No", # valid values: No, SSL, TLS
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1242 "MailServerPort": 25,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1243 "UseSystemEmailClient": False,
5769
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
1244 "UseGoogleMailOAuth2": False,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1245 "MasterPassword": "", # stores the password hash
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
1246 "UseMasterPassword": False,
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
1247 "SavePasswords": False,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1248 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1249
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1250 # defaults for vcs related stuff
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1251 vcsDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1252 "AutoClose": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1253 "AutoSaveFiles": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1254 "AutoSaveProject": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1255 "AutoUpdate": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1256 "StatusMonitorInterval": 30,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1257 "MonitorLocalStatus": False,
7667
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7666
diff changeset
1258 "ShowVcsToolbar": True,
8624
5192a2592324 Started implementing a 'Quick Commit' function for the new VCS Status List widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8593
diff changeset
1259 "PerProjectCommitHistory": True,
5192a2592324 Started implementing a 'Quick Commit' function for the new VCS Status List widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8593
diff changeset
1260 "CommitMessages": 20,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1261 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1262
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1263 # defaults for tasks related stuff
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1264 tasksDefaults = {
1819
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1265 "TasksFixmeMarkers": "FIX" + "ME:",
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1266 "TasksWarningMarkers": "WARN" + "ING:",
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1267 "TasksTodoMarkers": "TO" + "DO:",
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1268 "TasksNoteMarkers": "NO" + "TE:",
7663
b4d5234f92e7 Tasks: added separate task categories for 'Test' and 'Documentation' tasks
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7637
diff changeset
1269 "TasksTestMarkers": "TE" + "ST:",
b4d5234f92e7 Tasks: added separate task categories for 'Test' and 'Documentation' tasks
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7637
diff changeset
1270 "TasksDocuMarkers": "DO" + "CU:",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1271 # needed to keep it from being recognized as a task
1819
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1272 "TasksFixmeColor": QColor("#FFA0A0"),
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1273 "TasksWarningColor": QColor("#FFFFA0"),
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1274 "TasksTodoColor": QColor("#A0FFA0"),
cfcfd617216a Changed the tasks handling to allow for more fine grained task designations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1813
diff changeset
1275 "TasksNoteColor": QColor("#A0A0FF"),
7663
b4d5234f92e7 Tasks: added separate task categories for 'Test' and 'Documentation' tasks
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7637
diff changeset
1276 "TasksTestColor": QColor("#FFD000"),
b4d5234f92e7 Tasks: added separate task categories for 'Test' and 'Documentation' tasks
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7637
diff changeset
1277 "TasksDocuColor": QColor("#FFA0FF"),
1373
b3b3c99dba01 Made tasks manager forget about global file tasks when file is closed (configurable via configuration dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1368
diff changeset
1278 "ClearOnFileClose": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1279 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1280
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1281 # defaults for templates related stuff
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1282 templatesDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1283 "AutoOpenGroups": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1284 "SingleDialog": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1285 "ShowTooltip": False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1286 "SeparatorChar": "$",
3492
ae74a7201759 Added a configurable template code editor font.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3459
diff changeset
1287 "EditorFont": "Monospace,9,-1,5,50,0,0,0,0,0",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1288 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1289
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1290 # defaults for plugin manager related stuff
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1291 pluginManagerDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1292 "ActivateExternal": True,
3112
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1293 "DownloadPath": "",
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1294 "UpdatesCheckInterval": 3,
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1295 # 0 = off
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1296 # 1 = daily
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1297 # 2 = weekly
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1298 # 3 = monthly
5384
22c15d7e2cad Improved the plug-in update check in the plug-in manager to cope with the documentation set plug-in pecularities.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5379
diff changeset
1299 # 4 = always
3112
9485059ea9fa Started implementing the automatic plug-in update check in the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3081
diff changeset
1300 "CheckInstalledOnly": True,
8989
25cd4c5f1f19 Added code to check and install all of the plugin dependencies (e.g. after upgrading a virtual environment to a new Python version).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8981
diff changeset
1301 # list of plug-ins not to be shown in the repo dialog
3200
83bde5e6f146 Extended the plugin repository dialog to allow to hide unwanted entries and cleanup the plugin downloads area.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1302 "HiddenPlugins": [],
83bde5e6f146 Extended the plugin repository dialog to allow to hide unwanted entries and cleanup the plugin downloads area.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1303 # parameters for housekeeping
83bde5e6f146 Extended the plugin repository dialog to allow to hide unwanted entries and cleanup the plugin downloads area.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1304 "KeepGenerations": 2,
83bde5e6f146 Extended the plugin repository dialog to allow to hide unwanted entries and cleanup the plugin downloads area.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1305 "KeepHidden": False,
5739
a870f5f03baa Added an option to the plug-in manager to cleanup the plug-ins download area during startup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
1306 "StartupCleanup": True,
8989
25cd4c5f1f19 Added code to check and install all of the plugin dependencies (e.g. after upgrading a virtual environment to a new Python version).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8981
diff changeset
1307 "AutoInstallDependencies": True,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1308 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1309
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1310 # defaults for the printer settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1311 graphicsDefaults = {
7529
2b8a0d8ba12a UML Diagrams: added support for dark color scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7521
diff changeset
1312 "Font": "SansSerif,10,-1,5,50,0,0,0,0,0",
2b8a0d8ba12a UML Diagrams: added support for dark color scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7521
diff changeset
1313 "DrawingMode": "automatic",
2b8a0d8ba12a UML Diagrams: added support for dark color scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7521
diff changeset
1314 # automatic - determine mode depending upon desktop scheme
2b8a0d8ba12a UML Diagrams: added support for dark color scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7521
diff changeset
1315 # black_white - black items on white background
2b8a0d8ba12a UML Diagrams: added support for dark color scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7521
diff changeset
1316 # white_black - white items on black background
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1317 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1318
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1319 # defaults for the icon editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1320 iconEditorDefaults = {
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1321 "IconEditorState": QByteArray(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1322 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1323
3207
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3200
diff changeset
1324 # defaults for pyflakes
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3200
diff changeset
1325 pyflakesDefaults = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1326 "IncludeInSyntaxCheck": True,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1327 "IgnoreStarImportWarnings": True,
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
1328 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1329
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
1330 # defaults for tray starter
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
1331 trayStarterDefaults = {
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7529
diff changeset
1332 "TrayStarterIcon": "erict",
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7529
diff changeset
1333 # valid values are: erict, erict-hc,
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7529
diff changeset
1334 # erict-bw, erict-bwi
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
1335 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1336
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1337 # defaults for geometry
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1338 geometryDefaults = {
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1339 "HelpViewerGeometry": QByteArray(),
4341
1ff0929aab09 Added our own web inspector window to overcome a Qt weekness.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4335
diff changeset
1340 "HelpInspectorGeometry": QByteArray(),
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
1341 "WebBrowserGeometry": QByteArray(),
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1342 "IconEditorGeometry": QByteArray(),
4650
b1ca3bcde70b First commit for the new hex editor tool.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
1343 "HexEditorGeometry": QByteArray(),
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1344 "MainGeometry": QByteArray(),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1345 "MainMaximized": False,
4781
15d416f1eca5 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4779
diff changeset
1346 "WebInspectorGeometry": QByteArray(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1347 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1348
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1349 # if true, revert layouts to factory defaults
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1350 resetLayout = False
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1351
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1352 # defaults for IRC
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1353 ircDefaults = {
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1354 "ShowTimestamps": True,
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1355 "TimestampIncludeDate": False,
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1356 "TimeFormat": "hh:mm",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1357 "DateFormat": "yyyy-MM-dd",
2267
60796f6374af Changed the default color for IRC network messages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2262
diff changeset
1358 "NetworkMessageColour": "#000055",
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1359 "ServerMessageColour": "#91640A",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1360 "ErrorMessageColour": "#FF0000",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1361 "TimestampColour": "#709070",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1362 "HyperlinkColour": "#0000FF",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1363 "ChannelMessageColour": "#000000",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1364 "OwnNickColour": "#000000",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1365 "NickColour": "#18B33C",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1366 "JoinChannelColour": "#72D672",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1367 "LeaveChannelColour": "#B00000",
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1368 "ChannelInfoColour": "#9E54B3",
2228
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1369 "EnableIrcColours": True,
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1370 "IrcColor0": "#FFFF00",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1371 "IrcColor1": "#000000",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1372 "IrcColor2": "#000080",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1373 "IrcColor3": "#008000",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1374 "IrcColor4": "#FF0000",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1375 "IrcColor5": "#A52A2A",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1376 "IrcColor6": "#800080",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1377 "IrcColor7": "#FF8000",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1378 "IrcColor8": "#808000",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1379 "IrcColor9": "#00FF00",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1380 "IrcColor10": "#008080",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1381 "IrcColor11": "#00FFFF",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1382 "IrcColor12": "#0000FF",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1383 "IrcColor13": "#FFC0CB",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1384 "IrcColor14": "#A0A0A0",
5c59b9393306 Introduced support for colored IRC texts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2227
diff changeset
1385 "IrcColor15": "#C0C0C0",
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1386 "ShowNotifications": True,
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1387 "NotifyJoinPart": True,
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1388 "NotifyMessage": False,
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1389 "NotifyNick": False,
2247
bddb4557c97e Added the auto who configuration.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2228
diff changeset
1390 "AutoUserInfoLookup": True,
bddb4557c97e Added the auto who configuration.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2228
diff changeset
1391 "AutoUserInfoMax": 200,
bddb4557c97e Added the auto who configuration.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2228
diff changeset
1392 "AutoUserInfoInterval": 90,
2257
4c3bda2b71f2 Made the IRC marker line colors configurable and added a config option to not set a marker when the chat window is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2247
diff changeset
1393 "MarkPositionWhenHidden": True,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1394 "MarkerLineForegroundColour": "#000000", # Black on
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1395 "MarkerLineBackgroundColour": "#ffff00", # Yellow
2299
73285f9b53d4 Added an option to confirm a shutdown of eric5 when there is still a connection to an IRC server.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2298
diff changeset
1396 "AskOnShutdown": True,
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
1397 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1398
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
1399 # defaults for Hex Editor
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
1400 hexEditorDefaults = {
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
1401 "HexEditorState": QByteArray(),
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1402 "AddressAreaWidth": 4,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1403 "ShowAddressArea": True,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1404 "ShowAsciiArea": True,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1405 "OpenInOverwriteMode": True,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1406 "OpenReadOnly": False,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1407 "HighlightChanges": True,
4695
9dc08852de25 Added a 'Recent Files' menu to the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
1408 "RecentNumber": 9,
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
1409 }
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1410 if Globals.isWindowsPlatform():
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1411 hexEditorDefaults["Font"] = "Courier,10,-1,5,50,0,0,0,0,0"
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1412 else:
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
1413 hexEditorDefaults["Font"] = "Monospace,10,-1,5,50,0,0,0,0,0"
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1414
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1415 # defaults for Diff colors
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1416 diffColourDefaults = {
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1417 "TextColor": QColor(0, 0, 0),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1418 "AddedColor": QColor(190, 237, 190),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1419 "RemovedColor": QColor(237, 190, 190),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1420 "ReplacedColor": QColor(190, 190, 237),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1421 "ContextColor": QColor(255, 220, 168),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1422 "HeaderColor": QColor(237, 237, 190),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1423 "BadWhitespaceColor": QColor(255, 0, 0, 192),
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
1424 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1425
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
1426 # defaults for Code Documentation Viewer
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
1427 docuViewerDefaults = {
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
1428 "Provider": "disabled",
5919
d0de2b378b24 Improved and beautified the rich text display of the documentation viewer some more.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5914
diff changeset
1429 "ShowInfoOnOpenParenthesis": True,
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
1430 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1431
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
1432 # defaults for conda
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
1433 condaDefaults = {
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
1434 "CondaExecutable": "",
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
1435 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1436
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
1437 # defaults for pip
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
1438 pipDefaults = {
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1439 "PipSearchIndex": "", # used by the search command
7726
b1ade4fcf05f Pip Interface: added an option to not show 'conda' managed environments in the selector.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7718
diff changeset
1440 "ExcludeCondaEnvironments": True,
b1ade4fcf05f Pip Interface: added an option to not show 'conda' managed environments in the selector.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7718
diff changeset
1441 # don't show conda environments in selector
8977
663521af48b2 Started implementing a vulnerability checker based on the data of the Safety DB.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8973
diff changeset
1442 # defaults for the package vulnerability check
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1443 "VulnerabilityDbMirror": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1444 "https://raw.githubusercontent.com/pyupio/safety-db/master/data/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1445 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1446 "VulnerabilityDbCacheValidity": 60 * 60 * 6, # 6 hours
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
1447 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1448
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1449 # defaults for MicroPython
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1450 microPythonDefaults = {
8067
a467ab075be0 MicroPython: added buttons to go to the 'home' directory (local and on device) to the MicroPython file manager and improved the workspace handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8059
diff changeset
1451 "MpyWorkspace": "",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1452 "SerialTimeout": 2000, # timeout in milliseconds
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1453 "ReplLineWrap": True, # wrap the REPL lines
7135
44fcfc99b864 MicroPython: added an option to synchronize the device time to the host time after connecting the serial port.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7108
diff changeset
1454 "SyncTimeAfterConnect": True,
7137
4ed2573947ff MicroPythonFileManagerWidget: added option to show hidden files to the local and device files list context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7135
diff changeset
1455 "ShowHiddenLocal": True,
4ed2573947ff MicroPythonFileManagerWidget: added option to show hidden files to the local and device files list context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7135
diff changeset
1456 "ShowHiddenDevice": True,
9498
d48061567354 MicroPython
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9482
diff changeset
1457 "EnableManualDeviceSelection": False,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1458 "ChartColorTheme": -1, # -1 = automatic,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1459 # QChart.ChartTheme otherwise
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1460 "MpyCrossCompiler": "", # path of the mpy-cross compiler
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1461 "DfuUtilPath": "", # path of the dfu-util flashing tool
7592
f79dc58bdf62 MicroPython: added a dialog zo ignore unknown serial devices and to manage this list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7570
diff changeset
1462 "IgnoredUnknownDevices": "[]", # empty list encoded as JSON
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1463 "ManualDevices": "[]", # empty list encoded as JSON
8038
73ec029d4107 MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
1464 # MicroPython URLs
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1465 "MicroPythonDocuUrl": "https://docs.micropython.org/en/latest/",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1466 "MicroPythonFirmwareUrl": "http://micropython.org/download/",
8038
73ec029d4107 MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
1467 # CircuitPython URLS
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1468 "CircuitPythonDocuUrl": "https://circuitpython.readthedocs.io/en/latest/",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1469 "CircuitPythonFirmwareUrl": "https://circuitpython.org/downloads/",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1470 "CircuitPythonLibrariesUrl": "https://circuitpython.org/libraries",
8038
73ec029d4107 MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
1471 # BBC micro:bit URLs
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1472 "MicrobitDocuUrl": "https://microbit-micropython.readthedocs.io/en/latest/",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1473 "MicrobitFirmwareUrl": "https://microbit.org/guide/firmware/",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1474 "MicrobitMicroPythonUrl": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1475 "https://github.com/bbcmicrobit/micropython/releases/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1476 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1477 "MicrobitV2MicroPythonUrl": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1478 "https://github.com/microbit-foundation/micropython-microbit-v2/releases/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1479 ),
8038
73ec029d4107 MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
1480 # calliope mini URLS
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1481 "CalliopeDocuUrl": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1482 "https://github.com/calliope-mini/calliope-mini-micropython/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1483 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1484 "CalliopeDAPLinkUrl": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1485 "https://github.com/calliope-mini/production-test/releases/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1486 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1487 "CalliopeMicroPythonUrl": (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1488 "https://github.com/calliope-mini/calliope-mini-micropython/"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1489 ),
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1490 }
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1491 if Globals.isWindowsPlatform():
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1492 microPythonDefaults["ColorScheme"] = "Windows 10"
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1493 elif Globals.isMacPlatform():
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1494 microPythonDefaults["ColorScheme"] = "xterm"
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1495 else:
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1496 microPythonDefaults["ColorScheme"] = "Ubuntu"
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1497
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1498 # defaults for Python specific settings
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1499 pythonDefaults = {
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: 8109
diff changeset
1500 "ASTViewerErrorColor": QColor(Qt.GlobalColor.darkRed),
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: 8109
diff changeset
1501 "DisViewerErrorColor": QColor(Qt.GlobalColor.darkRed),
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: 8109
diff changeset
1502 "DisViewerCurrentColor": QColor(Qt.GlobalColor.darkMagenta),
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: 8109
diff changeset
1503 "DisViewerLabeledColor": QColor(Qt.GlobalColor.darkGreen),
7711
5e6792b85a8a Added capability to show information about a code object.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7705
diff changeset
1504 "DisViewerExpandCodeInfoDetails": False,
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1505 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1506
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1507 # defaults for the jedi interface
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1508 jediDefaults = {
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1509 "JediCompletionsEnabled": True,
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1510 "JediFuzzyCompletionsEnabled": False,
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1511 "JediCalltipsEnabled": True,
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1512 "MouseClickEnabled": True,
8767
d82b6440eb61 Changed the Jedi mouse click default to be 'Alt + Left Button' in order to free 'Ctrl + Left Button' for rectangular selection via mouse.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8727
diff changeset
1513 "MouseClickGotoModifiers": Qt.KeyboardModifier.AltModifier,
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1514 "MouseClickGotoButton": Qt.MouseButton.LeftButton,
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
1515 }
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1516
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1517
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1518 def readToolGroups():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1519 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1520 Module function to read the tool groups configuration.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1521
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1522 @return list of tuples defing the tool groups
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1523 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1524 toolGroups = []
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1525 groups = int(Prefs.settings.value("Toolgroups/Groups", 0))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1526 for groupIndex in range(groups):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1527 groupName = Prefs.settings.value("Toolgroups/{0:02d}/Name".format(groupIndex))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1528 group = [groupName, []]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1529 items = int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1530 Prefs.settings.value("Toolgroups/{0:02d}/Items".format(groupIndex), 0)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1531 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1532 for ind in range(items):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1533 menutext = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1534 "Toolgroups/{0:02d}/{1:02d}/Menutext".format(groupIndex, ind)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1535 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1536 icon = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1537 "Toolgroups/{0:02d}/{1:02d}/Icon".format(groupIndex, ind)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1538 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1539 executable = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1540 "Toolgroups/{0:02d}/{1:02d}/Executable".format(groupIndex, ind)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1541 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1542 arguments = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1543 "Toolgroups/{0:02d}/{1:02d}/Arguments".format(groupIndex, ind)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1544 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1545 redirect = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1546 "Toolgroups/{0:02d}/{1:02d}/Redirect".format(groupIndex, ind)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1547 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1548
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1549 if menutext:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1550 if menutext == "--":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1551 tool = {
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1552 "menutext": "--",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1553 "icon": "",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1554 "executable": "",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1555 "arguments": "",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1556 "redirect": "no",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1557 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1558 group[1].append(tool)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1559 elif executable:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1560 tool = {
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1561 "menutext": menutext,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1562 "icon": icon,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1563 "executable": executable,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1564 "arguments": arguments,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1565 "redirect": redirect,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1566 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1567 group[1].append(tool)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1568 toolGroups.append(group)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1569 currentGroup = int(Prefs.settings.value("Toolgroups/Current Group", -1))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1570 return toolGroups, currentGroup
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1571
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1572
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1573 def saveToolGroups(toolGroups, currentGroup):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1574 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1575 Module function to write the tool groups configuration.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1576
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1577 @param toolGroups reference to the list of tool groups
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1578 @param currentGroup index of the currently selected tool group (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1579 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1580 # first step, remove all tool group entries
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1581 Prefs.settings.remove("Toolgroups")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1582
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1583 # second step, write the tool group entries
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1584 Prefs.settings.setValue("Toolgroups/Groups", len(toolGroups))
8220
006ee31b4835 Applied some more code simplifications suggested by the new Simplify checker (Y113: use enumerate()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8207
diff changeset
1585 for groupIndex, group in enumerate(toolGroups):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1586 Prefs.settings.setValue("Toolgroups/{0:02d}/Name".format(groupIndex), group[0])
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1587 Prefs.settings.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1588 "Toolgroups/{0:02d}/Items".format(groupIndex), len(group[1])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1589 )
8220
006ee31b4835 Applied some more code simplifications suggested by the new Simplify checker (Y113: use enumerate()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8207
diff changeset
1590 for ind, tool in enumerate(group[1]):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1591 Prefs.settings.setValue(
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1592 "Toolgroups/{0:02d}/{1:02d}/Menutext".format(groupIndex, ind),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1593 tool["menutext"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1594 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1595 Prefs.settings.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1596 "Toolgroups/{0:02d}/{1:02d}/Icon".format(groupIndex, ind), tool["icon"]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1597 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1598 Prefs.settings.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1599 "Toolgroups/{0:02d}/{1:02d}/Executable".format(groupIndex, ind),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1600 tool["executable"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1601 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1602 Prefs.settings.setValue(
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1603 "Toolgroups/{0:02d}/{1:02d}/Arguments".format(groupIndex, ind),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1604 tool["arguments"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1605 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1606 Prefs.settings.setValue(
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1607 "Toolgroups/{0:02d}/{1:02d}/Redirect".format(groupIndex, ind),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1608 tool["redirect"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1609 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1610 Prefs.settings.setValue("Toolgroups/Current Group", currentGroup)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1611
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1612
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1613 def initPreferences():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1614 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1615 Module function to initialize the central configuration store.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1616 """
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
1617 from eric7.EricWidgets.EricApplication import ericApp
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1618
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1619 Prefs.settings = QSettings(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1620 QSettings.Format.IniFormat,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1621 QSettings.Scope.UserScope,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1622 Globals.settingsNameOrganization,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1623 Globals.settingsNameGlobal,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1624 ericApp(),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1625 )
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1626 if not Globals.isWindowsPlatform():
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1627 hp = QDir.homePath()
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1628 dn = QDir(hp)
8314
e3642a6a1e71 Finished renaming eric6 to eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
1629 dn.mkdir(".eric7")
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1630 QCoreApplication.setOrganizationName(Globals.settingsNameOrganization)
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
1631 QCoreApplication.setApplicationName(Globals.settingsNameGlobal)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1632
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3060
diff changeset
1633 Prefs.settings.value("UI/SingleApplicationMode")
8637
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1634
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1635
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1636 def getSettings():
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1637 """
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1638 Function to get a reference to the settings object.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1639
8637
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1640 @return reference to the settings object
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1641 @rtype QSettings
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1642 """
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1643 return Prefs.settings
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8624
diff changeset
1644
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1645
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1646 def syncPreferences():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1647 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1648 Module function to sync the preferences to disk.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1649
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1650 In addition to syncing, the central configuration store is reinitialized
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1651 as well.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1652 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1653 Prefs.settings.sync()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1654
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1655
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1656 def exportPreferences():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1657 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1658 Module function to export the current preferences.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1659 """
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8354
diff changeset
1660 filename, selectedFilter = EricFileDialog.getSaveFileNameAndFilter(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1661 None,
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1662 QCoreApplication.translate("Preferences", "Export Preferences"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1663 "",
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
1664 QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1665 "Preferences", "Properties File (*.ini);;All Files (*)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1666 ),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1667 None,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1668 EricFileDialog.DontConfirmOverwrite,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1669 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1670 if filename:
9152
8a68afaf1ba2 Started replacing the use of "QFileInfo()" with Python equivalents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9038
diff changeset
1671 fpath = pathlib.Path(filename)
8a68afaf1ba2 Started replacing the use of "QFileInfo()" with Python equivalents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9038
diff changeset
1672 if not fpath.suffix:
773
e3b3c9a545d1 Changed the settings import and export functions to propose a *.ini extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 748
diff changeset
1673 ex = selectedFilter.split("(*")[1].split(")")[0]
e3b3c9a545d1 Changed the settings import and export functions to propose a *.ini extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 748
diff changeset
1674 if ex:
9152
8a68afaf1ba2 Started replacing the use of "QFileInfo()" with Python equivalents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9038
diff changeset
1675 fpath = fpath.with_suffix(ex)
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1676 settingsFile = Prefs.settings.fileName()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1677 Prefs.settings = None
9152
8a68afaf1ba2 Started replacing the use of "QFileInfo()" with Python equivalents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9038
diff changeset
1678 shutil.copy(settingsFile, fpath)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1679 initPreferences()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1680
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1681
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1682 def importPreferences():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1683 """
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
1684 Module function to from eric7 import Preferences from a file previously saved by
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1685 the export function.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1686 """
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8354
diff changeset
1687 filename = EricFileDialog.getOpenFileName(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1688 None,
9421
989ee2535d59 Git Interface and Mercurial Interface
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
1689 QCoreApplication.translate("Preferences", "Import Preferences"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1690 "",
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
1691 QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1692 "Preferences", "Properties File (*.ini);;All Files (*)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1693 ),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1694 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1695 if filename:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1696 settingsFile = Prefs.settings.fileName()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1697 shutil.copy(filename, settingsFile)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1698 initPreferences()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1699
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1700
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1701 def isConfigured():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1702 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1703 Module function to check, if the the application has been configured.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1704
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1705 @return flag indicating the configured status (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1706 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1707 return toBool(Prefs.settings.value("General/Configured", False))
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1708
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1709
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1710 def setConfigured():
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1711 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1712 Function to set the configured flag.
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1713 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1714 Prefs.settings.setValue("General/Configured", True)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1715
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1716
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1717 def initRecentSettings():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1718 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1719 Module function to initialize the central configuration store for recently
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1720 opened files and projects.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1721
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1722 This function is called once upon import of the module.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1723 """
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
1724 Prefs.rsettings = QSettings(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1725 QSettings.Format.IniFormat,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1726 QSettings.Scope.UserScope,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1727 Globals.settingsNameOrganization,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1728 Globals.settingsNameRecent,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1729 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1730
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1731
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1732 def getVarFilters():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1733 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1734 Module function to retrieve the variables filter settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1735
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2905
diff changeset
1736 @return a tuple defining the variables filter
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1737 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1738 localsFilter = ast.literal_eval(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1739 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1740 "Variables/LocalsFilter", Prefs.varDefaults["LocalsFilter"]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1741 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1742 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1743 globalsFilter = ast.literal_eval(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1744 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1745 "Variables/GlobalsFilter", Prefs.varDefaults["GlobalsFilter"]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1746 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1747 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1748 return (localsFilter, globalsFilter)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1749
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1750
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1751 def setVarFilters(filters):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1752 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1753 Module function to store the variables filter settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1754
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
1755 @param filters variable filters to set
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1756 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1757 Prefs.settings.setValue("Variables/LocalsFilter", str(filters[0]))
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1758 Prefs.settings.setValue("Variables/GlobalsFilter", str(filters[1]))
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1759
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1760
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1761 def getDebugger(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1762 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1763 Module function to retrieve the debugger settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1764
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1765 @param key the key of the value to get
8539
24daea9ad41b Editor: added code to move a breakpoint to a line actually creating some byte code (Python only).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8538
diff changeset
1766 @type str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1767 @return the requested debugger setting
8539
24daea9ad41b Editor: added code to move a breakpoint to a line actually creating some byte code (Python only).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8538
diff changeset
1768 @rtype Any
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1769 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1770 if key in (
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1771 "RemoteDbgEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1772 "PassiveDbgEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1773 "AutomaticReset",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1774 "DebugEnvironmentReplace",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1775 "PythonRedirect",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1776 "PythonNoEncoding",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1777 "Python3Redirect",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1778 "Python3NoEncoding",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1779 "RubyRedirect",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1780 "ConsoleDbgEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1781 "PathTranslation",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1782 "Autosave",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1783 "ThreeStateBreakPoints",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1784 "BreakAlways",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1785 "IntelligentBreakpoints",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1786 "AutoViewSourceCode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1787 "ShowExceptionInShell",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1788 "MultiProcessEnabled",
9522
f46abb15aab2 Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9514
diff changeset
1789 "NetworkPortFixed",
f46abb15aab2 Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9514
diff changeset
1790 "NetworkPortIncrement",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1791 ):
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1792 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1793 Prefs.settings.value("Debugger/" + key, Prefs.debuggerDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1794 )
9522
f46abb15aab2 Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9514
diff changeset
1795 elif key in ("PassiveDbgPort", "MaxVariableSize", "RecentNumber", "NetworkPort"):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1796 return int(Prefs.settings.value("Debugger/" + key, Prefs.debuggerDefaults[key]))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
1797 elif key in ["AllowedHosts"]:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
1798 return toList(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1799 Prefs.settings.value("Debugger/" + key, Prefs.debuggerDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1800 )
2573
71837b5366d5 Search for interpreter on startup, avoid 'not found' message and switch to opposite interpreter.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2552
diff changeset
1801 elif key in ["PythonInterpreter", "Python3Interpreter"]:
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1802 # This code is here to ensure backward compatibility.
7635
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
1803 # Keep "PythonInterpreter" for backward compatibility.
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
1804 newKey = "Python3VirtualEnv"
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1805 venvName = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1806 "Debugger/" + newKey, Prefs.debuggerDefaults[newKey]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1807 )
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1808 if venvName:
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1809 try:
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8354
diff changeset
1810 virtualenvManager = ericApp().getObject("VirtualEnvManager")
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1811 except KeyError:
9482
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
1812 from eric7.VirtualEnv.VirtualenvManager import ( # __IGNORE_WARNING__
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
1813 VirtualenvManager,
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
1814 )
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1815
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1816 virtualenvManager = VirtualenvManager()
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1817 interpreter = virtualenvManager.getVirtualenvInterpreter(venvName)
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1818 else:
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6305
diff changeset
1819 interpreter = ""
1162
ab292b7f4f8a Added code to search for a Python2 interpreter in some known places. If none is found, the user can configure it on the Debugger, Python config page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1127
diff changeset
1820 if not interpreter:
9016
6f079c524e99 Changed occurrences of sys.executable with a method to get rid of the "w" on Windows and macOS systems (i.e. change pythonw to python).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8994
diff changeset
1821 return Globals.getPythonExecutable()
1162
ab292b7f4f8a Added code to search for a Python2 interpreter in some known places. If none is found, the user can configure it on the Debugger, Python config page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1127
diff changeset
1822 return interpreter
7635
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
1823 elif key == "DebugClientType3":
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1824 debugClientType = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1825 "Debugger/" + key, Prefs.debuggerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1826 )
5247
1fb624677956 Remove obsolete threaded option from preferences.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5239
diff changeset
1827 # Correct obsolete entry "threaded"
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1828 if debugClientType == "threaded":
5247
1fb624677956 Remove obsolete threaded option from preferences.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5239
diff changeset
1829 return "standard"
1fb624677956 Remove obsolete threaded option from preferences.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5239
diff changeset
1830 else:
1fb624677956 Remove obsolete threaded option from preferences.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5239
diff changeset
1831 return debugClientType
8816
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1832 elif key in ["BgColorNew", "BgColorChanged"]:
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1833 col = Prefs.settings.value("Debugger/" + key)
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1834 if col is not None:
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1835 return QColor(col)
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1836 else:
8823
eaf5196fb2a3 Corrected a copy & paste related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8822
diff changeset
1837 return Prefs.debuggerDefaults[key]
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
1838 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1839 return Prefs.settings.value("Debugger/" + key, Prefs.debuggerDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1840
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1841
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1842 def setDebugger(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1843 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1844 Module function to store the debugger settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1845
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1846 @param key the key of the setting to be set
8539
24daea9ad41b Editor: added code to move a breakpoint to a line actually creating some byte code (Python only).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8538
diff changeset
1847 @type str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1848 @param value the value to be set
8539
24daea9ad41b Editor: added code to move a breakpoint to a line actually creating some byte code (Python only).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8538
diff changeset
1849 @type Any
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1850 """
8816
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1851 if key in ["BgColorNew", "BgColorChanged"]:
8822
c6242c28d99d Corrected saving color names containing an alpha channel.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8816
diff changeset
1852 Prefs.settings.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1853 "Debugger/" + key, value.name(QColor.NameFormat.HexArgb)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1854 )
8816
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1855 else:
299d3e6ee2cd Fixed wrong handling of some color settings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8767
diff changeset
1856 Prefs.settings.setValue("Debugger/" + key, value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1857
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1858
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1859 def getPython(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1860 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1861 Module function to retrieve the Python settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1862
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1863 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1864 @return the requested debugger setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1865 """
7635
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
1866 if key == "Python3Extensions":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1867 exts = []
8574
e5d88ab9d84d Fixed some issues in the changed Preferences module.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8571
diff changeset
1868 for ext in getDebugger(key).split():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1869 if ext.startswith("."):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1870 exts.append(ext)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1871 else:
426
161992758137 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 405
diff changeset
1872 exts.append(".{0}".format(ext))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1873 return exts
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1874 elif key in (
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1875 "ASTViewerErrorColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1876 "DisViewerErrorColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1877 "DisViewerCurrentColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1878 "DisViewerLabeledColor",
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1879 ):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1880 return QColor(Prefs.settings.value("Python/" + key, Prefs.pythonDefaults[key]))
7711
5e6792b85a8a Added capability to show information about a code object.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7705
diff changeset
1881 elif key in ("DisViewerExpandCodeInfoDetails"):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1882 return toBool(Prefs.settings.value("Python/" + key, Prefs.pythonDefaults[key]))
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1883 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1884 return Prefs.settings.value("Python/" + key, Prefs.pythonDefaults[key])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1885
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1886
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1887 def setPython(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1888 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1889 Module function to store the Python settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1890
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1891 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1892 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1893 """
7635
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
1894 if key == "Python3Extensions":
8574
e5d88ab9d84d Fixed some issues in the changed Preferences module.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8571
diff changeset
1895 setDebugger(key, value)
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1896 elif key in (
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1897 "ASTViewerErrorColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1898 "DisViewerErrorColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1899 "DisViewerCurrentColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1900 "DisViewerLabeledColor",
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1901 ):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1902 val = "#{0:8x}".format(value.rgba()) if value.alpha() < 255 else value.name()
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1903 Prefs.settings.setValue("Python/" + key, val)
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
1904 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1905 Prefs.settings.setValue("Python/" + key, value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1906
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1907
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1908 def getUILanguage():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1909 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1910 Module function to retrieve the language for the user interface.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1911
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1912 @return the language for the UI
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1913 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1914 lang = Prefs.settings.value("UI/Language", Prefs.uiDefaults["Language"])
8205
4a0f1f896341 Applied some code simplifications suggested by the new Simplify checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8143
diff changeset
1915 if lang in ("None", "", None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1916 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1917 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1918 return lang
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1919
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1920
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1921 def setUILanguage(lang):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1922 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1923 Module function to store the language for the user interface.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1924
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1925 @param lang the language
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1926 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1927 if lang is None:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1928 Prefs.settings.setValue("UI/Language", "None")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1929 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1930 Prefs.settings.setValue("UI/Language", lang)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1931
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1932
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1933 def getViewManager():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1934 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1935 Module function to retrieve the selected viewmanager type.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1936
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1937 @return the viewmanager type
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1938 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1939 return Prefs.settings.value("UI/ViewManager", Prefs.uiDefaults["ViewManager"])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1940
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1941
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1942 def setViewManager(vm):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1943 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1944 Module function to store the selected viewmanager type.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1945
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1946 @param vm the viewmanager type
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1947 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1948 Prefs.settings.setValue("UI/ViewManager", vm)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1949
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
1950
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
1951 def getUI(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1952 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1953 Module function to retrieve the various UI settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1954
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1955 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1956 @return the requested UI setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1957 """
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
1958 if key in [
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1959 "BrowsersListFoldersFirst",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1960 "BrowsersHideNonPublic",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1961 "BrowsersListContentsByOccurrence",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1962 "BrowsersListHiddenFiles",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1963 "BrowserShowCoding",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1964 "LogViewerAutoRaise",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1965 "SingleApplicationMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1966 "TabViewManagerFilenameOnly",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1967 "ShowFilePreview",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1968 "ShowFilePreviewJS",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1969 "ShowFilePreviewSSI",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1970 "CaptionShowsFilename",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1971 "ShowSplash",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1972 "SplitOrientationVertical",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1973 "DynamicOnlineCheck",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1974 "UseProxy",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1975 "UseSystemProxy",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1976 "UseHttpProxyForAll",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1977 "RequestDownloadFilename",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1978 "CheckErrorLog",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1979 "OpenCrashSessionOnStartup",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1980 "CrashSessionEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1981 "ShowCodeDocumentationViewer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1982 "ShowPyPIPackageManager",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1983 "ShowCondaPackageManager",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1984 "ShowCooperation",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1985 "ShowIrc",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1986 "ShowTemplateViewer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1987 "ShowFileBrowser",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1988 "ShowSymbolsViewer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1989 "ShowNumbersViewer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1990 "ShowMicroPython",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1991 "ShowFindFileWidget",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1992 "ShowFindLocationWidget",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1993 "ShowInternalHelpViewer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1994 "UseNativeMenuBar",
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
1995 "CombinedLeftRightSidebar",
9534
5ed8445f3b31 Improved the file type determination (i.e. is it text) and added a configurable option to even load files, whose type cannot be determine as being text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9531
diff changeset
1996 "LoadUnknownMimeTypeFiles",
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
1997 ]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
1998 return toBool(Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key]))
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
1999 elif key in [
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2000 "TabViewManagerFilenameLength",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2001 "CaptionFilenameLength",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2002 "ProxyPort/Http",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2003 "ProxyPort/Https",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2004 "ProxyPort/Ftp",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2005 "OpenOnStartup",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2006 "PerformVersionCheck",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2007 "RecentNumber",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2008 "NotificationTimeout",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2009 "UpgraderDelay",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2010 "KeyboardInputInterval",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2011 "BackgroundServiceProcesses",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2012 "MinimumMessageTypeSeverity",
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
2013 ]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2014 return int(Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key]))
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
2015 elif key in [
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2016 "ProxyType/Ftp",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2017 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2018 return EricFtpProxyType(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2019 int(Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key].value))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2020 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2021 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2022 "ProxyPassword/Http",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2023 "ProxyPassword/Https",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2024 "ProxyPassword/Ftp",
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
2025 ]:
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
2026 return pwConvert(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2027 Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key]), encode=False
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2028 )
8583
aac629a05f8b Modernized the look of the side bars.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8582
diff changeset
2029 elif key in ("LogStdErrColour", "IconBarColor"):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2030 col = Prefs.settings.value("UI/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2031 if col is not None:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2032 return QColor(col)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2033 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2034 return Prefs.uiDefaults[key]
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
2035 elif key in "ViewProfiles":
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2036 profilesStr = Prefs.settings.value("UI/ViewProfiles")
6300
cfb21ace8d09 Fixed an issue causing the visibility settings of the right side bar being overwritten.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6299
diff changeset
2037 if profilesStr is None:
5523
4ca7f05b1efe Removed some obsolete code in the Preferences file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5519
diff changeset
2038 # use the defaults
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2039 viewProfiles = Prefs.uiDefaults["ViewProfiles"]
5523
4ca7f05b1efe Removed some obsolete code in the Preferences file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5519
diff changeset
2040 else:
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2041 viewProfiles = {}
6300
cfb21ace8d09 Fixed an issue causing the visibility settings of the right side bar being overwritten.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6299
diff changeset
2042 profiles = json.loads(profilesStr)
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2043 for name in ["edit", "debug"]:
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2044 viewProfiles[name] = [
4331
711e7c35a49b Changed code to make eric compatible to PyQt 5.5 (QByteArry issue).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4304
diff changeset
2045 QByteArray.fromBase64(profiles[name][0].encode("utf-8")),
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2046 profiles[name][1][:],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2047 [],
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2048 ]
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
2049 if len(profiles[name][2]) == 6:
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
2050 del profiles[name][2][2]
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
2051 for bs in profiles[name][2][:2]:
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
2052 # splitters
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2053 viewProfiles[name][2].append(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2054 QByteArray.fromBase64(bs.encode("utf-8"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2055 )
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
2056 viewProfiles[name][2] += profiles[name][2][2:] # side bars
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2057 return viewProfiles
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
2058 elif key in ["ToolbarManagerState", "PreviewSplitterState"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2059 state = Prefs.settings.value("UI/" + key)
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
2060 if state is not None:
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2412
diff changeset
2061 return state
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2062 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2063 return Prefs.uiDefaults[key]
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
2064 elif key in [
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2065 "LogViewerStdoutFilter",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2066 "LogViewerStderrFilter",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2067 "LogViewerStdxxxFilter",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2068 "TextMimeTypes",
9038
90bcfdd63d47 Added capability to configure use of an external "Find/Replace In Files" dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9016
diff changeset
2069 ]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2070 return toList(Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key]))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2071 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2072 return Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key])
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2073
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2074
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2075 def setUI(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2076 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2077 Module function to store the various UI settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2078
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2079 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2080 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2081 """
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
2082 if key == "ViewProfiles":
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2083 profiles = {}
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2084 for name in ["edit", "debug"]:
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2085 profiles[name] = [
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2086 bytes(value[name][0].toBase64()).decode(),
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2087 value[name][1][:],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2088 [],
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2089 ]
8722
2f57e52a704b Some optimizations for the sidebars layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8714
diff changeset
2090 for ba in value[name][2][:2]:
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
2091 # Splitters
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2537
diff changeset
2092 profiles[name][2].append(bytes(ba.toBase64()).decode())
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2093 profiles[name][2] += value[name][2][2:] # side bars
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2094 Prefs.settings.setValue("UI/" + key, json.dumps(profiles))
8583
aac629a05f8b Modernized the look of the side bars.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8582
diff changeset
2095 elif key in ("LogStdErrColour", "IconBarColor"):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2096 Prefs.settings.setValue("UI/" + key, value.name())
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2097 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2098 "ProxyPassword/Http",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2099 "ProxyPassword/Https",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2100 "ProxyPassword/Ftp",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2101 ]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2102 Prefs.settings.setValue("UI/" + key, pwConvert(value, encode=True))
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2103 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2104 "ProxyType/Ftp",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2105 ]:
8283
3139cbc98a14 Modernized some more code E5Ftp).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8265
diff changeset
2106 # value is an enum.Enum derived item
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2107 Prefs.settings.setValue("UI/" + key, value.value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2108 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2109 Prefs.settings.setValue("UI/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2110
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2111
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2112 def getIcons(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2113 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2114 Module function to retrieve the various Icons settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2115
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2116 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2117 @return the requested Icons setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2118 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2119 dirlist = Prefs.settings.value("UI/Icons/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2120 if dirlist is not None:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2121 return dirlist
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2122 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2123 return Prefs.iconsDefaults[key]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2124
7521
17974c348101 Icons page, Icons preview dialog: added option to select the default icons and extended preview functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7451
diff changeset
2125 if key in ["Path"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2126 return toList(Prefs.settings.value("UI/Icons/" + key, Prefs.iconsDefaults[key]))
7521
17974c348101 Icons page, Icons preview dialog: added option to select the default icons and extended preview functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7451
diff changeset
2127 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2128 return Prefs.settings.value("UI/Icons/" + key, Prefs.iconsDefaults[key])
7521
17974c348101 Icons page, Icons preview dialog: added option to select the default icons and extended preview functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7451
diff changeset
2129
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2130
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2131 def setIcons(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2132 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2133 Module function to store the various Icons settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2134
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2135 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2136 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2137 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2138 Prefs.settings.setValue("UI/Icons/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2139
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2140
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2141 def getCooperation(key):
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2142 """
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2143 Module function to retrieve the various Cooperation settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2144
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2145 @param key the key of the value to get
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2146 @return the requested UI setting
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2147 """
162
28f235c426c4 Added functionality to cut/copy/... the chat and to interactively accept/reject connections.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 149
diff changeset
2148 if key in ["AutoStartServer", "TryOtherPorts", "AutoAcceptConnections"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2149 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2150 Prefs.settings.value("Cooperation/" + key, Prefs.cooperationDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2151 )
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2152 elif key in ["ServerPort", "MaxPortsToTry"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2153 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2154 Prefs.settings.value("Cooperation/" + key, Prefs.cooperationDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2155 )
165
3302a726fd1e Added functionality to kick and ban users and to manage banned users.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 162
diff changeset
2156 elif key in ["BannedUsers"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2157 return toList(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2158 Prefs.settings.value("Cooperation/" + key, Prefs.cooperationDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2159 )
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2160 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2161 return Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2162 "Cooperation/" + key, Prefs.cooperationDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2163 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2164
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2165
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2166 def setCooperation(key, value):
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2167 """
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2168 Module function to store the various Cooperation settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2169
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2170 @param key the key of the setting to be set
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2171 @param value the value to be set
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2172 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2173 Prefs.settings.setValue("Cooperation/" + key, value)
149
a134031209be Added stage 1 of the cooperation functions (chat system).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 140
diff changeset
2174
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2175
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2176 def getEditor(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2177 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2178 Module function to retrieve the various editor settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2179
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2180 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2181 @return the requested editor setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2182 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2183 if key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2184 "DefaultEncoding",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2185 "DefaultOpenFilter",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2186 "DefaultSaveFilter",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2187 "SpellCheckingDefaultLanguage",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2188 "SpellCheckingPersonalWordList",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2189 "SpellCheckingPersonalExcludeList",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2190 "DocstringType",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2191 "PreviewMarkdownHTMLFormat",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2192 "PreviewRestDocutilsHTMLFormat",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2193 "WrapLongLinesMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2194 "WrapVisualFlag",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2195 "WrapIndentMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2196 "CallTipsStyle",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2197 "CallTipsPosition",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2198 "AutoCompletionSource",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2199 "EdgeMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2200 "EOLMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2201 "PythonBadIndentation",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2202 ]:
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
2203 # no special treatment for str and PyQt6 Enum
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2204 return Prefs.settings.value("Editor/" + key, Prefs.editorDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2205 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2206 "AutosaveInterval",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2207 "TabWidth",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2208 "IndentWidth",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2209 "WarnFilesize",
9405
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9357
diff changeset
2210 "RejectFilesize",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2211 "EdgeColumn",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2212 "CaretWidth",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2213 "CaretLineFrameWidth",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2214 "AutoCompletionThreshold",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2215 "AutoCompletionTimeout",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2216 "AutoCompletionCacheSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2217 "AutoCompletionCacheTime",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2218 "AutoCompletionWatchdogTime",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2219 "AutoCompletionMaxLines",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2220 "AutoCompletionMaxChars",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2221 "CallTipsVisible",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2222 "MarkOccurrencesTimeout",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2223 "SearchRegexpMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2224 "AutoSpellCheckChunkSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2225 "SpellCheckingMinWordSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2226 "PostScriptLevel",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2227 "ZoomFactor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2228 "WhitespaceSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2229 "OnlineSyntaxCheckInterval",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2230 "OnlineChangeTraceInterval",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2231 "WrapStartIndent",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2232 "VirtualSpaceOptions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2233 "PreviewRefreshWaitTimer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2234 "SourceOutlineWidth",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2235 "SourceOutlineStepSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2236 "FoldingStyle",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2237 "MouseHoverTimeout",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2238 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2239 return int(Prefs.settings.value("Editor/" + key, Prefs.editorDefaults[key]))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2240 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2241 "AdditionalOpenFilters",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2242 "AdditionalSaveFilters",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2243 "PreviewMarkdownFileNameExtensions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2244 "PreviewRestFileNameExtensions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2245 "PreviewHtmlFileNameExtensions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2246 "PreviewQssFileNameExtensions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2247 "FullSpellCheckExtensions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2248 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2249 return toList(Prefs.settings.value("Editor/" + key, Prefs.editorDefaults[key]))
7278
1820a0344b62 Editor: added configuration option to set the tab and indentation width for each languages separately (as an override to the global ones).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
2250 elif key == "TabIndentOverride":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2251 overrideStr = Prefs.settings.value("Editor/" + key, Prefs.editorDefaults[key])
7278
1820a0344b62 Editor: added configuration option to set the tab and indentation width for each languages separately (as an override to the global ones).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
2252 if overrideStr:
1820a0344b62 Editor: added configuration option to set the tab and indentation width for each languages separately (as an override to the global ones).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
2253 return json.loads(overrideStr)
1820a0344b62 Editor: added configuration option to set the tab and indentation width for each languages separately (as an override to the global ones).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
2254 else:
1820a0344b62 Editor: added configuration option to set the tab and indentation width for each languages separately (as an override to the global ones).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
2255 return {}
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2256 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2257 return toBool(Prefs.settings.value("Editor/" + key, Prefs.editorDefaults[key]))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2258
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2259
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2260 def setEditor(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2261 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2262 Module function to store the various editor settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2263
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2264 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2265 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2266 """
7278
1820a0344b62 Editor: added configuration option to set the tab and indentation width for each languages separately (as an override to the global ones).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
2267 if key == "TabIndentOverride":
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2268 Prefs.settings.setValue("Editor/" + key, json.dumps(value))
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
2269 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2270 Prefs.settings.setValue("Editor/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2271
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2272
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2273 def getEditorColour(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2274 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2275 Module function to retrieve the various editor marker colours.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2276
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2277 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2278 @return the requested editor colour
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2279 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2280 col = Prefs.settings.value("Editor/Colour/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2281 if col is not None:
942
1d2a6b8509c6 Added capability to configure the alpha channel for some colors (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 939
diff changeset
2282 if len(col) == 9:
1d2a6b8509c6 Added capability to configure the alpha channel for some colors (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 939
diff changeset
2283 # color string with alpha
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2284 return QColor.fromRgba(int(col[1:], 16))
942
1d2a6b8509c6 Added capability to configure the alpha channel for some colors (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 939
diff changeset
2285 else:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2286 return QColor(col)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2287 else:
8549
15eca21fd968 Changed some forgotten references to Qt5 to Qt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8539
diff changeset
2288 # palette based defaults here because of Qt6
2294
d041f6bcda5c Made a Qt5 related change to make the default settings values load independant of the creation of a QApplication object.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2267
diff changeset
2289 if key == "EditAreaForeground":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2290 return QApplication.palette().color(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2291 QPalette.ColorGroup.Active, QPalette.ColorRole.Base
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2292 )
2294
d041f6bcda5c Made a Qt5 related change to make the default settings values load independant of the creation of a QApplication object.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2267
diff changeset
2293 elif key == "EditAreaBackground":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2294 return QApplication.palette().color(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2295 QPalette.ColorGroup.Active, QPalette.ColorRole.Text
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2296 )
2294
d041f6bcda5c Made a Qt5 related change to make the default settings values load independant of the creation of a QApplication object.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2267
diff changeset
2297 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2298 return Prefs.editorColourDefaults[key]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2299
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2300
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2301 def setEditorColour(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2302 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2303 Module function to store the various editor marker colours.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2304
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2305 @param key the key of the colour to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2306 @param value the colour to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2307 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2308 val = value.name(QColor.NameFormat.HexArgb) if value.alpha() < 255 else value.name()
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2309 Prefs.settings.setValue("Editor/Colour/" + key, val)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2310
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2311
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2312 def getEditorOtherFonts(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2313 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2314 Module function to retrieve the various editor fonts except the lexer
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2315 fonts.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2316
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2317 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2318 @return the requested editor font (QFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2319 """
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2320 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2321 f.fromString(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2322 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2323 "Editor/Other Fonts/" + key, Prefs.editorOtherFontsDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2324 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2325 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2326 return f
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2327
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2328
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2329 def setEditorOtherFonts(key, font):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2330 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2331 Module function to store the various editor fonts except the lexer fonts.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2332
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2333 @param key the key of the font to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2334 @param font the font to be set (QFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2335 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2336 Prefs.settings.setValue("Editor/Other Fonts/" + key, font.toString())
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2337
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2338
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2339 def getEditorAPI(language, projectType=""):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2340 """
5349
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2341 Module function to retrieve the various lists of API files.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2342
5349
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2343 @param language language of the API list
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2344 @type str
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2345 @param projectType project type of the API list
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2346 @type str
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2347 @return requested list of API files
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2348 @rtype list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2349 """
8234
fcb6b4b96274 Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator) (batch 2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8228
diff changeset
2350 key = "{0}_{1}".format(language, projectType) if projectType else language
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2351 apis = Prefs.settings.value("Editor/APIs/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2352 if apis is not None:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2353 if len(apis) and apis[0] == "":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2354 return []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2355 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2356 return apis
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2357 else:
5349
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2358 if projectType:
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2359 # try again without project type
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2360 return getEditorAPI(language)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2361
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2362 return []
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2363
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2364
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2365 def setEditorAPI(language, projectType, apilist):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2366 """
5349
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2367 Module function to store the various lists of API files.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2368
5349
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2369 @param language language of the API list
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2370 @type str
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2371 @param projectType project type of the API list
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2372 @type str
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2373 @param apilist list of API files
bccda3b5920a Started implementing project type specific APIs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5247
diff changeset
2374 @type list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2375 """
8234
fcb6b4b96274 Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator) (batch 2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8228
diff changeset
2376 key = "{0}_{1}".format(language, projectType) if projectType else language
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2377 Prefs.settings.setValue("Editor/APIs/" + key, apilist)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2378
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2379
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2380 def getEditorKeywords(key):
130
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2381 """
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2382 Module function to retrieve the various lists of language keywords.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2383
130
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2384 @param key the key of the value to get
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2385 @return the requested list of language keywords (list of strings)
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2386 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2387 keywords = Prefs.settings.value("Editor/Keywords/" + key)
130
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2388 if keywords is not None:
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2389 return keywords
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2390 else:
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2391 return []
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2392
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2393
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2394 def setEditorKeywords(key, keywordsLists):
130
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2395 """
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2396 Module function to store the various lists of language keywords.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2397
130
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2398 @param key the key of the api to be set
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2399 @param keywordsLists the list of language keywords (list of strings)
fcce4cc20d95 Added capability to change the keywords of a syntax highlighter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 107
diff changeset
2400 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2401 Prefs.settings.setValue("Editor/Keywords/" + key, keywordsLists)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2402
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2403
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2404 def getEditorLexerAssocs():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2405 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2406 Module function to retrieve all lexer associations.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2407
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2408 @return a reference to the list of lexer associations
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2409 (dictionary of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2410 """
9482
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
2411 from eric7.QScintilla import Lexers
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
2412
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2413 editorLexerAssoc = {}
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2414 Prefs.settings.beginGroup("Editor/LexerAssociations")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2415 keyList = Prefs.settings.childKeys()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2416 Prefs.settings.endGroup()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2417
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
2418 editorLexerAssocDefaults = Lexers.getDefaultLexerAssociations()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2419
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2420 if len(keyList) == 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2421 # build from scratch
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10
diff changeset
2422 for key in list(editorLexerAssocDefaults.keys()):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2423 editorLexerAssoc[key] = editorLexerAssocDefaults[key]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2424 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2425 for key in keyList:
8259
2bbec88047dd Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8243
diff changeset
2426 defaultValue = editorLexerAssocDefaults.get(key, "")
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2427 editorLexerAssoc[key] = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2428 "Editor/LexerAssociations/" + key, defaultValue
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2429 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2430
993
03493183dd91 Added support for the Matlab and Octave lexers for QScintilla >= 2.5.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 992
diff changeset
2431 # check for new default lexer associations
03493183dd91 Added support for the Matlab and Octave lexers for QScintilla >= 2.5.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 992
diff changeset
2432 for key in list(editorLexerAssocDefaults.keys()):
03493183dd91 Added support for the Matlab and Octave lexers for QScintilla >= 2.5.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 992
diff changeset
2433 if key not in editorLexerAssoc:
03493183dd91 Added support for the Matlab and Octave lexers for QScintilla >= 2.5.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 992
diff changeset
2434 editorLexerAssoc[key] = editorLexerAssocDefaults[key]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2435 return editorLexerAssoc
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2436
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2437
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2438 def setEditorLexerAssocs(assocs):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2439 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2440 Module function to retrieve all lexer associations.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2441
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2442 @param assocs dictionary of lexer associations to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2443 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2444 # first remove lexer associations that no longer exist, than save the rest
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2445 Prefs.settings.beginGroup("Editor/LexerAssociations")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2446 keyList = Prefs.settings.childKeys()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2447 Prefs.settings.endGroup()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2448 for key in keyList:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2449 if key not in assocs:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2450 Prefs.settings.remove("Editor/LexerAssociations/" + key)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2451 for key in assocs:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2452 Prefs.settings.setValue("Editor/LexerAssociations/" + key, assocs[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2453
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2454
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2455 def getEditorLexerAssoc(filename):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2456 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2457 Module function to retrieve a lexer association.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2458
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2459 @param filename filename used to determine the associated lexer language
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2460 (string)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2461 @return the requested lexer language (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2462 """
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10
diff changeset
2463 for pattern, language in list(getEditorLexerAssocs().items()):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2464 if fnmatch.fnmatch(filename, pattern):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2465 return language
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2466
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2467 return ""
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2468
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2469
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2470 def getEditorTyping(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2471 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2472 Module function to retrieve the various editor typing settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2473
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2474 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2475 @return the requested editor setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2476 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2477 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2478 Prefs.settings.value("Editor/Typing/" + key, Prefs.editorTypingDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2479 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2480
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2481
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2482 def setEditorTyping(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2483 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2484 Module function to store the various editor typing settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2485
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2486 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2487 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2488 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2489 Prefs.settings.setValue("Editor/Typing/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2490
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2491
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2492 def getEditorExporter(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2493 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2494 Module function to retrieve the various editor exporters settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2495
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2496 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2497 @return the requested editor setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2498 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2499 if key in ["RTF/Font"]:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2500 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2501 f.fromString(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2502 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2503 "Editor/Exporters/" + key, Prefs.editorExporterDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2504 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2505 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2506 return f
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2507 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2508 "HTML/WYSIWYG",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2509 "HTML/Folding",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2510 "HTML/OnlyStylesUsed",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2511 "HTML/FullPathAsTitle",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2512 "HTML/UseTabs",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2513 "RTF/WYSIWYG",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2514 "RTF/UseTabs",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2515 "TeX/OnlyStylesUsed",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2516 "TeX/FullPathAsTitle",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2517 "ODT/WYSIWYG",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2518 "ODT/OnlyStylesUsed",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2519 "ODT/UseTabs",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2520 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2521 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2522 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2523 "Editor/Exporters/" + key, Prefs.editorExporterDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2524 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2525 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2526 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2527 "PDF/Magnification",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2528 "PDF/MarginLeft",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2529 "PDF/MarginRight",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2530 "PDF/MarginTop",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2531 "PDF/MarginBottom",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2532 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2533 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2534 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2535 "Editor/Exporters/" + key, Prefs.editorExporterDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2536 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2537 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2538 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2539 return Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2540 "Editor/Exporters/" + key, Prefs.editorExporterDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2541 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2542
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2543
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2544 def setEditorExporter(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2545 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2546 Module function to store the various editor exporters settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2547
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2548 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2549 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2550 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2551 if key in ["RTF/Font"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2552 Prefs.settings.setValue("Editor/Exporters/" + key, value.toString())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2553 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2554 Prefs.settings.setValue("Editor/Exporters/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2555
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2556
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2557 def getPrinter(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2558 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2559 Module function to retrieve the various printer settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2560
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2561 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2562 @return the requested printer setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2563 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2564 if key in ["ColorMode", "FirstPageFirst"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2565 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2566 Prefs.settings.value("Printer/" + key, Prefs.printerDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2567 )
4792
f55fa7eb3cf3 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4782
diff changeset
2568 elif key in ["Magnification", "Orientation", "PageSize", "Resolution"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2569 return int(Prefs.settings.value("Printer/" + key, Prefs.printerDefaults[key]))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2570 elif key in ["LeftMargin", "RightMargin", "TopMargin", "BottomMargin"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2571 return float(Prefs.settings.value("Printer/" + key, Prefs.printerDefaults[key]))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2572 elif key in ["HeaderFont"]:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2573 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2574 f.fromString(Prefs.settings.value("Printer/" + key, Prefs.printerDefaults[key]))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2575 return f
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2576 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2577 return Prefs.settings.value("Printer/" + key, Prefs.printerDefaults[key])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2578
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2579
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2580 def setPrinter(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2581 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2582 Module function to store the various printer settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2583
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2584 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2585 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2586 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2587 if key in ["HeaderFont"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2588 Prefs.settings.setValue("Printer/" + key, value.toString())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2589 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2590 Prefs.settings.setValue("Printer/" + key, value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2591
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2592
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2593 def getShell(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2594 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2595 Module function to retrieve the various shell settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2596
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2597 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2598 @return the requested shell setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2599 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2600 if key in ["MonospacedFont", "MarginsFont"]:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2601 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2602 f.fromString(Prefs.settings.value("Shell/" + key, Prefs.shellDefaults[key]))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2603 return f
2640
dedcd4f987e0 Changed the line numbers margin to adjust themselves to the size needed (Editor, Mini Editor, Shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2624
diff changeset
2604 elif key in ["MaxHistoryEntries"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2605 return int(Prefs.settings.value("Shell/" + key, Prefs.shellDefaults[key]))
5798
e4f9552f7f93 Started improving the Shell window history handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5785
diff changeset
2606 elif key in ["HistoryStyle"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2607 return ShellHistoryStyle(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2608 int(Prefs.settings.value("Shell/" + key, Prefs.shellDefaults[key].value))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2609 )
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
2610 elif key in ["LastVirtualEnvironment"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2611 return Prefs.settings.value("Shell/" + key, Prefs.shellDefaults[key])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2612 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2613 return toBool(Prefs.settings.value("Shell/" + key, Prefs.shellDefaults[key]))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2614
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2615
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2616 def setShell(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2617 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2618 Module function to store the various shell settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2619
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2620 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2621 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2622 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2623 if key in ["MonospacedFont", "MarginsFont"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2624 Prefs.settings.setValue("Shell/" + key, value.toString())
5798
e4f9552f7f93 Started improving the Shell window history handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5785
diff changeset
2625 elif key in ["HistoryStyle"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2626 Prefs.settings.setValue("Shell/" + key, value.value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2627 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2628 Prefs.settings.setValue("Shell/" + key, value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2629
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2630
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2631 def getProject(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2632 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2633 Module function to retrieve the various project handling settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2634
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2635 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2636 @return the requested project setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2637 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2638 if key in ["RecentNumber"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2639 return int(Prefs.settings.value("Project/" + key, Prefs.projectDefaults[key]))
5525
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2640 elif key in ["DebugClientsHistory", "DebuggerInterpreterHistory"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2641 return toList(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2642 Prefs.settings.value("Project/" + key, Prefs.projectDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2643 )
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2644 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2645 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2646 Prefs.settings.value("Project/" + key, Prefs.projectDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2647 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2648
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2649
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2650 def setProject(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2651 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2652 Module function to store the various project handling settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2653
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2654 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2655 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2656 """
5525
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2657 if key in ["DebugClientsHistory", "DebuggerInterpreterHistory"]:
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2658 # max. list sizes is hard coded to 20 entries
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2659 newList = [v for v in value if v]
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2660 if len(newList) > 20:
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2661 newList = newList[:20]
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2662 Prefs.settings.setValue("Project/" + key, newList)
5525
1771a7f9065c Added capability to remember previously used entries in the project debugger properties dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5523
diff changeset
2663 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2664 Prefs.settings.setValue("Project/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2665
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2666
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2667 def getProjectBrowsers(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2668 """
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2669 Function to retrieve the enabled project browsers per project type.
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2670
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2671 @param key project type
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2672 @type str
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2673 @return list of enabled project browsers
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2674 @rtype list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2675 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2676 try:
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2677 default = list(Prefs.projectBrowsersDefaults[key][:])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2678 except KeyError:
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2679 default = list(Prefs.projectBrowsersDefaults["allBrowsers"][:])
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2680
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2681 return toList(Prefs.settings.value("Project/BrowsersEnabled/" + key, default))
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2682
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2683
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2684 def setProjectBrowsers(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2685 """
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2686 Function to store the enabled project browsers per project type.
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2687
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2688 @param key project type
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2689 @type str
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2690 @param value list of enabled project browsers
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2691 @type list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2692 """
9525
477545eef9f4 Continued refactoring of the project browser related code in order to extract some as plugins later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9522
diff changeset
2693 Prefs.settings.setValue("Project/BrowsersEnabled/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2694
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2695
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2696 def getProjectBrowserColour(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2697 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2698 Module function to retrieve the various project browser colours.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2699
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2700 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2701 @return the requested project browser colour
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2702 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2703 col = Prefs.settings.value("Project/Colour/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2704 if col is not None:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
2705 return QColor(col)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2706 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2707 return Prefs.projectBrowserColourDefaults[key]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2708
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2709
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2710 def setProjectBrowserColour(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2711 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2712 Module function to store the various project browser colours.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2713
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2714 @param key the key of the colour to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2715 @param value the colour to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2716 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2717 Prefs.settings.setValue("Project/Colour/" + key, value.name())
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2718
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2719
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2720 def getMultiProject(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2721 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2722 Module function to retrieve the various project handling settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2723
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2724 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2725 @return the requested project setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2726 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
2727 if key in ["RecentNumber"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2728 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2729 Prefs.settings.value("MultiProject/" + key, Prefs.multiProjectDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2730 )
8031
ce5858a237d2 Changed the Project and MultiProject configuration option "XMLTimestamp" to "TimestampFile". A configuration check is suggested.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8002
diff changeset
2731 elif key in ["OpenMasterAutomatically", "TimestampFile"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2732 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2733 Prefs.settings.value("MultiProject/" + key, Prefs.multiProjectDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2734 )
1939
eadb2328d7d4 Introduced a "workspace" directory that is used as the default for opening or saving new files or projects (configurable on Multiproject config page).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1926
diff changeset
2735 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2736 return Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2737 "MultiProject/" + key, Prefs.multiProjectDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2738 )
7635
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
2739
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2740
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2741 def setMultiProject(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2742 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2743 Module function to store the various project handling settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2744
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2745 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2746 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2747 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2748 Prefs.settings.setValue("MultiProject/" + key, value)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2749
2298
fa4f79c34e0c Added support for Qt5 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2294
diff changeset
2750
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2751 def getQtDocDir(version):
2298
fa4f79c34e0c Added support for Qt5 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2294
diff changeset
2752 """
8549
15eca21fd968 Changed some forgotten references to Qt5 to Qt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8539
diff changeset
2753 Module function to retrieve the Qt5DocDir/Qt6DocDir setting.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2754
7903
827d89937c30 Fixed a few issues with the new multi process debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7902
diff changeset
2755 @param version Qt version to get documentation directory for
7902
a5248d27c8a9 User Interface
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7802
diff changeset
2756 @type int
8549
15eca21fd968 Changed some forgotten references to Qt5 to Qt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8539
diff changeset
2757 @return the requested Qt5DocDir/Qt6DocDir setting
7902
a5248d27c8a9 User Interface
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7802
diff changeset
2758 @rtype str
2298
fa4f79c34e0c Added support for Qt5 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2294
diff changeset
2759 """
7902
a5248d27c8a9 User Interface
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7802
diff changeset
2760 key = "Qt{0}DocDir".format(version)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2761 s = Prefs.settings.value("Help/{0}".format(key), Prefs.helpDefaults[key])
2298
fa4f79c34e0c Added support for Qt5 documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2294
diff changeset
2762 if s == "":
7902
a5248d27c8a9 User Interface
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7802
diff changeset
2763 s = os.getenv(key.upper(), "")
9326
1d8eadd8873e Fixed a little issue determining the path to the Qt documentation for Qt5 causing the path for Qt6 being returned.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
2764 if s == "" and version == 6: # that only works for Qt6
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2765 s = os.path.join(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2766 QLibraryInfo.path(QLibraryInfo.LibraryPath.DocumentationPath), "qtdoc"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2767 )
1368
4489ee4feb59 Fixed a few Mac OS X related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1353
diff changeset
2768 return s
4489ee4feb59 Fixed a few Mac OS X related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1353
diff changeset
2769
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2770
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2771 def getHelp(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2772 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2773 Module function to retrieve the various help settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2774
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2775 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2776 @return the requested help setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2777 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2778 if key in ("HelpViewerType",):
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2779 return int(Prefs.settings.value("Help/" + key, Prefs.helpDefaults[key]))
8705
327e596607f8 Added a configuration option to use the internal help viewer and made that the default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8697
diff changeset
2780 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2781 return Prefs.settings.value("Help/" + key, Prefs.helpDefaults[key])
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7192
diff changeset
2782
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
2783
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2784 def setHelp(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2785 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2786 Module function to store the various help settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2787
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2788 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2789 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2790 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2791 Prefs.settings.setValue("Help/" + key, value)
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2792
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2793
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2794 def getWebBrowser(key):
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2795 """
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2796 Module function to retrieve the various web browser settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2797
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2798 @param key the key of the value to get
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2799 @return the requested help setting
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2800 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2801 if not Prefs.webEngineSettingsIntitialized:
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2802 Prefs.initWebEngineSettingsDefaults()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2803
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2804 if key in ["StandardFont", "FixedFont"]:
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2805 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2806 f.fromString(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2807 Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2808 )
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2809 return f
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2810 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2811 "SecureUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2812 "InsecureUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2813 "MaliciousUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2814 "PrivateModeUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2815 ]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2816 col = Prefs.settings.value("WebBrowser/" + key)
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2817 if col is not None:
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2818 return QColor(col)
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2819 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2820 return Prefs.webBrowserDefaults[key]
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
2821 elif key in ["WebSearchKeywords"]:
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
2822 # return a list of tuples of (keyword, engine name)
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
2823 keywords = []
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2824 size = Prefs.settings.beginReadArray("WebBrowser/" + key)
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
2825 for index in range(size):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2826 Prefs.settings.setArrayIndex(index)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2827 keyword = Prefs.settings.value("Keyword")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2828 engineName = Prefs.settings.value("Engine")
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
2829 keywords.append((keyword, engineName))
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2830 Prefs.settings.endArray()
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
2831 return keywords
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2832 elif key == "DownloadManagerDownloads":
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2833 # return a list of dicts containing the URL, save location, done flag,
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2834 # page URL, date/time downloaded
4769
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
2835 downloads = []
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2836 length = Prefs.settings.beginReadArray("WebBrowser/" + key)
4769
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
2837 for index in range(length):
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2838 download = {}
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2839 Prefs.settings.setArrayIndex(index)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2840 download["URL"] = Prefs.settings.value("URL")
6537
61a8d416dd34 Preferences: fixed an issue causing download URLs being set to None causing issues later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6522
diff changeset
2841 if download["URL"] is None:
61a8d416dd34 Preferences: fixed an issue causing download URLs being set to None causing issues later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6522
diff changeset
2842 download["URL"] = QUrl()
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2843 download["Location"] = Prefs.settings.value("Location")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2844 download["Done"] = toBool(Prefs.settings.value("Done"))
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2845 download["PageURL"] = Prefs.settings.value("PageURL")
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2846 if download["PageURL"] is None:
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2847 download["PageURL"] = QUrl()
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2848 download["Downloaded"] = Prefs.settings.value("Downloaded")
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2849 if download["Downloaded"] is None:
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2850 download["Downloaded"] = QDateTime()
7192
a22eee00b052 Started removing runtime support for Python2 and PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7161
diff changeset
2851 elif isinstance(download["Downloaded"], str):
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2852 download["Downloaded"] = QDateTime.fromString(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2853 download["Downloaded"], "yyyy-MM-dd hh:mm:ss"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2854 )
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
2855 downloads.append(download)
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2856 Prefs.settings.endArray()
4769
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
2857 return downloads
4758
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
2858 elif key == "RssFeeds":
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
2859 # return a list of tuples of (URL, title, icon)
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
2860 feeds = []
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2861 length = Prefs.settings.beginReadArray("WebBrowser/" + key)
4758
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
2862 for index in range(length):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2863 Prefs.settings.setArrayIndex(index)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2864 url = Prefs.settings.value("URL")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2865 title = Prefs.settings.value("Title")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2866 icon = Prefs.settings.value("Icon")
4758
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
2867 feeds.append((url, title, icon))
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2868 Prefs.settings.endArray()
4758
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
2869 return feeds
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
2870 elif key in ["SyncFtpPassword", "SyncEncryptionKey"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2871 return pwConvert(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2872 Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key]),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2873 encode=False,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2874 )
9350
8d2b507f8588 Web Browser
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9326
diff changeset
2875 elif key in (
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2876 "StartupBehavior",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2877 "HistoryLimit",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2878 "DownloadManagerRemovePolicy",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2879 "SyncType",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2880 "SyncFtpPort",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2881 "SyncFtpIdleTimeout",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2882 "SyncEncryptionKeyLength",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2883 "DefaultFontSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2884 "DefaultFixedFontSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2885 "MinimumFontSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2886 "MinimumLogicalFontSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2887 "DiskCacheSize",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2888 "AcceptCookies",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2889 "KeepCookiesUntil",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2890 "AdBlockUpdatePeriod",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2891 "TabManagerGroupByType",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2892 "SessionAutoSaveInterval",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2893 "NewTabBehavior",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2894 "RefererSendReferer",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2895 "RefererDefaultPolicy",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2896 "RefererTrimmingPolicy",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2897 "AcceptQuotaRequest",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2898 "AcceptProtocolHandlerRequest",
9350
8d2b507f8588 Web Browser
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9326
diff changeset
2899 "AcceptFileSystemAccessRequest",
8d2b507f8588 Web Browser
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9326
diff changeset
2900 ):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2901 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2902 Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2903 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2904 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2905 "SingleWebBrowserWindow",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2906 "SaveGeometry",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2907 "JavaScriptEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2908 "JavaScriptCanOpenWindows",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2909 "JavaScriptCanAccessClipboard",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2910 "AutoLoadImages",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2911 "LocalStorageEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2912 "SpatialNavigationEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2913 "LinksIncludedInFocusChain",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2914 "LocalContentCanAccessRemoteUrls",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2915 "LocalContentCanAccessFileUrls",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2916 "XSSAuditingEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2917 "ScrollAnimatorEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2918 "ErrorPageEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2919 "WarnOnMultipleClose",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2920 "WebSearchSuggestions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2921 "SyncEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2922 "SyncBookmarks",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2923 "SyncHistory",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2924 "SyncPasswords",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2925 "SyncUserAgents",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2926 "SyncSpeedDial",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2927 "SyncEncryptData",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2928 "SyncEncryptPasswordsOnly",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2929 "ShowPreview",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2930 "DiskCacheEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2931 "DoNotTrack",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2932 "FilterTrackingCookies",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2933 "AdBlockEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2934 "AdBlockUseLimitedEasyList",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2935 "PluginsEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2936 "FullScreenSupportEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2937 "AutoScrollEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2938 "ScreenCaptureEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2939 "WebGLEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2940 "FocusOnNavigationEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2941 "PrintElementBackgrounds",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2942 "AllowRunningInsecureContent",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2943 "SpellCheckEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2944 "ShowToolbars",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2945 "MenuBarVisible",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2946 "BookmarksToolBarVisible",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2947 "StatusBarVisible",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2948 "SessionAutoSave",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2949 "LoadTabOnActivation",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2950 "SafeBrowsingEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2951 "SafeBrowsingFilterPlatform",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2952 "SafeBrowsingAutoUpdate",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2953 "SafeBrowsingUseLookupApi",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2954 "AllowGeolocationOnInsecureOrigins",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2955 "AllowWindowActivationFromJavaScript",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2956 "ShowScrollBars",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2957 "DownloadManagerAutoOpen",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2958 "DownloadManagerAutoClose",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2959 "PlaybackRequiresUserGesture",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2960 "JavaScriptCanPaste",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2961 "WebRTCPublicInterfacesOnly",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2962 "DnsPrefetchEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2963 "VirusTotalEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2964 "VirusTotalSecure",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2965 "PdfViewerEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2966 "AlwaysRejectFaultyCertificates",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2967 "Accelerated2dCanvasEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2968 "AutoLoadIconsForPage",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2969 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2970 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2971 Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2972 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2973 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2974 "GreaseMonkeyDisabledScripts",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2975 "SendRefererWhitelist",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2976 "AdBlockSubscriptions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2977 "AdBlockExceptions",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2978 "SpellCheckLanguages",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2979 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2980 return toList(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2981 Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2982 )
4958
ef400197e7d5 Implemented the auto scroller for the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4957
diff changeset
2983 elif key in ["AutoScrollDivider"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2984 return float(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2985 Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2986 )
5839
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
2987 elif key in ["SafeBrowsingUpdateDateTime"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2988 dateTimeStr = Prefs.settings.value("WebBrowser/" + key)
5839
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
2989 if dateTimeStr is not None:
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: 8109
diff changeset
2990 return QDateTime.fromString(dateTimeStr, Qt.DateFormat.ISODate)
5839
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
2991 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2992 return Prefs.webBrowserDefaults[key]
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2993 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2994 return Prefs.settings.value("WebBrowser/" + key, Prefs.webBrowserDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
2995
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2996
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
2997 def setWebBrowser(key, value):
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2998 """
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
2999 Module function to store the various web browser settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3000
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
3001 @param key the key of the setting to be set
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
3002 @param value the value to be set
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
3003 """
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
3004 if key in ["StandardFont", "FixedFont"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3005 Prefs.settings.setValue("WebBrowser/" + key, value.toString())
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3006 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3007 "SecureUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3008 "InsecureUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3009 "MaliciousUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3010 "PrivateModeUrlColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3011 ]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3012 Prefs.settings.setValue("WebBrowser/" + key, value.name())
4741
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
3013 elif key == "WebSearchKeywords":
f9e1adc69076 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4734
diff changeset
3014 # value is list of tuples of (keyword, engine name)
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3015 Prefs.settings.remove("WebBrowser/" + key)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3016 Prefs.settings.beginWriteArray("WebBrowser/" + key, len(value))
8220
006ee31b4835 Applied some more code simplifications suggested by the new Simplify checker (Y113: use enumerate()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8207
diff changeset
3017 for index, v in enumerate(value):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3018 Prefs.settings.setArrayIndex(index)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3019 Prefs.settings.setValue("Keyword", v[0])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3020 Prefs.settings.setValue("Engine", v[1])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3021 Prefs.settings.endArray()
4769
2b6f7e026cdc Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4766
diff changeset
3022 elif key == "DownloadManagerDownloads":
6091
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
3023 # value is list of dicts containing the URL, save location, done flag,
7b989321d74c Improved maintainability of the DownloadItem code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6090
diff changeset
3024 # page URL, date/time downloaded
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3025 Prefs.settings.remove("Help/" + key)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3026 Prefs.settings.beginWriteArray("WebBrowser/" + key, len(value))
8220
006ee31b4835 Applied some more code simplifications suggested by the new Simplify checker (Y113: use enumerate()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8207
diff changeset
3027 for index, v in enumerate(value):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3028 Prefs.settings.setArrayIndex(index)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3029 Prefs.settings.setValue("URL", v["URL"])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3030 Prefs.settings.setValue("Location", v["Location"])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3031 Prefs.settings.setValue("Done", v["Done"])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3032 Prefs.settings.setValue("PageURL", v["PageURL"])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3033 Prefs.settings.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3034 "Downloaded", v["Downloaded"].toString("yyyy-MM-dd hh:mm:ss")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3035 )
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3036 Prefs.settings.endArray()
4758
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
3037 elif key == "RssFeeds":
c973eef8fef1 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4753
diff changeset
3038 # value is list of tuples of (URL, title, icon)
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3039 Prefs.settings.remove("WebBrowser/" + key)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3040 Prefs.settings.beginWriteArray("WebBrowser/" + key, len(value))
8220
006ee31b4835 Applied some more code simplifications suggested by the new Simplify checker (Y113: use enumerate()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8207
diff changeset
3041 for index, v in enumerate(value):
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3042 Prefs.settings.setArrayIndex(index)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3043 Prefs.settings.setValue("URL", v[0])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3044 Prefs.settings.setValue("Title", v[1])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3045 Prefs.settings.setValue("Icon", v[2])
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3046 Prefs.settings.endArray()
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
3047 elif key in ["SyncFtpPassword", "SyncEncryptionKey"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3048 Prefs.settings.setValue("WebBrowser/" + key, pwConvert(value, encode=True))
5839
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
3049 elif key in ["SafeBrowsingUpdateDateTime"]:
fe4d62e23908 Added an auto-update feature to the safe browsing manager of the new web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5837
diff changeset
3050 # value is a QDateTime
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3051 Prefs.settings.setValue(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3052 "WebBrowser/" + key, value.toString(Qt.DateFormat.ISODate)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3053 )
4709
8612533a223f Started porting the eric web browser to use QtWebEngine.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4695
diff changeset
3054 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3055 Prefs.settings.setValue("WebBrowser/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3056
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3057
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3058 def getSystem(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3059 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3060 Module function to retrieve the various system settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3061
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3062 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3063 @return the requested system setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3064 """
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
3065 from eric7.Utilities import supportedCodecs
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3066
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3067 if key in ["StringEncoding", "IOEncoding"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3068 encoding = Prefs.settings.value("System/" + key, Prefs.sysDefaults[key])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3069 if encoding not in supportedCodecs:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3070 encoding = Prefs.sysDefaults[key]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3071 return encoding
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3072
6891
93f82da09f22 Fixed some code style issues detected by the new 'return' checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6843
diff changeset
3073 return None
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3074
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3075
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3076 def setSystem(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3077 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3078 Module function to store the various system settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3079
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3080 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3081 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3082 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3083 Prefs.settings.setValue("System/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3084
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3085
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3086 def getQtTranslationsDir():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3087 """
8549
15eca21fd968 Changed some forgotten references to Qt5 to Qt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8539
diff changeset
3088 Module function to retrieve the Qt6TranslationsDir
4815
74a3a3603ac5 Changed code to have separate translations directories for each Qt variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4716
diff changeset
3089 setting depending on the current Qt version.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3090
4815
74a3a3603ac5 Changed code to have separate translations directories for each Qt variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4716
diff changeset
3091 @return the requested setting (string)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3092 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3093 s = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3094 "Qt/Qt6TranslationsDir", Prefs.qtDefaults["Qt6TranslationsDir"]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3095 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3096 if s == "":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3097 s = QLibraryInfo.path(QLibraryInfo.LibraryPath.TranslationsPath)
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3098 if s == "" and Globals.isWindowsPlatform():
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3099 transPath = os.path.join(Globals.getPyQt6ModulesDirectory(), "translations")
284
06d3067f8a63 Fixed an issue when using the PyQt4 windows installer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 270
diff changeset
3100 if os.path.exists(transPath):
06d3067f8a63 Fixed an issue when using the PyQt4 windows installer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 270
diff changeset
3101 s = transPath
06d3067f8a63 Fixed an issue when using the PyQt4 windows installer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 270
diff changeset
3102 return s
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3103
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3104
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3105 def getQt(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3106 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3107 Module function to retrieve the various Qt settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3108
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3109 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3110 @return the requested Qt setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3111 """
8549
15eca21fd968 Changed some forgotten references to Qt5 to Qt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8539
diff changeset
3112 if key in ["Qt6TranslationsDir"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3113 return getQtTranslationsDir()
7907
7991ea245c20 Added support for PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7903
diff changeset
3114 elif key in ["PyuicIndent", "Pyuic6Indent"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3115 return int(Prefs.settings.value("Qt/" + key, Prefs.qtDefaults[key]))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3116 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3117 "PyuicFromImports",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3118 "PyuicExecute",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3119 "Pyuic6Execute",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3120 "PySide2FromImports",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3121 "PySide6FromImports",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3122 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3123 return toBool(Prefs.settings.value("Qt/" + key, Prefs.qtDefaults[key]))
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3124 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3125 return Prefs.settings.value("Qt/" + key, Prefs.qtDefaults[key])
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3126
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3127
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3128 def setQt(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3129 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3130 Module function to store the various Qt settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3131
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3132 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3133 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3134 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3135 Prefs.settings.setValue("Qt/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3136
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3137
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3138 def getCorba(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3139 """
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3140 Module function to retrieve the various Corba settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3141
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3142 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3143 @return the requested corba setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3144 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3145 return Prefs.settings.value("Corba/" + key, Prefs.corbaDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3146
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3147
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3148 def setCorba(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3149 """
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3150 Module function to store the various Corba settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3151
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3152 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3153 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3154 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3155 Prefs.settings.setValue("Corba/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3156
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3157
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3158 def getProtobuf(key):
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3159 """
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3160 Module function to retrieve the various protobuf settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3161
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3162 @param key the key of the value to get
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3163 @type str
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3164 @return the requested protobuf setting
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3165 @rtype any
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3166 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3167 return Prefs.settings.value("Protobuf/" + key, Prefs.protobufDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3168
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3169
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3170 def setProtobuf(key, value):
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3171 """
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3172 Module function to store the various protobuf settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3173
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3174 @param key the key of the setting to be set
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3175 @type str
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3176 @param value the value to be set
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3177 @type any
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3178 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3179 Prefs.settings.setValue("Protobuf/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3180
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5964
diff changeset
3181
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3182 def getUser(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3183 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3184 Module function to retrieve the various user settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3185
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3186 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3187 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3188 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3189 if key == "MailServerPassword":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3190 return pwConvert(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3191 Prefs.settings.value("User/" + key, Prefs.userDefaults[key]), encode=False
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3192 )
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3193 elif key in ["MailServerPort"]:
6522
20c9a023b6c1 Preferences: implemented a work around for a faulty preferences file causing int() to fail.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
3194 try:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3195 return int(Prefs.settings.value("User/" + key, Prefs.userDefaults[key]))
6522
20c9a023b6c1 Preferences: implemented a work around for a faulty preferences file causing int() to fail.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
3196 except ValueError:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3197 return Prefs.userDefaults[key]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3198 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3199 "MailServerAuthentication",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3200 "UseSystemEmailClient",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3201 "UseMasterPassword",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3202 "SavePasswords",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3203 "UseGoogleMailOAuth2",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3204 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3205 return toBool(Prefs.settings.value("User/" + key, Prefs.userDefaults[key]))
5443
3ef014765648 Added capability to use the SSL encryption method (next to StartTLS) in the built in Email dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5420
diff changeset
3206 elif key == "MailServerEncryption":
3ef014765648 Added capability to use the SSL encryption method (next to StartTLS) in the built in Email dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5420
diff changeset
3207 # convert from old key 'MailServerUseTLS'
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3208 val = Prefs.settings.value("User/" + key)
5443
3ef014765648 Added capability to use the SSL encryption method (next to StartTLS) in the built in Email dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5420
diff changeset
3209 if val is None:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3210 if toBool(Prefs.settings.value("User/MailServerUseTLS")):
5443
3ef014765648 Added capability to use the SSL encryption method (next to StartTLS) in the built in Email dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5420
diff changeset
3211 val = "TLS"
3ef014765648 Added capability to use the SSL encryption method (next to StartTLS) in the built in Email dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5420
diff changeset
3212 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3213 val = Prefs.userDefaults[key]
5443
3ef014765648 Added capability to use the SSL encryption method (next to StartTLS) in the built in Email dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5420
diff changeset
3214 return val
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3215 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3216 return Prefs.settings.value("User/" + key, Prefs.userDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3217
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3218
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3219 def setUser(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3220 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3221 Module function to store the various user settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3222
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3223 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3224 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3225 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3226 if key == "MailServerPassword":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3227 Prefs.settings.setValue("User/" + key, pwConvert(value, encode=True))
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3228 elif key == "MasterPassword":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3229 Prefs.settings.setValue("User/" + key, hashPassword(value))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3230 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3231 Prefs.settings.setValue("User/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3232
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3233
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3234 def getVCS(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3235 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3236 Module function to retrieve the VCS related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3237
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3238 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3239 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3240 """
8624
5192a2592324 Started implementing a 'Quick Commit' function for the new VCS Status List widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8593
diff changeset
3241 if key in ["StatusMonitorInterval", "CommitMessages"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3242 return int(Prefs.settings.value("VCS/" + key, Prefs.vcsDefaults[key]))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3243 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3244 return toBool(Prefs.settings.value("VCS/" + key, Prefs.vcsDefaults[key]))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3245
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3246
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3247 def setVCS(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3248 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3249 Module function to store the VCS related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3250
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3251 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3252 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3253 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3254 Prefs.settings.setValue("VCS/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3255
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3256
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3257 def getTasks(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3258 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3259 Module function to retrieve the Tasks related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3260
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3261 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3262 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3263 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3264 if key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3265 "TasksFixmeColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3266 "TasksWarningColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3267 "TasksTodoColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3268 "TasksNoteColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3269 "TasksTestColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3270 "TasksDocuColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3271 ]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3272 col = Prefs.settings.value("Tasks/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3273 if col is not None:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
3274 return QColor(col)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3275 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3276 return Prefs.tasksDefaults[key]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3277 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3278 "ClearOnFileClose",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3279 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3280 return toBool(Prefs.settings.value("Tasks/" + key, Prefs.tasksDefaults[key]))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3281 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3282 return Prefs.settings.value("Tasks/" + key, Prefs.tasksDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3283
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3284
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3285 def setTasks(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3286 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3287 Module function to store the Tasks related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3288
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3289 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3290 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3291 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3292 if key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3293 "TasksFixmeColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3294 "TasksWarningColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3295 "TasksTodoColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3296 "TasksNoteColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3297 "TasksTestColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3298 "TasksDocuColor",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3299 ]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3300 Prefs.settings.setValue("Tasks/" + key, value.name())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3301 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3302 Prefs.settings.setValue("Tasks/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3303
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3304
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3305 def getTemplates(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3306 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3307 Module function to retrieve the Templates related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3308
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3309 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3310 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3311 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3312 if key in ["SeparatorChar"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3313 return Prefs.settings.value("Templates/" + key, Prefs.templatesDefaults[key])
3492
ae74a7201759 Added a configurable template code editor font.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3459
diff changeset
3314 elif key in ["EditorFont"]:
ae74a7201759 Added a configurable template code editor font.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3459
diff changeset
3315 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3316 f.fromString(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3317 Prefs.settings.value("Templates/" + key, Prefs.templatesDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3318 )
3492
ae74a7201759 Added a configurable template code editor font.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3459
diff changeset
3319 return f
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3320 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3321 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3322 Prefs.settings.value("Templates/" + key, Prefs.templatesDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3323 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3324
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3325
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3326 def setTemplates(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3327 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3328 Module function to store the Templates related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3329
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3330 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3331 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3332 """
3492
ae74a7201759 Added a configurable template code editor font.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3459
diff changeset
3333 if key in ["EditorFont"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3334 Prefs.settings.setValue("Templates/" + key, value.toString())
3492
ae74a7201759 Added a configurable template code editor font.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3459
diff changeset
3335 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3336 Prefs.settings.setValue("Templates/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3337
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3338
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3339 def getPluginManager(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3340 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3341 Module function to retrieve the plugin manager related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3342
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3343 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3344 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3345 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3346 if key in ["DownloadPath"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3347 return Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3348 "PluginManager/" + key, Prefs.pluginManagerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3349 )
3200
83bde5e6f146 Extended the plugin repository dialog to allow to hide unwanted entries and cleanup the plugin downloads area.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
3350 elif key in ["UpdatesCheckInterval", "KeepGenerations"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3351 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3352 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3353 "PluginManager/" + key, Prefs.pluginManagerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3354 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3355 )
3200
83bde5e6f146 Extended the plugin repository dialog to allow to hide unwanted entries and cleanup the plugin downloads area.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
3356 elif key in ["HiddenPlugins"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3357 return toList(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3358 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3359 "PluginManager/" + key, Prefs.pluginManagerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3360 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3361 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3362 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3363 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3364 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3365 "PluginManager/" + key, Prefs.pluginManagerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3366 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3367 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3368
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3369
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3370 def setPluginManager(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3371 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3372 Module function to store the plugin manager related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3373
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3374 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3375 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3376 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3377 Prefs.settings.setValue("PluginManager/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3378
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3379
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3380 def getGraphics(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3381 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3382 Module function to retrieve the Graphics related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3383
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3384 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3385 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3386 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3387 if key in ["Font"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3388 font = Prefs.settings.value("Graphics/" + key, Prefs.graphicsDefaults[key])
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
3389 if isinstance(font, QFont):
15
f6ccc31d6e72 Started to rename stuff for eric5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
3390 # workaround for an old bug in eric < 4.4
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3391 return font
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3392 else:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
3393 f = QFont()
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3394 f.fromString(font)
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3395 return f
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3396 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3397 return Prefs.settings.value("Graphics/" + key, Prefs.graphicsDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3398
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3399
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3400 def setGraphics(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3401 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3402 Module function to store the Graphics related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3403
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3404 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3405 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3406 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3407 if key in ["Font"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3408 Prefs.settings.setValue("Graphics/" + key, value.toString())
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3409 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3410 Prefs.settings.setValue("Graphics/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3411
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3412
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3413 def getIconEditor(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3414 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3415 Module function to retrieve the Icon Editor related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3416
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3417 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3418 @return the requested user setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3419 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3420 return Prefs.settings.value("IconEditor/" + key, Prefs.iconEditorDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3421
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3422
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3423 def setIconEditor(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3424 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3425 Module function to store the Icon Editor related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3426
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3427 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3428 @param value the value to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3429 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3430 Prefs.settings.setValue("IconEditor/" + key, value)
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3431
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3432
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3433 def getFlakes(key):
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3434 """
3207
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3200
diff changeset
3435 Module function to retrieve the pyflakes related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3436
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3437 @param key the key of the value to get
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3438 @return the requested user setting
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3439 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3440 if key in ["IncludeInSyntaxCheck", "IgnoreStarImportWarnings"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3441 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3442 Prefs.settings.value("Py3Flakes/" + key, Prefs.pyflakesDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3443 )
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3444 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3445 return Prefs.settings.value("Py3Flakes/" + key, Prefs.pyflakesDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3446
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3447
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3448 def setFlakes(key, value):
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3449 """
3207
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3200
diff changeset
3450 Module function to store the pyflakes related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3451
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3452 @param key the key of the setting to be set
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3453 @param value the value to be set
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 42
diff changeset
3454 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3455 Prefs.settings.setValue("Py3Flakes/" + key, value)
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3456
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3457
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3458 def getTrayStarter(key):
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3459 """
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3460 Module function to retrieve the tray starter related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3461
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3462 @param key the key of the value to get
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3463 @return the requested user setting
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3464 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3465 return Prefs.settings.value("TrayStarter/" + key, Prefs.trayStarterDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3466
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3467
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3468 def setTrayStarter(key, value):
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3469 """
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3470 Module function to store the tray starter related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3471
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3472 @param key the key of the setting to be set
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3473 @param value the value to be set
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 679
diff changeset
3474 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3475 Prefs.settings.setValue("TrayStarter/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3476
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3477
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3478 def getIrc(key):
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3479 """
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3480 Module function to retrieve the IRC related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3481
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3482 @param key the key of the value to get
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3483 @return the requested user setting
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3484 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3485 if key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3486 "TimestampIncludeDate",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3487 "ShowTimestamps",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3488 "ShowNotifications",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3489 "NotifyJoinPart",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3490 "NotifyMessage",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3491 "NotifyNick",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3492 "EnableIrcColours",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3493 "AutoUserInfoLookup",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3494 "MarkPositionWhenHidden",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3495 "AskOnShutdown",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3496 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3497 return toBool(Prefs.settings.value("IRC/" + key, Prefs.ircDefaults[key]))
2247
bddb4557c97e Added the auto who configuration.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2228
diff changeset
3498 elif key in ["AutoUserInfoMax", "AutoUserInfoInterval"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3499 return int(Prefs.settings.value("IRC/" + key, Prefs.ircDefaults[key]))
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3500 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3501 return Prefs.settings.value("IRC/" + key, Prefs.ircDefaults[key])
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3502
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3503
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3504 def setIrc(key, value):
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3505 """
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3506 Module function to store the IRC related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3507
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3508 @param key the key of the setting to be set
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3509 @param value the value to be set
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3510 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3511 Prefs.settings.setValue("IRC/" + key, value)
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7690
diff changeset
3512
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3513
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3514 def getHexEditor(key):
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3515 """
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3516 Module function to retrieve the Hex Editor related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3517
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3518 @param key the key of the value to get
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3519 @return the requested user setting
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3520 """
4695
9dc08852de25 Added a 'Recent Files' menu to the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
3521 if key in ["AddressAreaWidth", "RecentNumber"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3522 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3523 Prefs.settings.value("HexEditor/" + key, Prefs.hexEditorDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3524 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3525 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3526 "ShowAddressArea",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3527 "ShowAsciiArea",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3528 "OpenInOverwriteMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3529 "OpenReadOnly",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3530 "HighlightChanges",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3531 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3532 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3533 Prefs.settings.value("HexEditor/" + key, Prefs.hexEditorDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3534 )
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
3535 elif key in ["Font"]:
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
3536 f = QFont()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3537 f.fromString(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3538 Prefs.settings.value("HexEditor/" + key, Prefs.hexEditorDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3539 )
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
3540 return f
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
3541 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3542 return Prefs.settings.value("HexEditor/" + key, Prefs.hexEditorDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3543
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3544
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3545 def setHexEditor(key, value):
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3546 """
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3547 Module function to store the Hex Editor related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3548
4655
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3549 @param key the key of the setting to be set
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3550 @param value the value to be set
f2f0abd5bc94 Fixed a few bugs in the hex editor and added capability to save/restore the main window state.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4650
diff changeset
3551 """
8875
67c3ea933787 Modified HexEditor color usage such, that it is based on the configured/set palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8864
diff changeset
3552 if key in ["Font"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3553 Prefs.settings.setValue("HexEditor/" + key, value.toString())
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4655
diff changeset
3554 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3555 Prefs.settings.setValue("HexEditor/" + key, value)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3556
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3557
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3558 def getDiffColour(key):
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3559 """
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3560 Module function to retrieve the colours for the diff highlighter.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3561
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3562 @param key the key of the value to get
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3563 @return the requested diff colour
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3564 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3565 col = Prefs.settings.value("Diff/" + key)
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3566 if col is not None:
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3567 if len(col) == 9:
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3568 # color string with alpha
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3569 return QColor.fromRgba(int(col[1:], 16))
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3570 else:
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3571 return QColor(col)
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3572 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3573 return Prefs.diffColourDefaults[key]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3574
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3575
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3576 def setDiffColour(key, value):
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3577 """
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3578 Module function to store the diff highlighter colours.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3579
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3580 @param key the key of the colour to be set
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3581 @param value the colour to be set
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5762
diff changeset
3582 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3583 val = "#{0:8x}".format(value.rgba()) if value.alpha() < 255 else value.name()
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3584 Prefs.settings.setValue("Diff/" + key, val)
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3585
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
3586
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3587 def getDocuViewer(key):
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3588 """
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3589 Module function to retrieve the Code Documentation Viewer related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3590
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3591 @param key the key of the value to get
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3592 @return the requested Code Documentation Viewer value
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3593 """
8469
77e00a1c55bf Removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8459
diff changeset
3594 if key in ["ShowInfoOnOpenParenthesis"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3595 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3596 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3597 "CodeDocumentationViewer/" + key, Prefs.docuViewerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3598 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3599 )
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3600 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3601 return Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3602 "CodeDocumentationViewer/" + key, Prefs.docuViewerDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3603 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3604
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3605
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3606 def setDocuViewer(key, value):
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3607 """
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3608 Module function to store the Code Documentation Viewer related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3609
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3610 @param key the key of the setting to be set
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3611 @param value the value to be set
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3612 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3613 Prefs.settings.setValue("CodeDocumentationViewer/" + key, value)
5905
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3614
f31960634997 Continued implementing a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5900
diff changeset
3615
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3616 def getConda(key):
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3617 """
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3618 Module function to retrieve the conda related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3619
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3620 @param key the key of the value to get
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3621 @return the requested conda value
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3622 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3623 return Prefs.settings.value("Conda/" + key, Prefs.condaDefaults[key])
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3624
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3625
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3626 def setConda(key, value):
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3627 """
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3628 Module function to store the conda related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3629
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3630 @param key the key of the setting to be set
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3631 @param value the value to be set
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3632 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3633 Prefs.settings.setValue("Conda/" + key, value)
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3634
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6657
diff changeset
3635
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3636 def getPip(key):
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3637 """
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3638 Module function to retrieve the pip related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3639
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3640 @param key the key of the value to get
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3641 @return the requested pip value
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3642 """
8977
663521af48b2 Started implementing a vulnerability checker based on the data of the Safety DB.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8973
diff changeset
3643 if key in ("ExcludeCondaEnvironments",):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3644 return toBool(Prefs.settings.value("Pip/" + key, Prefs.pipDefaults[key]))
8977
663521af48b2 Started implementing a vulnerability checker based on the data of the Safety DB.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8973
diff changeset
3645 elif key in ("VulnerabilityDbCacheValidity",):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3646 return int(Prefs.settings.value("Pip/" + key, Prefs.pipDefaults[key]))
7726
b1ade4fcf05f Pip Interface: added an option to not show 'conda' managed environments in the selector.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7718
diff changeset
3647 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3648 return Prefs.settings.value("Pip/" + key, Prefs.pipDefaults[key])
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3649
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3650
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3651 def setPip(key, value):
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3652 """
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3653 Module function to store the pip related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3654
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3655 @param key the key of the setting to be set
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3656 @param value the value to be set
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3657 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3658 Prefs.settings.setValue("Pip/" + key, value)
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3659
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
3660
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3661 def getMicroPython(key):
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3662 """
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3663 Module function to retrieve the MicroPython related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3664
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3665 @param key the key of the value to get
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3666 @return the requested MicroPython value
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3667 """
7793
f9aea82cf9a0 Preferences: fixed an issue setting the MicroPython chart color scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3668 if key in ("SerialTimeout", "ChartColorTheme"):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3669 return int(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3670 Prefs.settings.value("MicroPython/" + key, Prefs.microPythonDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3671 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3672 elif key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3673 "ReplLineWrap",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3674 "SyncTimeAfterConnect",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3675 "ShowHiddenLocal",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3676 "ShowHiddenDevice",
9498
d48061567354 MicroPython
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9482
diff changeset
3677 "EnableManualDeviceSelection",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3678 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3679 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3680 Prefs.settings.value("MicroPython/" + key, Prefs.microPythonDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3681 )
8079
331e717c458e MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
3682 elif key in ["IgnoredUnknownDevices", "ManualDevices"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3683 jsonStr = Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3684 "MicroPython/" + key, Prefs.microPythonDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3685 )
7592
f79dc58bdf62 MicroPython: added a dialog zo ignore unknown serial devices and to manage this list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7570
diff changeset
3686 if jsonStr:
f79dc58bdf62 MicroPython: added a dialog zo ignore unknown serial devices and to manage this list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7570
diff changeset
3687 return json.loads(jsonStr)
f79dc58bdf62 MicroPython: added a dialog zo ignore unknown serial devices and to manage this list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7570
diff changeset
3688 else:
f79dc58bdf62 MicroPython: added a dialog zo ignore unknown serial devices and to manage this list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7570
diff changeset
3689 return None
7086
b757db426076 Preferences: added config option for the MicroPython serial communication timeout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
3690 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3691 return Prefs.settings.value(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3692 "MicroPython/" + key, Prefs.microPythonDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3693 )
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3694
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3695
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3696 def setMicroPython(key, value):
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3697 """
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3698 Module function to store the MicroPython settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3699
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3700 @param key the key of the setting to be set
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3701 @param value the value to be set
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3702 """
8079
331e717c458e MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
3703 if key in ["IgnoredUnknownDevices", "ManualDevices"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3704 Prefs.settings.setValue("MicroPython/" + key, json.dumps(value))
7592
f79dc58bdf62 MicroPython: added a dialog zo ignore unknown serial devices and to manage this list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7570
diff changeset
3705 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3706 Prefs.settings.setValue("MicroPython/" + key, value)
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3707
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7054
diff changeset
3708
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3709 def getJedi(key):
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3710 """
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3711 Function to retrieve the Jedi Assistant related settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3712
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3713 @param key the key of the value to get
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3714 @type str
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3715 @return the requested jedi assistant setting
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3716 @rtype Any
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3717 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3718 if key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3719 "JediCompletionsEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3720 "JediFuzzyCompletionsEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3721 "JediCalltipsEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3722 "MouseClickEnabled",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3723 ]:
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3724 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3725 Prefs.settings.value("AssistantJedi/" + key, Prefs.jediDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3726 )
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3727 else:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3728 return Prefs.settings.value("AssistantJedi/" + key, Prefs.jediDefaults[key])
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3729
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3730
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3731 def setJedi(key, value):
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3732 """
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3733 Public method to store the various refactoring settings.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3734
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3735 @param key the key of the setting to be set
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3736 @type str
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3737 @param value the value to be set
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3738 @type Any
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3739 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3740 Prefs.settings.setValue("AssistantJedi/" + key, value)
8593
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3741
1d66b6af60ed Jedi: integrated the Assistant Jedi plugin as a fixed part of eric.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8587
diff changeset
3742
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3743 def getGeometry(key):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3744 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3745 Module function to retrieve the display geometry.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3746
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3747 @param key the key of the value to get
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3748 @return the requested geometry setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3749 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3750 if key in ["MainMaximized"]:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3751 return toBool(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3752 Prefs.settings.value("Geometry/" + key, Prefs.geometryDefaults[key])
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3753 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3754 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3755 v = Prefs.settings.value("Geometry/" + key)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3756 if v is not None:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3757 return v
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3758 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3759 return Prefs.geometryDefaults[key]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3760
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3761
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3762 def setGeometry(key, value):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3763 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3764 Module function to store the display geometry.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3765
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3766 @param key the key of the setting to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3767 @param value the geometry to be set
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3768 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3769 if key in ["MainMaximized"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3770 Prefs.settings.setValue("Geometry/" + key, value)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3771 else:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3772 if Prefs.resetLayout:
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3773 v = Prefs.geometryDefaults[key]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3774 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3775 v = value
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3776 Prefs.settings.setValue("Geometry/" + key, v)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3777
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3778
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3779 def resetLayout():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3780 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3781 Module function to set a flag not storing the current layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3782 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3783 Prefs.resetLayout = True
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3784
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3785
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3786 def shouldResetLayout():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3787 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3788 Module function to indicate a reset of the layout.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3789
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3790 @return flag indicating a reset of the layout (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3791 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3792 return Prefs.resetLayout
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3793
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3794
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3795 def saveResetLayout():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3796 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3797 Module function to save the reset layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3798 """
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3799 if Prefs.resetLayout:
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3800 for key in list(Prefs.geometryDefaults.keys()):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3801 Prefs.settings.setValue("Geometry/" + key, Prefs.geometryDefaults[key])
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3802
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3803
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3804 def toBool(value):
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3805 """
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3806 Module function to convert a value to bool.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3807
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3808 @param value value to be converted
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3809 @return converted data
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3810 """
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3811 if value in ["true", "1", "True"]:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3812 return True
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3813 elif value in ["false", "0", "False"]:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3814 return False
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3815 else:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3816 return bool(value)
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3817
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3818
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3819 def toList(value):
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3820 """
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3821 Module function to convert a value to a list.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3822
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3823 @param value value to be converted
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3824 @return converted data
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3825 """
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3826 if value is None:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3827 return []
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10
diff changeset
3828 elif not isinstance(value, list):
10
529717676149 Fixed a bug in the code converting a QSettings value to a list.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
3829 return [value]
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3830 else:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
3831 return value
140
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3832
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3833
140
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3834 def toByteArray(value):
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3835 """
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3836 Module function to convert a value to a byte array.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3837
140
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3838 @param value value to be converted
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3839 @return converted data
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3840 """
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3841 if value is None:
1114
a4dad1fff348 Change Preferences to adhere to the same coding style than the rest of the sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
3842 return QByteArray()
140
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3843 else:
64f805e1f105 Fixed a porting bug in NetworkAccessManager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 137
diff changeset
3844 return value
748
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3845
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
3846
748
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3847 def toDict(value):
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3848 """
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3849 Module function to convert a value to a dictionary.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3850
748
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3851 @param value value to be converted
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3852 @return converted data
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3853 """
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3854 if value is None:
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3855 return {}
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3856 else:
eb7e73107d27 Improved the SSL certificate handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 740
diff changeset
3857 return value
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3858
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3859
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3860 def convertPasswords(oldPassword, newPassword):
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3861 """
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3862 Module function to convert all passwords.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3863
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3864 @param oldPassword current master password (string)
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3865 @param newPassword new master password (string)
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3866 """
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9405
diff changeset
3867 from eric7.Utilities.crypto import pwRecode
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3868
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3869 for key in [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3870 "ProxyPassword/Http",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3871 "ProxyPassword/Https",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3872 "ProxyPassword/Ftp",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3873 ]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3874 Prefs.settings.setValue(
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3875 "UI/" + key,
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3876 pwRecode(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3877 Prefs.settings.value("UI/" + key, Prefs.uiDefaults[key]),
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3878 oldPassword,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3879 newPassword,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3880 ),
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3881 )
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3882 for key in ["MailServerPassword"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3883 Prefs.settings.setValue(
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3884 "User/" + key,
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3885 pwRecode(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3886 Prefs.settings.value("User/" + key, Prefs.userDefaults[key]),
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3887 oldPassword,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3888 newPassword,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3889 ),
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3890 )
1680
28e57079dab5 Added capability to encrypt the synchronized data (web browser).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1678
diff changeset
3891 for key in ["SyncFtpPassword", "SyncEncryptionKey"]:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3892 Prefs.settings.setValue(
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
3893 "WebBrowser/" + key,
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
3894 pwRecode(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3895 Prefs.settings.value(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3896 "WebBrowser/" + key, Prefs.webBrowserDefaults[key]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3897 ),
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
3898 oldPassword,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3899 newPassword,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3900 ),
4774
2c6ffa778c3b Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4769
diff changeset
3901 )
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3902
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1123
diff changeset
3903
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3904 initPreferences()
608
d8fea1e76975 Removed capability to write compressed project (and related) files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
3905 initRecentSettings()
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4612
diff changeset
3906
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3907 ###########################################################################
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3908 ## Functions to deal with existing eric6 configuration
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3909 ###########################################################################
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3910
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3911
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3912 def eric6SettingsName():
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3913 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3914 Function to generate the settings file name for eric6.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3915
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3916 @return settings file name
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3917 @rtype str
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3918 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3919 settingsFileName = Prefs.settings.fileName()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3920 return settingsFileName.replace("Eric7", "Eric6").replace("eric7", "eric6")
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3921
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3922
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3923 def hasEric6Configuration():
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3924 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3925 Function to check, if there is an old eric6 configuration.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3926
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3927 @return flag indicating the existence of an eric6 configuration
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3928 @rtype bool
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3929 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3930 return os.path.exists(eric6SettingsName())
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3931
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3932
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3933 def importEric6Configuration():
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3934 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3935 Function to import an old eric6 configuration.
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3936 """
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3937 conversions = (
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3938 ("Editor/WrapLongLinesMode", QsciScintilla.WrapMode),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3939 ("Editor/WrapVisualFlag", QsciScintilla.WrapVisualFlag),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3940 ("Editor/WrapIndentMode", QsciScintilla.WrapIndentMode),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3941 ("Editor/EdgeMode", QsciScintilla.EdgeMode),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3942 ("Editor/AutoCompletionSource", QsciScintilla.AutoCompletionSource),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3943 ("Editor/CallTipsStyle", QsciScintilla.CallTipsStyle),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3944 ("Editor/CallTipsPosition", QsciScintilla.CallTipsPosition),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3945 ("Editor/PythonBadIndentation", QsciLexerPython.IndentationWarning),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3946 ("Editor/EOLMode", QsciScintilla.EolMode),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3947 ("WebBrowser/SearchLanguage", QLocale.Language),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3948 ("RefactoringRope/MouseClickGotoModifiers", Qt.KeyboardModifier),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3949 ("RefactoringRope/MouseClickGotoButton", Qt.MouseButton),
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3950 )
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3951
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3952 filename = eric6SettingsName()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3953 if filename:
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3954 settingsFile = Prefs.settings.fileName()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3955 shutil.copy(filename, settingsFile)
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3956 initPreferences()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3957
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3958 # convert enum related settings
9181
809709f6f1d5 Some code simplification.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9176
diff changeset
3959 for settingsKey, enumType in conversions:
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3960 if Prefs.settings.contains(settingsKey):
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3961 Prefs.settings.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3962 settingsKey, enumType(int(Prefs.settings.value(settingsKey)))
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3963 )
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3964
8571
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3965 syncPreferences()
eb2b840bbf8f Added code to configure eric7 initially with an eric6 configuration file (only run, if no eric7 config exists yet).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8563
diff changeset
3966
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
3967
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4612
diff changeset
3968 #
6305
7652b925c25e Resize auto complete list box to fit with contents.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6300
diff changeset
3969 # eflag: noqa = M201, M613

eric ide

mercurial