Commit Graph

70 Commits

Author SHA1 Message Date
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Jon Evans 7fda7438f9 BOM dialog: explain when we can't find scripts
Also default to the user plugin dir when adding a new plugin,
and don't convert filenames to full path on save.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7719
2021-02-25 22:41:12 -05:00
Jon Evans 8d62c73b86 Eeschema: overhaul storage of BOM plugin settings
CHANGED: BOM generator plugins are no longer loaded by
         searching all plugin directories; instead a
         fixed default set of plugins is provided.

Also:

- Move from sexpr to JSON
- Support both full-path and no-path specifications of plugins
- Add a Reset to Defaults button to reset the list

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7633
2021-02-24 22:45:42 -05:00
Marek Roszko b609c7dcd6 Kick the osx specific path helpers into PATHS 2021-02-16 23:29:26 -05:00
Jeff Young 41234a8373 Implement more precise annotation-required messages.
Also moves the message to an infobar so it's more noticeable.

Fixes https://gitlab.com/kicad/code/kicad/issues/7332
2021-01-30 16:31:27 +00:00
Seth Hillbrand e4c77f3a47 Remove non-existant BOM plugins
Fixes https://gitlab.com/kicad/code/kicad/issues/7053
2021-01-11 13:50:15 -08:00
Michael Kavanagh 154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
Jeff Young 78129aabeb Fix another case of 413ff4525b. 2020-12-07 14:25:55 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 6654c03041 Embarking on the next adventure: component -> symbol. 2020-11-15 20:23:15 +00:00
Jeff Young 1d110d5414 Move a couple more dialogs to QuasiModal for syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/5897
2020-10-29 22:55:33 +00:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
jean-pierre charras 539ac4c214 Remove a few include<wx/wx.h> in many files that do not actually use this include. 2020-10-19 09:00:50 +02:00
jean-pierre charras bda275de46 more cleanup about removing useless include 2020-10-03 11:48:16 +02:00
Jeff Young 15c136ead2 Make a bunch of help dialogs modeless.
Fixes https://gitlab.com/kicad/code/kicad/issues/5334
2020-08-24 23:17:33 +01:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Wayne Stambaugh 037898f6fb Eeschema: add support for excluding symbols from board.
ADDED: Support for excluding symbols from board during.  This allows for
creating bill of materials only symbols.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2522
2020-06-10 10:57:28 -04:00
Jon Evans a63df2fbf0 Remove BuildNetListBase from netlisting paths 2020-05-23 13:14:05 -04:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
jean-pierre charras cc47062b17 Fix a few Coverity issues 2020-03-23 16:17:22 +01: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
jean-pierre charras 19e92c9d11 Eeschema: replace dialog_bom_help.html by dialog_bom_help.md The .md files are smaller and translatable. 2019-12-29 11:16:18 +01:00
Seth Hillbrand 5151cd0bfe C++14: Remove unused make_unique.h
Also removes header references now that we are in C++14, this is
built-in to the std
2019-08-07 09:27:31 -07:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643

Fixes: lp:1832357
* https://bugs.launchpad.net/kicad/+bug/1832357

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
Ian McInerney c8cd95a718 eeschema: Force focus on dialog after BOM creation
Fixes: lp:1834698
* https://bugs.launchpad.net/kicad/+bug/1834698
2019-06-28 19:31:00 -07:00
jean-pierre charras 611878351a BOM and Netlist dialogs: replace "plugin" by "generator" and/or "script".
The "plugins" in these dialogs are not plugins.
They are external scripts (or applications) run from Eeschema.
2019-05-31 11:06:23 +02:00
Jon Evans 5cf82f1a9e Begin refactoring netlist creation 2019-03-31 19:55:12 -04:00
jean-pierre charras e7fa02a9f0 DIALOG_BOM: fix a few issues. Mainly an annoying issue when a plugin file was not found
Previously, all the dialog setup was lost.
2019-01-14 13:14:13 +01:00
Seth Hillbrand 3b54a44540 wildcard strings update
Replace a few other cases where we used Windows-only or *nix specific
wildcard strings
2019-01-05 20:26:45 -08:00
Jeff Young ad0d9f8df0 Save user-defined nicknames.
While name and path fields would make more sense, this commit
encodes the nickname as an "opts" field so that older versions will
still read the preferences file.
2018-12-28 20:34:06 +00:00
jean-pierre charras 8522baf4a7 bom_plugins.cpp: fix incorrect command line for python scripts on Windows.
* On Windows, a python command line must be python <script_path>/script.py
and not python <script_path>\script.py
* Fix also a incorrect warning message when a script is not found.
2018-11-19 17:50:38 +01:00
Maciej Suminski 2ee2d9014a Populate BOM plugins list if the list is empty
Fixes: lp:1464893
* https://bugs.launchpad.net/kicad/+bug/1464893
2018-11-19 16:17:53 +01:00
Maciej Suminski 15772e4b0b BOM plugins refactor
Extended BOM_PLUGIN to a class and moved the plugin construction related code there.
2018-11-19 15:59:08 +01:00
Wayne Stambaugh ce34a713b4 Eeschema, make BOM tool add file dialog remember last used path.
Fixes lp:1797679

https://bugs.launchpad.net/kicad/+bug/1797679
2018-10-25 10:33:19 -04:00
Jeff Young 65f62f93ef Fix MSW spacing issues. 2018-08-21 10:34:41 +01:00
Jeff Young d72fdaed29 Rewrite Library Symbol Properties dialog.
Fix the user-model issues around aliases and alias selection.
Fold Library Symbol Fields into Library Symbol Properties.
Update to the new look.

Fixes: lp:1744773
* https://bugs.launchpad.net/kicad/+bug/1744773

Fixes: lp:1766205
* https://bugs.launchpad.net/kicad/+bug/1766205

Fixes: lp:1786339
* https://bugs.launchpad.net/kicad/+bug/1786339
2018-08-14 13:54:04 +01:00
jean-pierre charras ce3760438c Fix a few wxWidgets minor asserts. Fix also a missing bitmap button initialization.
Fixes: lp:1783703
https://bugs.launchpad.net/kicad/+bug/1783703
2018-08-02 13:22:11 +02:00
Jeff Young 7c3a67191b Freshen the BOM dialog.
Layout freshened to include standard button layout.
Fall-behind Add Plugin dialog also fixed.

(cherry picked from commit 30dac89)
2018-07-17 15:13:22 +01:00
jean-pierre charras 9a462d9414 dialog_bom: modify the way a command line is created (python scripts on windows only) to call python scripts
For some reason, when calling python and giving a full filename script, the last separator in the filename
must be '/', not '\'.
Otherwise the import command inside the script does not find files to import in the same folder as the script.

We cannot replace blindly '\' to '/' in command line because it does not work for file on a server (name starting by \\server_name\).
So the fix is just replacing one '\' in python script full filename.
This is not perfect, but at least it works for newly created plugin commands.
2018-02-23 09:50:15 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 47dfabc6c8 Add size control to HTML_MESSAGE_BOX. Fix incorrect default size of a few dialogs.
Clean code: remove useless code and not used parameters.
2018-01-11 10:48:52 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Russell Oliver 869743d573 Kicad Eagle Project Import Improvements. -- schematic and board files are both visible in file selection dialog. -- Allows for the selection of either the board or schematic file. -- silently fails on not detecting the corrosponding board or schematic file. -- all new kicad files are generated in new project directory -- Silently read netlist without generating annotation warnings which synchronises timestamps and paths based on given eagle references, otherwise renumbering schematic references will break links accross schematic and pcbnew. 2017-10-20 08:58:40 +02:00
jean-pierre charras e626136e29 Eeschema: boom generator: ugly fix on Windows to allow xsltproc.exe working from the command line created from bom dialog.
(On windows, xsltproc.exe does not accept '\' in output filename, only '/' like on Unix, so this separator is converted when possible)
Minor code cleanup
2017-10-09 20:57:41 +02:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
Diogo Condeco 75ffcbcef5 MACOS Setfocus and CancelButtonIssue moved into dialog_shim.
Setfocus now works on macos dialogs by setting DLGSHIM_USE_SETFOCUS.
This option is only enabled __WXMAC__ is defined.

FixOSXCancelButtonIssue() is now called inside DIALOG_SHIM::SHOW.
All other calls from within the dialogs were removed.
2017-01-29 23:51:35 +01:00
Simon Richter b0f9864bc4 Clean up warnings from exception handlers
The exception objects caught are either not referenced at all, or only in
debug builds. This avoids the warnings for the unused variables.
2016-10-10 11:08:49 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00