Commit Graph

215 Commits

Author SHA1 Message Date
Wayne Stambaugh 19e309d2d2 Dialog layout and coding policy fixes. 2023-11-04 13:57:31 -04:00
Marek Roszko d0b26ae600 Add a hack to avoid spamming sentry events due to recursive asserts 2023-10-30 19:03:54 -04:00
Marek Roszko 5a1c300cff Remove unused headers in pgm_base 2023-10-11 07:22:50 -04:00
Mark Roszko 3c0f9ec510 Revert "Give wxTheApp to python scripts that end up touching Pgm().App()"
This reverts commit 672265b564
2023-10-02 00:23:52 +00:00
Marek Roszko 672265b564 Give wxTheApp to python scripts that end up touching Pgm().App()
Fixes KICAD-QG
2023-10-01 19:02:49 -04:00
Marek Roszko 37e8a008ab Remove obsolete config_params.h includes 2023-09-25 20:40:29 -04:00
Marek Roszko 98b35b1a7f Start using the sentry environment tag 2023-09-24 14:42:00 -04:00
Marek Roszko e3285c234a Move executable path to PATHS to avoid a circular dependency 2023-09-23 20:21:37 -04:00
Jon Evans 9973dd3e5d Fix sentry compile issues on macOS 2023-09-19 20:31:14 -04:00
Marek Roszko 11de95778b Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
2023-09-09 00:10:57 -04:00
Marek Roszko 6e04c2835a Remove unused header 2023-09-07 20:46:08 -04:00
Marek Roszko 4d77fd48ef Shove thread_pool to core 2023-09-06 17:50:12 -04:00
Marek Roszko 07ecdc5fbb Force close the splash 2023-09-04 09:20:05 -04:00
Marek Roszko ec64ceeff2 Add a custom wx splash class to nullify the filterevent that causes crashes 2023-09-04 08:51:30 -04:00
Marek Roszko cd884211ef Actually use the sentry dsn define 2023-08-31 06:57:31 -04:00
Marek Roszko 87513b4a04 Change the sentry dsn to be build time defined
We ultimately don't want people running personal builds to turn on sentry and start sending us crash logs we can't decipher
2023-08-30 22:17:38 -04:00
Marek Roszko 208d146a03 Force fontconfig to look at the correct path for fonts.conf on windows 2023-08-26 13:53:43 -04:00
Seth Hillbrand db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Marek Roszko 5319316815 Enhance the status bar with background progress and notifications 2023-08-04 22:06:08 -04:00
Seth Hillbrand 7fe83993cf Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice
2023-07-21 15:40:19 -07:00
Marek Roszko b0fa2561b6 Add support for enum based policies 2023-07-13 19:01:04 -04:00
Ian McInerney 5e740c354e Don't skip loading the wxWidgets message catalogs
The wxWidgets message catalog contains translations for strings that are
in the wx-provided dialogs, and these strings aren't contained in our
message catalog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15035
2023-07-02 19:21:14 +01:00
jean-pierre charras 1094cc5331 Fix issues related to the splash screen when no config file found:
- do not show it before the application is actually started.
- hide the splash screen before displaying dialogs.
Fixes #15047
https://gitlab.com/kicad/code/kicad/-/issues/15047
2023-06-24 18:09:43 +02:00
Marek Roszko 74d6dc6642 ADDED: Startup splashscreen
This is purely loading in the background based and has no artificial delay.
Will be more useful once kicad.exe ends up loading more on launch immediately ;)
Right now the splash is probably visible the longest launching pcbnew standalone.

The actual splash image can be considered a placeholder
2023-06-20 20:51:08 -04:00
Seth Hillbrand f76c94e622 Don't log asserts in release mode 2023-06-12 15:26:18 -07:00
Marek Roszko e536fa966c Remove extraneous Pgm() 2023-05-31 23:02:38 -04:00
Marek Roszko 8eb265bf4c Add a central assert handler that generates sentry events 2023-05-31 21:56:59 -04:00
Seth Hillbrand 122be418bb 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
2023-05-24 13:51:54 -07:00
Marek Roszko 53ad203028 Guard the new sentry calls because it won't be initialized if opted out 2023-04-20 23:05:06 -04:00
Marek Roszko c5d5450f55 Create a central exception handler we can also use to generate sentry events 2023-04-19 20:38:25 -04:00
Marek Roszko 8fd4909f86 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
2023-04-15 09:18:54 -04:00
Marek Roszko 0eefde6046 Fix build error pre wx 3.1.6 2023-04-13 18:20:16 -04:00
Marek Roszko 8a8589b9db Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2
2023-03-24 19:52:48 -04:00
jean-pierre charras 814dcdab31 Fix compatibility with wxWidgetsversion < 3.1.6 2023-02-22 10:05:37 +01:00
Marek Roszko 39e69a3d29 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
2023-02-21 20:26:41 -05:00
Seth Hillbrand 576bef4ba0 Fix Ukrainian language name
Should refer to the language not to a Ukrainian person
2023-02-16 15:10:47 -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