Commit Graph

70 Commits

Author SHA1 Message Date
Seth Hillbrand a5e6f11682 Fix crash when closing non-modal 2023-01-12 13:21:22 -08:00
Seth Hillbrand fa91d906d0 Fix event blocker on GTK
We block events when a modal window is active.  But detecting when the
modal window is closed is harder on GTK than just counting modal closes
because the modal flag can sometimes be unset before the wxEVT_SHOW
event fires.  Instead, we track the stack of modal windows opened and
close the window and subsequent windows when the object pointer matches

Fixes https://gitlab.com/kicad/code/kicad/issues/13372
2023-01-12 11:53:00 -08:00
Marek Roszko 3fe004fd1b New kicad-cli will now be the cli interface 2022-10-04 22:24:13 -04:00
jean-pierre charras 4611817f25 Eeschema: fix a crash when invoking eeschema.exe with 2 filenames to open
Fix also a minor compil warning
2022-10-04 16:56:13 +02:00
Marek Roszko 7d16fba8f9 Fix launching of files 2022-10-04 07:32:22 -04:00
Mark Roszko fb8a4c10f7 Shove kicad2step into pcbnew itself with a new cli 2022-10-04 01:53:37 +00:00
Seth Hillbrand b5bf1da251 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

Fixes https://gitlab.com/kicad/code/kicad/issues/11891

Fixes https://gitlab.com/kicad/code/kicad/issues/11772
2022-07-13 19:25:24 -07:00
jean-pierre charras 60c65c2a1d Avoid loading python stuff when starting applications that do not use it.
It is useless, and debug is slightly easier (less constraints) at least on msys2
2021-08-17 19:48:55 +02:00
jean-pierre charras 450b0c9e27 single_top.cpp: re-add lines removed by commit 5fa5a73c, needed in stand-alone.
Otherwise, the main frame created in stand-alone mode is never shown.
2021-06-24 09:04:27 +02:00
Jeff Young 5fa5a73c6d File open/import progress dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/6864

Fixes https://gitlab.com/kicad/code/kicad/issues/2166
2021-06-23 23:55:54 +01:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Seth Hillbrand f274a00c08 Remove PYTHON_* compile options 2021-06-01 20:18:24 +00:00
Ian McInerney 41f88dbabc Refactor platform-specific init into two phases
The first phase is for the environment before the OS
apps are created, and the second phase is for after
the OS app is created but before all of our processing.

Fixes https://gitlab.com/kicad/code/kicad/issues/7992
2021-03-23 19:11:08 +00:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Ian McInerney 3036683a2c Move platform-specific init tasks into KIPLATFORM 2021-03-19 21:26:07 +00:00
Jeff Young b47453a93b Fix app names in Quit menu items on Mac. 2021-03-09 16:45:33 +00:00
Marek Roszko b1d394258f Fix grammar 2021-01-22 21:25:23 -05:00
Marek Roszko 320ca5a0d0 Prevent KiCad launch on Windows 7 if python 3.8 or newer is bundled
Soon to be a permanent check regardless of python on Windows
2021-01-21 21:58:53 -05:00
jean-pierre charras eb7dc6ddd9 Minor fixes. In stand alone show the frame as soon as possible.
Especially when running Pcbnew to open a complex board the frame is shown faster.
Add also a busy cursor when loading files and building the data.
2020-12-21 17:44:10 +01:00
Jeff Young fc2bdc49de Once more into the depths of hell... er, I mean fix a focus issue.
So the new steals-focus protection stuff works well when there's a
focused control, but not as well when there's a modal dialog up which
happens not to have a focused control (or worse, a focusable control).

This adds a second mechanism for also checking to see if a modal dialog
is up (something that wxWidgets, true to form, makes very difficult).

Fixes https://gitlab.com/kicad/code/kicad/issues/6520
2020-11-26 16:47:40 +00:00
Marek Roszko 5100f720ef Don't hard crash on a failed kiway player due to null reference
This is possible if a kiface fails loading due to missing dlls, etc
2020-11-13 21:42:32 -05:00
Seth Hillbrand 7997456893 Update single_top.cpp to fix errant "footprint" text 2020-10-21 18:13:31 +00:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
Marek Roszko 2b2e8552be Turn off the leak dumping under MSVC as wxWidgets causes it to falsely report dumps on exit 2020-10-08 17:08:01 +00:00
Jon Evans e27786de2d Fix double call of OnPgmExit
Also fix bad filename being passed to pcbnew when starting
from a blank schematic in standalone mode

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5786
2020-10-04 18:39:33 -04:00
jean-pierre charras 36bc44e6d7 more cleanup about removing useless include 2020-10-02 19:56:10 +02:00
Ian McInerney c458b50fd9 Ensure the environment variables are synchronized between KiCad and Python
Before this, the environment variables inside Python wouldn't reflect
the updates to them made after the interpreter was started in Pcbnew.
This will call into Python and set the variables when they are changed,
since Python can't synchronize itself when running in an embedded
interpreter.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 19:56:12 +01:00
Seth Hillbrand 7e3a338518 Move warning flags to proper place
Cleans unitialized warnings in wxApps
2020-07-02 12:17:45 -07:00
jean-pierre charras 825d202480 Fix some strings to help translation.
Remove translation mark for strings used in debug, or strings
that cannot be translated (for instance because they are char strings
instead of wide char strings)
2020-04-23 07:40:19 +02:00
Jeff Young 94e2690fed Fix compile issue on clang. 2020-04-20 17:19:29 +01:00
Jon Evans b802a3e776 Add command-line option to generate netlist and exit 2020-04-19 19:13:24 -04:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
Seth Hillbrand 51fce4bad8 Force X11 on linux
Wayland is not yet compatible with wxWidgets (or rather the other way
around).  Until this happens, we must force the x11 compositor while
running.  Under wayland, this will map to the wayland-x11 compatibility
layer.

Fixes: lp:1816637
* https://bugs.launchpad.net/kicad/+bug/1816637
2019-02-26 08:51:12 -08:00
Seth Hillbrand 484c1f63ba gtk3: Force GTK2-style input handling
GTK3 provides for additional input devices via xinput2.  These include
touchscreens and continuous scroll devices.  But wxWidgets does not have
specialized handlers for these events, so they double up for some
devices.  Until wxWidgets allows us to handle these events, we specify
that the input handler should be the old-style GDK_CORE.
2019-02-19 11:03:20 -08:00
Seth Hillbrand 69c1263c02 GTK3: Force scrollbars visible
GTK3 does a fade in/fade out routine for scrollbars by default.  This
was problematic as it caused a cascade of full-screen repaint events on
each mouse event.  Instead of disabling scrollbars (which only helped
the full canvas), we force the old scrollbar behavior is environmental
variables.

Revert "gtk3: Remove scrollbars"

This reverts commit db43bd82a7.
2019-02-19 10:52:39 -08:00
Jeff Young e45afdb912 Revert absolute-path asserts and fix off-by-one bug.
Fixes: lp:1767582
* https://bugs.launchpad.net/kicad/+bug/1767582
2018-09-15 22:36:09 +01:00
jean-pierre charras 361366bbbc wxHtmlWindow doesn't render HTML text when used only inside our .kiface dll. (Windows and Linux)
* When a wxHtmlWindow is used *only* in a dll/so module, the Html text is displayed
* as plain text.
* this patch forces wxHtmlWinParser initialization to avoid this issue
*see https://groups.google.com/forum/#!topic/wx-users/FF0zv5qGAT0

Fixes: lp:1783544
https://bugs.launchpad.net/kicad/+bug/1783544
2018-07-28 07:19:22 +02:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Tomasz Włostowski bcde2a77e2 common/single_top: allow to launch footprint editor from the command line (--frame switch) 2017-10-19 23:15:48 +02:00
Simon Richter ef0a5ff71c Make Mac-specific function conditional
If we want to have an override marker on this function, it needs to be
conditional on Mac.
2017-03-08 10:24:59 -05:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Dick Hollenbeck 9ad49dc2d1 Split IO_ERROR out of richio.* and store Problem() and Where() separately 2016-09-20 11:56:18 -04:00
Dick Hollenbeck 0715504a9e remove support for in processing setting of ld library path 2016-05-16 21:04:20 +02:00
jean-pierre charras f7b8ac52e1 Disable proxy menu in Unity window manager. Only usual menubar works with wxWidgets (at least <= 3.1). When the proxy menu menubar is enable, some important things for us do not work: menuitems UI events and shortcuts. Also issues when switching from Legacy to GAL display mode. 2015-09-14 09:58:31 +02:00
Maciej Suminski 5cd464f244 Exit gracefully when there are errors during initialization. 2015-08-07 17:07:43 +02:00
jean-pierre charras f18aef8182 Minor fixes: Bug #1478279 : wrong icon in "YES/NO" dialog; Bug Bug #1478278 (crappy warning/log messages) 2015-07-26 19:50:13 +02:00
Wayne Stambaugh c288d200fb Minor wxPython scripting improvements.
* Wrap Pgm().OnPgmExit() changes in APP_SINGLE_TOP to build conditionally
  when KICAD_SCRIPTING_WXPYTHON is enabled.
* Check the result of loading the correct wxPython version during
  initialization.
2015-06-27 15:05:26 -04:00