Commit Graph

188 Commits

Author SHA1 Message Date
Marek Roszko d73f96e3d8 Add support for enum based policies
(cherry picked from commit b0fa2561b6)
2023-07-14 00:04:31 +00:00
Seth Hillbrand 6fc393c7db Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14734

(cherry picked from commit 122be418bb)
2023-06-18 01:06:40 +02:00
Marek Roszko 0c6eb6dec3 Create a central exception handler we can also use to generate sentry events
(cherry picked from commit c5d5450f55)
2023-05-29 02:27:21 +00:00
Marek Roszko 4c129ec208 Init curl in InitPgm for thread safety
curl itself highly recommends not initializing curl from within a thread.
Due to the PCM, this can happen in a thread these days.

Pointed out by Érico Rolim in https://gitlab.com/kicad/code/kicad/-/merge_requests/855


(cherry picked from commit 8fd4909f86)
2023-04-15 13:19:32 +00:00
Marek Roszko 69989e4e64 Fix build error pre wx 3.1.6
(cherry picked from commit 0eefde6046)
2023-04-13 22:21:35 +00:00
Marek Roszko 434161687e Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2


(cherry picked from commit 8a8589b9db)
2023-03-24 23:53:15 +00:00
Salvador E. Tropea b21e65fc5f Fix compatibility with wxWidgets 3.0.x
- Use CanonicalName when GetCanonicalWithRegion() isn't available
2023-02-22 19:23:55 +00:00
Marek Roszko fd4a0dbedf Fix up handling of font names available in multiple names
ttf fonts can declare multiple language names. Many by default opt to just declare one and not tag it any particular language.
However, there are CJK languages that typically leverage this function the most. They'll tag both a "en" and a cjk lang family name in CJK characters.

To be as user friendly as possible, we need to display said fonts in the CJK languages if KiCad to set to such a locale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14011


(cherry picked from commit 39e69a3d29)
2023-02-22 01:27:09 +00:00
Seth Hillbrand 3f535aca8c Fix Ukrainian language name
Should refer to the language not to a Ukrainian person

(cherry picked from commit 576bef4ba0)
2023-02-16 15:11:14 -08:00
Marek Roszko 7d80815b7b Just use hash for sentry release for all builds for now 2023-01-31 21:17:11 -05:00
Marek Roszko 80b1826095 Fix sentry release tagging broken by 98d55ce8 2023-01-29 11:51:03 -05:00
Marek Roszko d8bde5bcfe Avoid the sentry prompt in kicad-cli
Fixes KICAD-47
2023-01-27 06:52:40 -05:00
Seth Hillbrand 5347fbdbb1 Update languages to be installed for release
Languages that have been abandoned or are not yet sufficiently
translated are not shipped with release.  The po files and existing
translations remain and will be re-enabled post release for future
development
2023-01-20 13:23:13 -08:00
JamesJCode 3d6045a7c8 Supress wxLocale warnings when no matching locale found when setting default locale on MacOS
Re-fixes warning appearing in https://gitlab.com/kicad/code/kicad/-/issues/13371#note_1238532117
2023-01-16 14:12:16 +00:00
Simon Richter dc9aaf7844 Fix mismatched deallocation
The strings are allocated via strdup() -> malloc(), and need to be freed
with free(), the array is allocated with operator new[], and needs to be
deallocated with operator delete[].
2023-01-13 14:48:26 +01:00
James Jackson 8f2f53192b On MacOS, ensure the application locale is set to the system default
Fixes #11046
2023-01-12 21:39:08 +00: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
Jon Evans 1d9783ed32 Suppress wxWidgets popups when locale can't be loaded for some reason
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13371
2023-01-05 12:39:16 -05:00
Seth Hillbrand 98d55ce82f Avoid rebuilding with each commit
We shouldn't include the kicad_build_info.h outside of the wrapper
build_info.h.  Also adds an error directive to prevent re-introduction
of define dependencies
2023-01-04 11:32:15 -08:00
Jon Evans bc45e3f16e Suppress wx error popups when locale is missing 2022-12-16 17:07:57 -05:00
Seth Hillbrand 234cda4197 Re-add PGInit call 2022-12-03 20:39:42 -08:00
Seth Hillbrand 9f551bfbf8 Remove the duplicate initionalize of pg globals
Testing to see if this is needed for windows builds anymore that we have
fixed the general init

Fixes https://gitlab.com/kicad/code/kicad/issues/12297
2022-12-03 17:14:36 -08:00
Jon Evans a5096bf28a CLI: Fix macOS binary dir
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12799
2022-12-01 16:55:12 -05:00
Marek Roszko 40a279ae32 Hotglue the unit tests to work for now
The mocks never expected InitPgm to work and I accidentally fixed it for the kicad-cli
2022-10-05 17:12:32 -04:00
Marek Roszko 3fe004fd1b New kicad-cli will now be the cli interface 2022-10-04 22:24:13 -04:00
jean-pierre charras 0c7b6c3cbc fix minor compil warnings 2022-10-04 19:51:51 +02:00
Mark Roszko fb8a4c10f7 Shove kicad2step into pcbnew itself with a new cli 2022-10-04 01:53:37 +00:00
Marek Roszko 1a43187fb7 Display the sentry uid in preferences 2022-09-27 19:31:32 -04:00
Marek Roszko d33830e570 Switch sentry to commit hash for kicad nightly releases 2022-08-15 20:57:44 -04:00
Mikolaj Wielgus 7cf5138c63 Sim: Bugfixes, mostly for MS Windows compilation errors
Unfortunately, Windows headers define a lot of macros for common words,
so we had to rename some enums to not collide.

We also fix some of the many bugs related to the new simulation
architecture and the Spice Model Editor dialog.
2022-07-30 02:25:34 +00:00
Seth Hillbrand 0335df77fa Ensure global tooltip is created for each app 2022-07-18 17:08:48 -07:00
jean-pierre charras d90a2cc6b5 tread_pool: create it on the heap, because creating it static generate a DTOR issue on mingw.
When built with mingw, the tread_pool DTOR is probably called too late, and treads are
not cleaned correctly, and the application hangs on exit.
2022-07-08 19:07:21 +02:00
Marek Roszko 7473528cf4 Ensure user paths are created early
Fix #11962
2022-07-05 20:47:53 -04: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 c0a9a02591 Handle settings sequencing
Avoids crash when window close ordering places 3d viewer after the
common settings are closed
2022-05-25 16:56:54 -07:00
Seth Hillbrand 5cd91a952f Adding Ukranian language option
Ukranian translations added via weblate.  This enables the menu option
to view them
2022-05-25 16:37:48 -07:00
Marek Roszko 392ed5fecd Add policy to enable/disable pcm 2022-04-12 10:08:34 -04:00
Marek Roszko b3c5054d6c Add initial system policy checking for turning off data collection 2022-04-09 14:05:28 -04:00
Mark Roszko f0f33ef1d3 Introduce sentry for crash data collection 2022-04-02 01:21:55 +00:00
Marek Roszko 6420bd777f Sprinkle some wxT 2022-02-21 18:49:36 -05:00
Marek Roszko 0b46c75197 Simplify locale data path setting... 2022-02-21 13:08:29 -05:00
Wayne Stambaugh cc9d074a2a Add upated UI event throttling to advanced configuration. 2021-12-28 18:17:53 -05:00
Jeff Young c01649fc6e Make it easier to open legacy files. 2021-11-19 13:36:14 +00:00
jean-pierre charras e954531ca8 Call m_locale->Init() with option wxLOCALE_DONT_LOAD_DEFAULT to avoid any warning message.
We do not use or install the wxWidgets dictionaries, so do not use the default
option (wxLOCALE_LOAD_DEFAULT) when initializing wxLocale.
2021-11-18 11:01:29 +01: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
Seth Hillbrand 8f1dec61d2 Add swedish as option for translators
There appears to be activity in Weblate updating this language.
2021-11-08 11:41:14 -08:00
Seth Hillbrand 888050bd67 Fix an error when missing argc/argv data
Boost::unit_test is supposed to pass along data vals but seems to be
missing in our case.  This provides a fallback
2021-11-03 16:52:46 -07:00
Seth Hillbrand 3036cc2ce5 Correct Korean language name
Thanks to korearf for pointing this out
2021-10-23 07:13:50 -07:00
Seth Hillbrand c4fcff46ab Add Thai language option 2021-09-30 08:38:41 -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