Commit Graph

1213 Commits

Author SHA1 Message Date
Seth Hillbrand 8757b3f98a Catch errors thrown from `at()`
at() can throw when it doesn't find the proper reference.  This catches
the errors and attempts to properly handle them assuming the user
initiated the removal.  Warns the developer (wxLogDebug) when this is
not the case

Fixes https://gitlab.com/kicad/code/kicad/issues/12241
2022-08-22 11:57:13 -07:00
jean-pierre charras 1a18f9a839 Kicad/PCM: Better message asking for **plugins** update.
Previous message asked for update, but the update is not for Kicad, only for loaded plugins
2022-08-21 08:39:42 +02:00
qu1ck e19e039a47 PCM: fix crash in background update on project switch
Fixes #12244
2022-08-19 15:18:19 -07:00
Jeff Young 508df402f6 Cleanup. 2022-08-19 18:54:19 +01:00
jean-pierre charras e0fbe2542f Fix a few compil and Coverity warnings. 2022-08-19 10:53:29 +02:00
Seth Hillbrand 5ed7e28252 Remove KICAD_OCC build option
We don't really support builds without OCC these days.  Removing to
clear up build flags and settings
2022-08-18 17:06:29 -07:00
qu1ck f4fa3b02c5 PCM: automatic check for repository updates 2022-08-18 20:41:43 +00:00
Wayne Stambaugh 898ec0d094 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.
2022-08-15 08:00:40 -04:00
Jeff Young 5c9aed62aa Use wxWidgets IDs for cut/copy/paste.
This allows them to work in places like search boxes in standard file
dialogs.  If wxWidgets doesn't find the standard IDs in our menus
then it won't enable them.
2022-08-07 11:28:16 +01:00
jean-pierre charras 4915f6ca20 Fix a few compil warnings 2022-07-30 14:06:51 +02:00
jean-pierre charras 4d48376eae Fix some warnings detected by PVS-STUDIO (not used vars) 2022-07-26 16:00:14 +02:00
Mark Roszko 097f30a272 Move the PCM download cache to PATHS::GetUserCachePath
Second commit for https://gitlab.com/kicad/code/kicad/-/issues/10165
2022-07-22 14:40:55 +00:00
Marek Roszko a855be28fa Move the PCM cache to PATHS::GetUserCachePath
It still remains that on Windows, Documents can be bounded to network or cloud storage.
AppData\Local is intended for local PC caching.

Fix https://gitlab.com/kicad/code/kicad/-/issues/10165
2022-07-21 23:19:14 -04:00
Seth Hillbrand 93fb00d815 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

Fixes https://gitlab.com/kicad/code/kicad/issues/11891
2022-07-14 11:37:45 -07:00
jean-pierre charras 4db72f2d55 Fix minor compil and Coverity warnings. 2022-07-07 12:38:34 +02:00
Seth Hillbrand 2f7de851f4 Remove variable shadows 2022-07-06 16:05:20 -07:00
qu1ck 955c5d039e PCM: package update functionality
Adds package update available state, package update operation and all
the corresponding logic around it to make updating package to another
version easy.
2022-07-06 22:37:21 +00:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs.  This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta.  It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00:00
Seth Hillbrand a852286eb5 Cleanup compile warnings 2022-06-21 17:04:56 -07:00
qu1ck 06028d5015 PCM: fix kicad version restriction logic
The json schema for packages implies that kicad min/max version
restriction takes major.minor.patch string but actual logic
only checks major and minor.

This fixes the logic to work with full major.minor.patch tuple.
Additionally the version max logic will substitute missing portions
with 999 for a reasonable default so that say 7.1 is still considered
as >= 7.1.5 when checking for max version.

Reported here
https://forum.kicad.info/t/updating-already-installed-plugins-using-content-manager/35532/5?u=qu1ck
2022-06-14 17:18:25 +00:00
Marek Roszko bccc2f5792 Fix LEGACYFILEDLG_NEW_PROJECT build error 2022-06-11 23:45:22 -04:00
Marek Roszko 415af260a4 Fix the naming of the kicad filedlg customize headers 2022-06-11 23:04:15 -04:00
Marek Roszko ff94d289c7 Move the eeschema standalone to the new save dialog 2022-06-11 22:06:42 -04:00
Marek Roszko 577f59f570 Add usage of the new filedlg customize api for improved windows file dialogs 2022-06-11 21:45:38 -04:00
Jeff Young cff52c70d0 Handle empty directories in template projects.
Fixes https://gitlab.com/kicad/code/kicad/issues/10191
2022-05-31 17:48:38 +01:00
Jeff Young 2f2c506926 Coding conventions. 2022-05-31 17:48:38 +01:00
jean-pierre charras 2701642b1b minor fixes and French translation update 2022-05-30 11:23:20 +02:00
canwail c44b15e9f5 PCM: remove redundant calculations on resize 2022-05-25 00:08:50 +00:00
qu1ck 3dd5600f95 Remove forward_declare in dialog_manage_repositories_base 2022-05-23 14:06:36 -07:00
qu1ck 0b7c79ea44 PCM: add "Add default" to manage repositories dialog
Allows to restore default repo url if it was removed.

Fixes #9588
2022-05-23 20:40:12 +00:00
Jeff Young fe17dca71f Remove programmer-oriented message that clobbers project path.
Fixes https://gitlab.com/kicad/code/kicad/issues/10749
2022-05-21 23:20:22 +01:00
qu1ck d252ce9026 PCM: Add "Open Package Directory" to main dialog
Fixes #10411
2022-05-13 05:15:46 -07:00
lulu731 f4f3638103 Adding drag and drop project file feature.
ADDED Drag and drop of project file from file explorer to Kicad manager window.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8146
2022-05-12 22:38:45 +00:00
Seth Hillbrand cdd0145490 Remove debugging cout
(cherry picked from commit e317818076)
2022-05-12 15:31:15 -07:00
Seth Hillbrand dedbcac3ae Enable/Disable the apply/discard buttons
When there are no pending actions, we should not show the user the
ability to apply/discard the pending actions.  This uses wxUpdateUI in
the correct manner, limiting it to only the elements being updated and
using the event actions to ensure we don't have a cascade

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

(cherry picked from commit 09a2d50e09)
2022-05-11 13:51:33 -07:00
Seth Hillbrand 40e0d06381 Don't wait after installing from ZIP
The extraction process completes prior to the call to KeepRefreshing(),
so we should only let it update once and close

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

(cherry picked from commit d9ec998ff0)
2022-05-11 11:42:43 -07:00
Jeff Young cc18c31cb5 Fix some layout issues in the Project Template Selector.
Fixes https://gitlab.com/kicad/code/kicad/issues/5222
2022-04-18 22:45:02 +01:00
Marek Roszko 392ed5fecd Add policy to enable/disable pcm 2022-04-12 10:08:34 -04:00
Marek Roszko f88e0481c8 Change the behavior of ACTION_MENU::Add to require clones if required outside the function
This reverts commit 2a5769607f.
2022-04-11 19:03:01 -04:00
Seth Hillbrand 2a5769607f Revert "Change the behavior of ACTION_MENU::Add to require clones if required outside the function"
This reverts commit 403992a6f4.
2022-04-11 11:39:03 -07:00
jean-pierre charras ac8e2d0768 Ensure "Open Recent" and "Clear files" menu titles are updated after language change. 2022-04-11 11:09:05 +02:00
Marek Roszko 403992a6f4 Change the behavior of ACTION_MENU::Add to require clones if required outside the function
Fix https://gitlab.com/kicad/code/kicad/-/issues/10994
2022-04-10 22:38:13 -04:00
Marek Roszko 5bb2cdf73d Revert "Stop leaking submenu items"
This reverts commit 34c70a51ea.
2022-04-10 22:33:43 -04:00
Marek Roszko 34c70a51ea Stop leaking submenu items
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
2022-04-10 22:04:48 -04:00
Jeff Young 08b7842c03 Fix compile warnings. 2022-04-10 17:29:47 +01:00
Jeff Young c4b6801f3a Improve some strings and measurements.
Fixes https://gitlab.com/kicad/code/kicad/issues/10482
2022-03-03 22:40:18 +00:00
Jeff Young 8d28fe962f Don't rename archives when doing a project save-as.
Fixes https://gitlab.com/kicad/code/kicad/issues/10184
2022-02-27 23:15:07 +00:00
jean-pierre charras 898d0e42cc Kicad manager: fix a typo 2022-02-21 17:28:29 +01:00
jean-pierre charras 0cc47d98f5 Kicad manager: show *.zip files in project tree. 2022-02-21 12:54:43 +01:00
Marek Roszko d9c04da407 Sprinkle in some make_unique 2022-02-05 21:26:36 -05:00
Wayne Stambaugh 00ba580915 Don't create new project on save as when project file already exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10625

(cherry picked from commit c875af48e7)
2022-02-05 12:00:54 -05:00
jean-pierre charras 1440c0a2d2 minor fix 2022-02-01 18:07:14 +01:00
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
2022-01-31 15:57:56 -08:00
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.
2022-01-28 15:49:37 -08:00
Marek Roszko 8030bf1cc4 Implement use of the kicad nightly icon where needed 2022-01-23 09:21:07 -05:00
Seth Hillbrand fd9d923bb7 Do not call SafeYield on close
wxSafeYield() is not "safe".  Pending actions may include deletion of
the currently active class.  This will cause crashes when exiting.  If
needed for specific behaviors, we should use wxSafeYieldFor( flag ) with
the appropriate events specified rather than a general yield which can
cause more problems

(cherry picked from commit 9864337914)
2022-01-06 12:36:51 -08:00
qu1ck 211820a689 Remove KICAD_PCM cmake option 2022-01-03 04:16:42 +00:00
qu1ck 721403eb0e PCM: sort installed packages by date 2022-01-03 04:14:17 +00:00
Simon Richter d25fe17b28 Bump minimum required CMake version to 3.11
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
2022-01-01 21:35:08 -05:00
Marek Roszko 3f711b8958 Add win32 VERSION_INFO resource blocks for the DLLs 2021-12-28 23:54:27 -05:00
Wayne Stambaugh fcc497509a Don't treat project Save As path as a path and file name.
The single string ctor of wxFileName treats the string as a path and file
name.  If there is a dot in the last path name, it assumes that the last
path is actually a file name and extension.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10116
2021-12-26 17:02:54 -05:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young 84a9732497 PCM strings. 2021-12-24 18:13:06 +00:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
jean-pierre charras 40752afafd DIALOG_TEMPLATE_SELECTOR: Force display refresh after selecting a path
For some reason the panel showing the templates did not show the new selection
Fixes #10106
https://gitlab.com/kicad/code/kicad/issues/10106
2021-12-24 11:40:20 +01:00
Seth Hillbrand a4db439cf8 Move quitting flag to manager quit
The flag is to protect against the frame going out of scope with the
references intact.  This shouldn't be in CloseProject because we close
the project without removing the frame.  Instead, placing it in OnExit
gets set correctly when closing the whole project manager

Fixes https://gitlab.com/kicad/code/kicad/issues/10018
2021-12-17 13:10:27 +00:00
jean-pierre charras 0f728e4d67 Fix some issues in PCM code.
Try to fix 9955, due to a problem with WX_PROGRESS_REPORTER (issue with its parent)
Fixes #9955
https://gitlab.com/kicad/code/kicad/issues/9955
2021-12-12 18:25:31 +01:00
jean-pierre charras 3a04a1ee64 Fix incorrect use of NULL (aka nullptr on wxWidgets) instead of 0 2021-12-12 09:09:50 +01:00
Jeff Young 329f00acdc Fix logic error in Save As recursion guard.
Fixes https://gitlab.com/kicad/code/kicad/issues/9916
2021-12-09 17:04:40 +00:00
jean-pierre charras 0ba11e9856 Kicad manager: minor cosmetic enhancement: show a busy cursor when launching an editor 2021-12-06 20:03:31 +01:00
Ian McInerney ab797d191f Disregard the project manager window size on migration
An old size for the window could cut off the PCM button if it were
migrated, so to ensure the button is visible, just always use a fresh
window size on migration.

Fixes https://gitlab.com/kicad/code/kicad/issues/9649
2021-12-03 01:43:53 +00:00
Seth Hillbrand 84cfa052a1 Unify KiCad Manager title bar versions 2021-11-29 16:19:37 -08:00
Jon Evans fca3367873 PCM: Disable actions while task manager is open
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9788
2021-11-27 08:46:19 -05:00
jean-pierre charras d03a13b8d8 Kicad and PCM: fix some (minor) issues:
- do not use KICAD_MANAGER_CONTROL::Execute() to run PCM: it is not an external app.
- add a workaround to avoid keeping incorrect focus on buttons in PANEL_KICAD_LAUNCHER.
Fixes #9780
https://gitlab.com/kicad/code/kicad/issues/9780
2021-11-26 10:52:52 +01:00
qu1ck 78aa76d0e6 PCM: reuse download prrogress dialog 2021-11-25 21:23:23 +00:00
Jon Evans 250de83bf2 Prevent divide-by-zero in DIALOG_PCM_PROGRESS 2021-11-25 16:23:16 -05:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Wayne Stambaugh 802cfc1a7d Don't allow project files to be renamed or deleted in project tree pane.
This prevents any potential breakage of a project due to the file changes.
It is overly zealous because the project manager doesn't actually have any
knowledge of which files belong to the project.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9654
2021-11-19 11:39:24 -05:00
Jeff Young c01649fc6e Make it easier to open legacy files. 2021-11-19 13:36:14 +00:00
jean-pierre charras cc339e56a2 Kicad manager: fix a minor cosmetic issue when clicking on a launcher button.
- On GTK the next button was gaining the focus.
- On MSW the button disappears a bit of time.
Fixes #9676
https://gitlab.com/kicad/code/kicad/issues/9676
2021-11-18 13:44:23 +01:00
jean-pierre charras cf334b1ebb PCM: fix a minor cosmetic issue when resizing the dialog.
Fixes #9647
https://gitlab.com/kicad/code/kicad/issues/9647
2021-11-18 10:57:52 +01:00
Seth Hillbrand a699cccaaf Fix two string issues
Comp -> Compatible
Update string reference to changed string
2021-11-16 10:38:56 -08:00
Seth Hillbrand f950d96324 Prevent dereferencing frame on exit
Processing a menu event for quitting results in the frame being
destroyed.  This crashes the program when it tries to access the newly
freed frame to check for autosave data.  We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss

Fixes https://gitlab.com/kicad/code/kicad/issues/8638
2021-11-15 10:07:28 -08:00
qu1ck 6264dd40ea PCM: don't ignore schema validation errors 2021-11-15 13:46:05 +00:00
qu1ck 2340f82091 Fix empty space in pcm packages view 2021-11-15 10:44:17 +00:00
Jeff Young 47cb7f53fd Stope event propagation when closing project.
Fixes https://gitlab.com/kicad/code/kicad/issues/8638
2021-11-15 00:13:09 +00:00
qu1ck 338d13c1b5 PCM models -> 3dmodels 2021-11-14 15:08:28 -08:00
Jeff Young 5da876af26 Another attempt to fix the inactive scrollbar on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/9559
2021-11-14 20:47:25 +00:00
Jeff Young 9bb5310fa5 Implement distructive-button-spacing as per Mac UI guidelines. 2021-11-14 20:33:32 +00:00
Jeff Young 66d9e7073f More discrete borders for Kicad mgr, PCM and appearances panels.
Fixes https://gitlab.com/kicad/code/kicad/issues/9616
2021-11-14 15:01:44 +00:00
Jeff Young 36fd62ccdc Another round of beautification changes for PCM.
Fixes https://gitlab.com/kicad/code/kicad/issues/9616
2021-11-14 13:11:19 +00:00
qu1ck bef43f975d Increase pcm package id allowed length to 100 2021-11-13 13:34:15 -08:00
Jeff Young e3ddc412d2 Better selection colour for PCM packages. 2021-11-13 19:45:10 +00:00
Mikolaj Wielgus 0b59246279 PCM: Select the preferred version first in version grid 2021-11-13 18:02:16 +00:00
Mikolaj Wielgus 0e4e9206ff PCM: Make version grid only selectable by rows, not individual cells
And select the first row from the top by default.
2021-11-13 18:02:16 +00:00
Mikolaj Wielgus 00aa4f3393 PCM: Disable Download, Install buttons when they're non-functional
Fixes https://gitlab.com/kicad/code/kicad/issues/9584
2021-11-13 18:02:16 +00:00
jean-pierre charras b3d44515c9 PCM: call finishDialogSettings(); to run sizer final calculations in dialogs 2021-11-13 15:21:43 +01:00
Jeff Young 2f99621bd3 Fix some layout issues; change packaage highlight scheme. 2021-11-13 11:21:29 +00:00
Mikolaj Wielgus 921105330a Remove printing files from Project Manager 2021-11-12 20:18:32 +00:00
Mikolaj Wielgus aa0a00dee7 PCM: Auto select on download/install if there is only one version 2021-11-12 19:05:27 +00:00
Jeff Young 2515948a7b Jiggle things around to have fewer fixed sizes.
Also adds some code to re-calc the package panel heights to
hopefully get around larger fonts getting clipped.
2021-11-12 15:31:41 +00:00
Jeff Young 43b840d9d2 Clean up download progress vs package progress vs overall progress. 2021-11-12 11:18:11 +00:00
Jeff Young a22dd614b0 Fix type that can lead to deadlock. 2021-11-12 10:49:14 +00:00
Jeff Young 0b48876ce5 Decouple left and right pane minimums for splitter window. 2021-11-12 02:12:44 +00:00
Jeff Young faabcc079a Sniff URLs in descriptions and be more defensive re MSW scrolling. 2021-11-12 00:39:47 +00:00
Jeff Young f9bbaed7a1 Enable URLs in PCM metadata.
Going to HTML_WINDOW also sidesteps the bullet size issue between
platforms.
2021-11-11 23:42:28 +00:00
Jeff Young 8777135d9f Try to make window backgrounds the same on Windows.
Also reduces the use of auto.
2021-11-11 14:02:40 +00:00
Jeff Young c3c2af9cd0 Improve bullets on Mac & GTK; improve scrollbar behaviour on MSW. 2021-11-11 11:33:28 +00:00
Jeff Young 78bedbed93 Update progress during InstallFromFile. 2021-11-11 10:17:53 +00:00
Jeff Young cc938e7a67 Fix a few issues in the PCM dialog tune-up. 2021-11-11 01:03:07 +00:00
qu1ck 54e9f1cf24 Fix pcm fallback loading
Need to add a fake version otherwise the package gets filtered out of
the packages view.
2021-11-10 23:48:54 +00:00
Jeff Young b408cda0b8 Uninitialized variables. 2021-11-10 23:42:33 +00:00
qu1ck d9bd7ed2c1 Fix incorrect include 2021-11-10 15:06:11 -08:00
Jeff Young 59e5c836fc Tighter thread safety for PCM progress dialog. 2021-11-10 22:12:22 +00:00
Jeff Young 7b4d5b2312 Fix wxWidgets annoying assert. 2021-11-10 18:29:43 +00:00
Jeff Young f036243142 Fix a few minor issues in PCM dialogs. 2021-11-10 16:19:13 +00:00
Jeff Young 5c0befa880 Use sdbSizer so buttons are in right platform order. 2021-11-10 13:32:10 +00:00
Jeff Young 7211c5a350 Kicad look & feel and reduce conceptual nesting depth of PCM. 2021-11-10 12:42:54 +00:00
qu1ck 97a4034d95 Coverity report and compile warning fixes 2021-11-10 03:24:14 +00:00
Jon Evans 89f5842a17 PCM: Fix loading bitmaps from installed packages 2021-11-09 21:44:57 -05:00
Jon Evans 8e2d599751 Allow PCM to load schema from build dir 2021-11-09 21:44:40 -05:00
Mikolaj Wielgus ae37ae7072 PCM: Prevent crash on clicking "Install" when there is no versions
Fixes https://gitlab.com/kicad/code/kicad/issues/9585
2021-11-10 02:19:17 +00:00
Jeff Young 27661edff6 Apply a bit of Kicad look & feel.
Also fixes a spelling error in a string.
2021-11-10 01:11:27 +00:00
Jon Evans beb1ad0098 Use actual package ID when searching m_installed
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9583
2021-11-09 20:07:22 -05:00
Jeff Young e860f9f9a9 Use correct dir when writing project file before Save As. 2021-11-09 20:57:58 +00:00
Jeff Young bc30ee85c0 Make sure JSON contents are in memory before saving.
Fixes https://gitlab.com/kicad/code/kicad/issues/9582
2021-11-09 20:17:56 +00:00
Jeff Young d4e3e67b8d Update kicad_prl file when doing a SaveAs.
Fixes https://gitlab.com/kicad/code/kicad/issues/9455
2021-11-09 17:25:18 +00:00
Seth Hillbrand 2d66b6fd3e Cound't -> Couldn't 2021-11-08 15:56:51 -08:00
Seth Hillbrand 905c72cec6 Repositores -> Repositories 2021-11-08 15:56:51 -08:00
jean-pierre charras 452b9bacba DIALOG_MANAGE_REPOSITORIES: fix crash on exit:
A event handler was pushed but not pop-ed.
Fixes #9551
https://gitlab.com/kicad/code/kicad/issues/9551
2021-11-08 17:14:48 +01:00
Jon Evans ed3642c5c7 PCM: reverse-transform package ID when loading fallback 2021-11-07 21:31:51 -05:00
Jon Evans e48811189c Fix PCM and plugin loading for namespaced plugins 2021-11-08 01:59:28 +00:00
qu1ck d84cea58a4 Update pcm schema
1. Allow dots in package id for namespacing requirements
2. Add regex anchoring to force matching whole string
3. sha hex digest can only have [a-f0-9] chars
2021-11-07 12:41:57 +00:00
Jon Evans f847a76ac3 Update schema ID to use redirect URL 2021-11-06 11:11:20 -04:00
Seth Hillbrand cf6b18ec7e Remove escaped double-quotes
For some reason, escaped double quotes in wxString::Format cause issues
on Mac.  We can replace them with single quotes in most places without
loss of clarity
2021-11-03 17:03:14 -07:00
Jeff Young c8a8efa67b Save as for current version project files.
Fixes https://gitlab.com/kicad/code/kicad/issues/9455
2021-10-30 23:01:53 +01:00
Jeff Young 8a8775bed8 Remove another use of non-argv wxExecute
(Fixes supplied by mwielgus.)
2021-10-15 12:45:43 +01:00
Jeff Young 1b6c4638ca Escape quotes to prevent break-out.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-10-13 17:17:57 +01:00
Mikolaj Wielgus 5f53019290 Substitute all wxHtmlWindow with HTML_WINDOW
Remove other places where <body> tag is used to override the default
black-on-white theme.
2021-10-12 07:07:15 +00:00
jean-pierre charras e508e08ecf Kicad manager: Fix some issues in DIALOG_TEMPLATE_SELECTOR. The fix is not perfect, but it works. Fixes #9329 https://gitlab.com/kicad/code/kicad/issues/9329 2021-10-08 13:15:11 +02:00
Seth Hillbrand 9a8d1246cc We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
2021-10-05 19:46:53 -07:00
Jeff Young b6d723e44e The parameterized interface doesn't like its parameters quoted. 2021-09-30 19:10:23 +01:00
Jeff Young c05e4376f9 Update backups folder name when doing project save as.
Fixes https://gitlab.com/kicad/code/kicad/issues/9254
2021-09-27 13:24:45 +01:00
Jeff Young 7bafbf9ca7 Fix one more fixed size value in the template selector. 2021-09-27 00:23:40 +01:00
Jeff Young 665eeb65e9 Make layout of project template browser more flexible.
In particular, don't use a fixed height for the templates chooser,
and Wrap() must be called again whenever the text is changed.

Also moves the buttons to icon buttons.

Fixes https://gitlab.com/kicad/code/kicad/issues/9241
2021-09-26 18:40:18 +01:00
Jeff Young 5bf042fcc1 Use individual parameter version of wxExecute.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-09-26 15:03:06 +01:00
Jeff Young c6bcb85562 Excise system() calls.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-09-25 20:09:06 +01:00
Jeff Young 23c76cccf3 Give a timeslice to show Save Changes? dialog before things get ugly.
This also moves closing the existing project earlier to improve the
workflow -- so there's a chance that the main fix might not be needed
anymore, but it's still safer to not have a control-flow that crashes
rather than to just not use that control-flow.

Fixes https://gitlab.com/kicad/code/kicad/issues/9200
2021-09-21 11:14:42 +01:00
Seth Hillbrand c088de5f75 Fix compile issues on non-mac 2021-09-19 08:41:10 -07:00
Jeff Young 6e7ce09572 Use more descriptive terminology for preferred text editor.
Also improves execution to allow the preferred editor to include
parameters, such as "/usr/bin/open -e".

Fixes https://gitlab.com/kicad/code/kicad/issues/9131
2021-09-19 15:17:26 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 7a993c0211 Add support mode for dark mode to SCINTILLA_TRICKS.
Also removes the return value from the BITMAP_STORE's themeChanged
method as it will provide the wrong answer for the second frame it's
called on.

Also hooked up ACTION_TOOLBAR, the app launcher, and the project tree
to the wx event for system color changes so they change on the fly.

Fixes https://gitlab.com/kicad/code/kicad/issues/6026
2021-09-14 00:18:50 +01:00
Jeff Young a5247471f7 Expunge a bunch more fixed font specs from wxFormBuilder files.
Also removes the -1 sizing of the status bar on GTK and MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-12 13:53:12 +01:00
Jeff Young 9c78e4cf54 Mac needs different font size handling than MSW & GTK.
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better.  The
other platforms need a more limited range of sizes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-11 23:40:31 +01:00
Jeff Young 769ca2d255 Add a quantized scaling mode for bitmaps.
125% scaled bitmaps look bad in the Launcher so we pin to 100%,
200%, 300%, etc.
2021-09-11 23:40:31 +01:00
Jeff Young fbee62fc15 Tie font size scaling to when automatic icon scaling fails.
It appears that SetSymbolicSize() and ConvertDialogToPixes() fail
under the same circumstances.
2021-09-11 15:29:51 +01:00
Jeff Young ad59254be8 Another round of font sizing tweaks.
It appears that both strategies in the last commit worked, leaving us
with squared scaling.  The dialog pixel architecture seems safer than
our icon scaling stuff, so this version attempts to use only it.

Also works around a bug where wxELLIPSIZE_MIDDLE doesn't work on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/8375
2021-09-10 21:46:13 +01:00
Jeff Young 7a822b55aa Another round of changes to attempt to fix the GTK font size issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-10 15:59:50 +01:00
Jeff Young 7a035e2675 More font scaling changes.
These may or may not fix scaling issues on GTK with HiDPI monitors.
2021-09-09 11:17:21 +01:00
Wayne Stambaugh ad1ee958b0 Code cleaning. 2021-09-07 15:18:42 -04:00
Michael Kavanagh 0e3c79d3b2 Remove inappropriate icons
Icons should be used sparingly to draw attention to the most used actions
2021-09-06 21:23:52 +00:00
jean-pierre charras 749d2d5987 Fix typo in commit cf8618 2021-09-06 18:45:09 +02:00
jean-pierre charras cf8618a0d5 A very ugly hack to fix an issue on Linux: if the wxbase315u_xml_gcc_custom.so is
used **only** in PCM (in Kicad manager), it is not found in some cases at run time.
So just use it in the main module to avoid a not found issue for the
wxbase315u_xml_gcc_custom shared object when launching Kicad
(the cost is very low)
2021-09-06 17:03:04 +02:00
jean-pierre charras c1130535fb PCM: make DIALOG_MANAGE_REPOSITORIES_BASE resizable. 2021-09-06 08:36:06 +02:00
jean-pierre charras 6f84f3de1a Minor fixes in PCM and ensure static wxStrings are translated in dialog. 2021-08-30 17:40:20 +02:00
jean-pierre charras f59e66a897 Do not include kicad_curl.h (and therefore curl.h) in kicad_curl_easy.h
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
2021-08-28 15:31:45 +02:00
jean-pierre charras a9829a598e Plugin and Content Manager: fix compil warnings and issues.
- some are Windows (msys2 ?) specific, related to curl.
- some others are shadowed or unused vars.
2021-08-28 10:57:45 +02:00
qu1ck a1521d338e Add colortheme package type 2021-08-27 21:11:47 +00:00
qu1ck 0f7c0e3872 PCM implementation 2021-08-27 21:11:47 +00:00
qu1ck 4937cd537b Add PCM settings 2021-08-27 21:11:47 +00:00
qu1ck b0d8f613e9 Add pcm schema 2021-08-27 21:11:47 +00:00
Seth Hillbrand 6cd4d68d57 Add drop shadows to MacOS icons
Apple UI guidelines ask for small drop shadows on the icons.  We add
these using ImageMagick when resizing
2021-07-30 20:55:34 -07:00
Seth Hillbrand e7d8b1a975 Resize MacOS icons and script their creation
Creates a script that will fomat the MacOS icons at 80% of the total
size in line with Apple's guidelines.

Script requires Inkscape 1.0 and png2icns (available on Linux boxen)

Fixes https://gitlab.com/kicad/code/kicad/issues/7977
2021-07-30 20:28:14 -07:00
Seth Hillbrand ad8acd328c Expunge some remaining references to kicad-pcb 2021-07-30 20:27:45 -07:00
Wayne Stambaugh f233f4a0a9 Expunge EDA_FILE_SELECTOR.
EDA_FILE_SELECTOR was just an obfuscation of wxFileSelector().
2021-07-28 14:12:51 -04:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Marek Roszko ea73da8a27 Ensure the demos folder exists before adding the menu item 2021-07-26 18:12:49 -04:00
Marek Roszko 8921eef0be Add a "Open Demos Project" shortcut to the kicad launcher
Small UX improvement for the new user....
2021-07-25 21:58:57 -04:00
Marek Roszko c794a6ce7a Add pdb install option for msvc 2021-07-14 23:42:45 -04:00
Jon Evans ae55db77c5 Allow hiding version from manager title bar with advanced config 2021-07-14 18:24:21 -04:00
Wayne Stambaugh 01515680b3 Code cleaning. 2021-07-14 15:47:32 -04:00
Jeff Young 6810912f09 Refuse to load schematics from the future.
Also fixes a bug where an empty window would get left when loading
a file from the KiCad manager window errored out.

Also fixes a bug where we were getting the wrong exception because
we were rethrowing the type-casted one (rather than just calling
throw).

Fixes https://gitlab.com/kicad/code/kicad/issues/8604
2021-06-30 18:32:07 +01:00
Jeff Young 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01: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
Jeff Young 685ee31c35 Workaround a few more OSX printf problems.
Also regularizes the frame title processing.

Also fixes a type where the library name wasn't processed for
variable expansion.

Fixes https://gitlab.com/kicad/code/kicad/issues/7742
2021-06-20 22:48:19 +01:00
jean-pierre charras c35cceca62 fix compil warnings ( "multi-line comment" ) and missing override 2021-06-18 09:38:19 +02:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
david-beinder da833ad7dd Separate focus from hover state in BITMAP_BUTTON, trigger after mouse down+up
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8556
Adds AcceptDragInAsClick() to maintain support for use in toolbar palettes
2021-06-13 17:00:41 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Jeff Young b00d01dcc4 Don't infer two projects when we find both .kicad_pro and .pro.
Also makes the terminology around folder/directory consistent in
the error messages and dialogs.

Fixes https://gitlab.com/kicad/code/kicad/issues/8481
2021-06-08 14:52:23 +01:00
Jeff Young 3ff670d2a4 Disable ACTIONS::openPreferences for now.
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
Marek Roszko 33bbf85a3e Use the parent frame GetSettings helper rather than including for Pgm() 2021-06-06 19:05:12 -04:00
Ian McInerney dc27079b71 cleanup tool event and tool action includes 2021-06-06 18:26:26 +01:00
Jeff Young adea5842da Use platform terminology (and heuristics) for Delete.
(Platforms no longer ask for confirmation when using the Trash.)

Fixes https://gitlab.com/kicad/code/kicad/issues/8513
2021-06-05 15:04:11 +01:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Ian McInerney 3ab69939f9 Remove wx.h from many files 2021-06-03 02:19:20 +01:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00
Jeff Young c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Adam Wolf 3100cd3599 Fix Python loading on macOS without wrangle_bundle.
The goal of this work is to let developers run Python things
on macOS on their builds without generating a full
relocatable and redistributable build.

This is a WIP.
2021-05-31 02:09:43 +00:00
jean-pierre charras 81c7fb61f8 Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02:00
Seth Hillbrand 4bb4606811 Handle files that are kept in prj footprint folder
The project footprint folder gets renamed to the new project name.  We
need to handle non-footprint files that may be stored there by updating
this path manually when copying extra files.

Fixes https://gitlab.com/kicad/code/kicad/issues/8503
2021-05-28 16:24:15 -07:00
Jeff Young e8102d85dc Shut down fileWatcher more aggresively.
While I haven't been able to reproduce the crash, my theory is that
those that do are running into situations where wxWidgets defers
destructing the window.

Fixes https://gitlab.com/kicad/code/kicad/issues/8458
2021-05-20 16:54:24 +01:00
Wayne Stambaugh 412df9dbbf KiCad: don't set minimum window size after sizer fitting.
The current sizing behavior leaves a lot of padding to the right side
of the window so don't set the minimum window size to the best size
calculated by the sizers.  This will allow the user to resize as desired.
2021-05-20 08:29:24 -04:00
Wayne Stambaugh 1bf5642228 KiCad: fix initial window size on windows platform.
Fixes https://gitlab.com/kicad/code/kicad/issues/8333
2021-05-18 10:40:09 +00:00
Wayne Stambaugh 4a60da42d1 KiCad: don't rename page description file on new project from template.
Doing so will break the link in the schematic and/or board file so copy
page description file(s) verbatim to the new project folder.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6524
2021-05-05 07:00:13 -04:00
jean-pierre charras 56058314be Fix minor Coverity warnings and minor compil warnings.
(uninitialized or shadowed vars)
2021-05-05 08:58:55 +02:00
Wayne Stambaugh d2a7f81b10 Debugging improvements and clean up.
* Remove unused wxLogDebug calls.
* Add add application level character tracing to detect unhandled key
  events.
* Catch unhandled exceptions in KiCad main event loop like single top
  applications.
2021-05-03 18:08:15 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Jeff Young 2e15de97e0 Defensive code for processing fileWatcher event during shutdown.
Fixes https://gitlab.com/kicad/code/kicad/issues/8101
2021-04-22 18:51:14 +01:00
Adam Wolf a06f0ca908 Clean up macOS Python3 paths 2021-04-21 12:50:31 +00:00
Adam Wolf 7357424efc Update macOS to Python 3, wx 3.1, and Phoenix.
This is a work-in-progress.  It could use testing while I continue to fix
the remaining pieces.

There are some changes that will be needed for signing and notarization.

This currently relies on a Python tool I wrote (dyldstyle) to fixup
KiCad.app correctly. I would like any bundle fixing necessary to use a
built KiCad on macOS to live inside KiCad, rather than in
kicad-mac-builder or elsewhere.  While I was experimenting, I found this
worked, however, and I would love to get extra hands testing.

I added a CMake argument, MACOS_EXTRA_BUNDLE_FIX_DIRS, for devs and
packagers who have extra directories they need to add to
fixup_bundle on KiCad.app.

There's an issue about differing behavior when KiCad is opened via
the command line or via Finder/launchd.
2021-04-21 12:50:31 +00:00
Marek Roszko ce3a84f579 Consolidate wx aui dock art color setting 2021-04-19 21:12:02 -04:00
Jon Evans eac2700af6 Launcher: use unscaled bitmaps
This is not really a toolbar so we should not scale here
2021-04-19 17:18:17 -04:00
jean-pierre charras ba3f0d5d07 Fix a wxWidget assert and a minor wxWidgets alert 2021-04-19 15:01:00 +02:00
Ian McInerney 0a0935e0f3 Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand
After commit 9535153f9e there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).
2021-03-30 23:20:22 +00:00
Ian McInerney 7bfa8575fa Remove redundant information from import/export menu item labels
Saying "Import/Export" on the labels when the submenu has "Import"
or "Export" in it is redundant.

Note that we can't just update the action text with the new name,
because that is used in the hotkey list and would become too confusing
without the "Import"/"Export" text.
2021-03-27 18:50:35 +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
Jeff Young 9f8127afcf Disable click processing on launcher titles.
Fixes https://gitlab.com/kicad/code/kicad/issues/7946

Fixes https://gitlab.com/kicad/code/kicad/issues/7946
2021-03-22 17:21:25 +00:00
jean-pierre charras 3bf5c814e1 Fix missing header on Windows 2021-03-20 19:57:26 +01:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jon Evans 298dda8fcd Don't proceed with opening project if players didn't close
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7974
2021-03-20 09:06:38 -04:00
Ian McInerney 3036683a2c Move platform-specific init tasks into KIPLATFORM 2021-03-19 21:26:07 +00:00
Jeff Young 52ea9bb75f No lines in tree controls on Mac or GTK. 2021-03-13 11:43:07 +00:00
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
Marek Roszko 3d4ac9af03 Relocate win32 resource files to the central folder for further consolidation 2021-03-09 21:48:14 -05:00
Jeff Young b47453a93b Fix app names in Quit menu items on Mac. 2021-03-09 16:45:33 +00:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Marek Roszko 8831c5567c Add win32 version manifest block 2021-03-04 00:34:48 -05:00
Ian McInerney 908de37e7c Don't hardcode the file extensions where possible 2021-03-03 01:13:59 +00:00
Jon Evans 4f4b95456d Fix order of user template search paths
Make sure that documents path overrides the system path
set by KICAD6_TEMPLATE_DIR if that var exists.
2021-02-28 11:02:25 -05:00
Jon Evans a70106a3bd Fix search paths for default project template 2021-02-27 20:30:18 -05:00
Jeff Young 1f109ac6aa Try again to find compromise cross-platform/theme spacing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7728
2021-02-27 11:45:04 +00:00
Roberto Fernandez Bautista e03bca3563 Non-KiCad Project Importers: Fix broken project import
Fixes bug introduced in b4741c97b6
2021-02-26 19:32:44 +00:00
Wayne Stambaugh b4741c97b6 Attempt to fix Coverity issue 316502.
This changes the third party project importer to fail if either the
schematic or board files cannot be copied to the project folder.
2021-02-25 12:24:57 -05:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Jeff Young ad46330399 Try and fix GTK font bestSize issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/7631
2021-02-20 19:48:36 +00:00
Jeff Young a1730d51ff Try out nouns in the Kicad Launcher. 2021-02-17 20:12:04 +00:00
Jeff Young 0d2ee266a1 Make sure auimgr panels can handle dark mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/7560
2021-02-16 21:11:36 +00:00
Jeff Young f3449452db Special case kicad manager default frame sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7559
2021-02-16 16:24:36 +00:00
Jon Evans 32308c7fef Use middle ellipsization for kicad manager status bar 2021-02-14 16:04:36 -05:00
Jon Evans bd71a6e496 Launcher: pull in cell margins a little on non-Mac 2021-02-14 15:04:42 -05:00
Jeff Young 339864f843 Conditional compilation for launcher icon spacing. 2021-02-14 18:40:28 +00:00
Jeff Young ff61ca5fed Try a different spacing method.... 2021-02-14 16:59:27 +00:00
Jeff Young bbe315bcb8 Add title to project file view and help strings to launcher icons. 2021-02-14 13:28:20 +00:00
Jon Evans 838a70129d Project manager tweaks 2021-02-13 18:58:02 -05:00
Jon Evans 97465e8260 Revert "Don't overwrite project path in status"
This reverts commit 7018b5e6a2.
2021-02-13 18:37:39 -05:00
Jon Evans 7018b5e6a2 Don't overwrite project path in status 2021-02-13 17:21:42 -05:00
Jon Evans 08922e01aa Tweaks to kicad manager layout 2021-02-13 09:53:08 -05:00
Jon Evans e06aa32780 Launcher tweaks 2021-02-13 08:59:33 -05:00