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
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
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
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
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
Note that the dialogs which have mutliple options were not moved over
as it seems perahps not the right choice to have them save state between
sessions.
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
We lock the project file, board, and schematic now, so the second copy
can only open them read-only. While issues might remain, it's unclear
the warning ever prevented anyone from shooting themselves in the foot
anyway.
Fixes https://gitlab.com/kicad/code/kicad/issues/7465
Note: PGM_BASE::InitPgm() is creating a SETTINGS_MANAGER object, which
in turn tries to display a "migrate settings" dialog when no settings
are found, but obviously the dialog can't be displayed inside docker.
Needed to add an optional parameter to InitPgm() in order to allow
running in headless mode.
CHANGED: Environment variables defined outside of KiCad will no longer
be saved in the settings file. Paths can be configured via
the Configure Paths dialog and those changes will be saved in
the settings file if the new path is different from the default
and the path variable was not defined in the system environment.
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.
Versions specific variables that may point to objects that change
through versions, allowing multiple KiCad versions to operate correctly
(even on MSW) on the same machine.
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
Flags != language See http://www.flagsarenotlanguages.com We now use
local, untranslated language names for all languages.
Languages that have not been updated in >5 years and have less than 15%
of available strings translated have been removed from the menu options.
If a translator steps up to update the .po files, we can re-add them
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.
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
First, add automatic detection of toolkit DPI scaling options. For now, this
is, in order,
* Check the GDK_SCALE option under GTK+ (users can set this to force the scaling)
* Check the value from WX's GetContentScalingFactor(). This will start to work
correctly from WX 3.1 and GTK+ 3.10.
Then, add a user-settable override in the main prefs panel, next to the icon
scaling. This is independent of the icon scaling options.
DPI handling is performed in a standalone class, so they can be shared between
the prefs UI and the OpenGL backend easily. Also means Cairo could use the same
interface in future.
Also adjust the OpenGL grid drawing code to use the computed scale factor,
which avoids over-thick grids in scaled environments (the user can manually
thicken the grid if wanted).
Fixes: lp:1797308
* https://bugs.launchpad.net/kicad/+bug/1797308
Cairo supports antialiasing when rendering but can be slow when set to
sub-pixel mode. This bumps the minimum version of Cairo to 1.12
(available in 14.04 LTS as well as mingw) to support three antialias
settings (fast, good, best) that offer speed/appearance tradeoffs.
This can provide a higher-quality eeschema render as it works on a
per-element basis as opposed to the OpenGL per-screen antialias.