Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OWPythonScript: Replace console #5228

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7ff1b7f
__main__: Add darkMode property to QApplication
irgolic Jul 14, 2021
f0fc49e
__main__: Set pyqtgraph colors from QPalette
irgolic Feb 18, 2021
dee377b
owpalette: Remove pyqtgraph colors set on global import
irgolic Jul 14, 2021
774716e
pylint
irgolic Jul 15, 2021
111a4da
Port andreikop/Qutepart 4be1145e73964da1ba06f2570e3bf5d739603fb6
irgolic Aug 16, 2020
6b774e5
qutepart: Adjust for Orange
irgolic Jan 24, 2021
feb1747
owpythonscript: Replace editor for ported QutePart
irgolic Jan 24, 2021
3d35011
owpythonscript: Remove namespaces
irgolic Jan 24, 2021
458857a
owpythonscript: Remove infobox
irgolic Jan 24, 2021
9ac6bf9
owpythonscript: Add fake function signature
irgolic Jan 24, 2021
831a818
owpythonscript: Add vim mode option/indicator
irgolic Jan 24, 2021
a5ef8f6
owpythonscript: Detect encoding onAddScriptFromFile
irgolic Feb 7, 2020
73d0c37
owpythonscript: Remove 'file' keyword
irgolic Mar 14, 2020
ff7ac71
requirements-gui: Require qtconsole
irgolic Jan 24, 2021
01b46fb
owpythonscript: Remove obsolete dropEvent
irgolic Jan 24, 2021
9950a91
test_owpythonscript: Include editor tests
irgolic Jan 25, 2021
f2f88f9
owpythonscript: Add fake return statement
irgolic Feb 1, 2021
9010bd2
owpythonscript: Correctly set editor font
irgolic Feb 1, 2021
5824efe
owpythonscript: Run on Shift+Enter
irgolic Feb 1, 2021
b270b6f
pylint
irgolic Feb 1, 2021
9132c87
owpythonscript: Set DejaVu Sans Mono font on linux
irgolic Feb 2, 2021
ccce0fb
owpythonscript: Keep vim indicator size when hidden
irgolic Jul 14, 2021
e401014
owpythonscript: Name preferences box
irgolic Jul 14, 2021
ce071f9
owpythonscript: Implement darkMode
irgolic Jul 14, 2021
a3e45a2
test_rectangular_selection: Add windows with_tabs variant
irgolic Jul 15, 2021
0d8c29e
[nomerge] replace quietunittest with normal
irgolic Jul 15, 2021
439f030
owpythonscript: Terminate qutepart onDeleteWidget
irgolic Jul 16, 2021
eb37aa6
rearrange comments
irgolic Jan 24, 2021
f40295b
owpythonscript: Refactor names
irgolic Jan 24, 2021
55d1390
owpythonscript: Implement qtconsole as 2nd process
irgolic Jan 24, 2021
dec7a7c
owpythonscript: Remove PythonConsole
irgolic Jan 24, 2021
0a1c85e
owpythonscript: Offer to run kernel in-process
irgolic Jan 31, 2021
4b6ea78
python_serialize: TCP support on windows
irgolic Jul 16, 2021
7b813ef
owpythonscript: Add rubber
irgolic Jul 16, 2021
ccf8b66
owpythonscript: Shutdown kernel onDelete Widget
irgolic Jul 16, 2021
b13770c
owpythonscript: Increment settingsVersion, use inprocess kernel
irgolic Jul 16, 2021
8a5c480
OWPythonScript: Add autocomplete icons
irgolic Jul 21, 2021
d280e12
python_console: Startup stability refactor
irgolic Jul 22, 2021
623fb89
python_console: Handle kernel is None (when in_process)
irgolic Jul 22, 2021
d9002af
python_kernel: Disable stdout/stderr patching on in_process
irgolic Jul 22, 2021
1095f6a
test_owpythonscript: Test in a single instance, also test in_proc
irgolic Jul 22, 2021
866a9d5
test_owpythonscript: Correctly test inprocess namespaces
irgolic Jul 28, 2021
855a00e
[nomerge] trace malloc
irgolic Jul 28, 2021
192b05a
test_owpythonscript: Reorganize tests
irgolic Jul 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion Orange/canvas/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def send_statistics(url):
r = requests.post(url, files={'file': json.dumps(data)})
if r.status_code != 200:
log.warning("Error communicating with server while attempting to send "
"usage statistics. Status code " + str(r.status_code))
"usage statistics. Status code %d", r.status_code)
return
# success - wipe statistics file
log.info("Usage statistics sent.")
Expand Down Expand Up @@ -457,6 +457,20 @@ def main(argv=None):
app.setPalette(breeze_dark())
defaultstylesheet = "darkorange.qss"

# set pyqtgraph colors
def onPaletteChange():
p = app.palette()
bg = p.base().color().name()
fg = p.windowText().color().name()

log.info('Setting pyqtgraph background to %s', bg)
pyqtgraph.setConfigOption('background', bg)
log.info('Setting pyqtgraph foreground to %s', fg)
pyqtgraph.setConfigOption('foreground', fg)

app.paletteChanged.connect(onPaletteChange)
onPaletteChange()

palette = app.palette()
if style is None and palette.color(QPalette.Window).value() < 127:
log.info("Switching default stylesheet to darkorange")
Expand Down Expand Up @@ -560,6 +574,9 @@ def onrequest(url):

stylesheet_string = pattern.sub("", stylesheet_string)

if 'dark' in stylesheet:
app.setProperty('darkMode', True)

else:
log.info("%r style sheet not found.", stylesheet)

Expand Down
1 change: 1 addition & 0 deletions Orange/widgets/data/icons/pythonscript/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions Orange/widgets/data/icons/pythonscript/class.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions Orange/widgets/data/icons/pythonscript/function.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions Orange/widgets/data/icons/pythonscript/instance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions Orange/widgets/data/icons/pythonscript/keyword.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading