Jon Evans
0a044656e3
Disable scripting and warn when wxPython version doesn't match
3 years ago
Jeff Young
66208b0ac0
Silence "menu item ID of 0 doesn't work on Mac" assert.
3 years ago
jean-pierre charras
9501f4303d
Rename CreateWindow to CreateKiWindow to avoid a collision name with a windows header
No code change, but it fix an issue specific to msys2 that bother me when
trying to fix issues with wx 3.0.x version
3 years ago
Marek Roszko
7e089182b8
Swap out deprecated Iconized for IsIconized in python
Supported since wx 3.0, wxpython seems to have dropped it
3 years ago
Jeff Young
64a6fc0fd4
Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
3 years ago
Wayne Stambaugh
7155d1af29
Fix a few more compile warnings.
3 years ago
Marek Roszko
47fe8ff8eb
bitmaps and template are resources.
3 years ago
Marek Roszko
b6b4ae959e
Shuffle around the helper script folders
3 years ago
Ian McInerney
b51d8c9825
Introduce new CMake variable to store kiface install location
3 years ago
Marek Roszko
44296dfea2
Forcefully ignore PYTHONPATH env variable on Windows
Fix https://gitlab.com/kicad/code/kicad/-/issues/11328
4 years ago
Marek Roszko
46f86e51e4
Stuff a resource manifest into the kipython kiface
4 years ago
Seth Hillbrand
455e330f3b
Cleanup a few more raw strings
4 years ago
Seth Hillbrand
5881471a52
Don't write bytecode on MacOS
MacOS packages are signed and checked on each run. Since Python lives
inside the package, adding byte code will break the package signature
4 years ago
qu1ck
b53b68c686
Fix double loading plugins and sys.path entires multiplying
4 years ago
Seth Hillbrand
917845cf00
Ensure we can version scripting properly
Adds Version() and FullVersion() calls to support reporting version to
scripts and scripting window
Fixes https://gitlab.com/kicad/code/kicad/issues/10079
(cherry picked from commit 0a13f15a9d )
4 years ago
Seth Hillbrand
098e8f7d9b
Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1 .
Reverted for updates as this currently breaks kicad-mac-builder
4 years ago
Davide Gerhard
ea9f960cc1
cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
4 years ago
Seth Hillbrand
fe148df57e
Catch language switch before Python
We don't translate the python scripting window yet, so we need to catch
the KIWAY message to change the language and simply discard it
Fixes https://gitlab.com/kicad/code/kicad/issues/10021
4 years ago
qu1ck
8170e2f57c
When reloading plugins delete top level module too
importlib.reload() has some differences in semantics from import
which leads to some plugins not reloading correctly
4 years ago
qu1ck
0f67c7ed25
When reloading plugins don't delete system modules
4 years ago
Seth Hillbrand
182ccb63ae
Remove config options menu from PyShell
We should figure out how to get these into the json settings. In the
meantime, disable as they are broken on close
Fixes https://gitlab.com/kicad/code/kicad/issues/9691
4 years ago
Seth Hillbrand
70df3822b5
Link command IDs to window frame
This should be compatible with both 4.0 and 4.1 of wxPython
Fixes https://gitlab.com/kicad/code/kicad/issues/9432
4 years ago
Seth Hillbrand
93b25b115b
Handle alternate exception
Apparently, some versions throw one exception, some another. We really
don't care which, we just want an ID value
4 years ago
Seth Hillbrand
9a8d1246cc
We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
4 years ago
Marek Roszko
67d24e8b00
Don't try and use a empty config path for startup scripts
Fix #9205
4 years ago
Marek Roszko
1463c9ab01
Init isPcbframe in the correct order
Fix #9205
4 years ago
Seth Hillbrand
f469d02f47
Force fitting of the Python window
Test commit to see if this fixes an issue for macs
Fixes https://gitlab.com/kicad/code/kicad/issues/8622
4 years ago
Seth Hillbrand
8ff20fd97b
Ensure python window splits
The History/Calltips/locals window splits were only being shown when
running SingleTop. For unknown reasons, the crust "CallAfter" routine
was not running, so we force the call
4 years ago
Seth Hillbrand
becc3a228e
Hide Python window on close button
4 years ago
Seth Hillbrand
a5955ecbf7
Don't destroy parents
Now that we are handling windows from inside the KiCad framing system,
python console does not need to destroy its own windows. This may help
prevent some odd preference corruption as well
4 years ago
Seth Hillbrand
38cdc362a0
Don't fail if we can't create startup file
Fixes https://gitlab.com/kicad/code/kicad/issues/9205
4 years ago
Seth Hillbrand
73401932f7
Fix python help() parser
Fixes https://gitlab.com/kicad/code/kicad/issues/9191
4 years ago
Jeff Young
b84d1456d5
KIFACE_I -> KIFACE_BASE.
4 years ago
jean-pierre charras
57cfde3123
kicad_pyeditor.py: add missing imports
Fixes #9109
https://gitlab.com/kicad/code/kicad/issues/9109
4 years ago
Mikolaj Wielgus
0c66cb85e3
Python console: Adjust dark theme colors to look better
Fixes https://gitlab.com/kicad/code/kicad/issues/8928
4 years ago
qu1ck
0f7c0e3872
PCM implementation
5 years ago
qu1ck
78ab69027d
Add 3rdparty/plugins to plugin search
4 years ago
jean-pierre charras
7a7eee86ce
kicad_pyshell/__init_py: avoid loading pcbnew module if the board editor is not open.
It happens when opening the python console from Eeschema.
In this case, and on msys2, Pgm() returns a null pointer because the pcbnew
application is not initialized, and the first call to Pgm()
from a python script crashes Kicad
4 years ago
jean-pierre charras
eece74efa7
kicad_pyeditor.py: remove useless "import pcbnew" that create issues when created from Eeschema
4 years ago
Seth Hillbrand
e87fdf06c1
Wrap GetNewId() for older wxPythons
18.04 and earlier use wxPython 4.0.1 that doesn't have the new Id call.
This wraps the id to use the earlier version if the newer one is not
available
Fixes https://gitlab.com/kicad/code/kicad/issues/8887
4 years ago
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
4 years ago
Marek Roszko
7ff9806386
Add skipped pdb copy to kipython
4 years ago
Seth Hillbrand
76a6177eb7
Re-direct help() output to console
Keeps a copy of stdin as well, so that re-assigning this in the python
window does't close the output
Fixes https://gitlab.com/kicad/code/kicad/issues/8047
4 years ago
Wayne Stambaugh
6c3ba1c20b
Coverity issue fixes.
Issues #332032 , #332086 , #332157 , and #332171 .
4 years ago
Jeff Young
0dfb5fcaf9
Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
4 years ago
Jon Evans
b611da161e
Ensure console can be loaded from Eeschema standalone
PcbNew sets up the correct path as a side-effect of loading
the action plugins.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8661
4 years ago
Peter Montgomery
b4f5b6ef3c
Update environment var for Python to allow running from build or install folder
4 years ago
luz paz
f968fc8719
Fix source comment / documentation typos
4 years ago
Marek Roszko
0ffabf5e70
Shift the msvc specific pythonhome init
4 years ago
Marek Roszko
ab82b01714
Evict the last bits of wx.h
4 years ago