Commit Graph

112 Commits

Author SHA1 Message Date
Jeff Young 8a8167ff0a Use app display name in messages to user.
Fixes https://gitlab.com/kicad/code/kicad/issues/8038
2021-03-28 13:08:27 +01:00
Marcus A. Romer c291162567 Use KICAD_DATA to find stock libraries on Linux
Use the KICAD_DATA build-time variable to determine the default stock
library search path on Linux instead of relying on DEFAULT_INSTALL_PATH
in combination with hardcoded folder names. The search logic for Windows
and macOS is refactored but remains unchanged.
2021-03-21 00:28:33 +00:00
Jon Evans e38fe842e2 Don't crash when loading bitmaps before settings exist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7900
2021-03-13 09:54:07 -05:00
Seth Hillbrand 0d3a0e0dff Move Serbian po
Updates the Serbian language code from sr_RS to sr.  This appears to
work as intended under Debian whereas the full code, despite existing in
the i18n directory was not recognized by wxWidgets or Weblate.
2021-03-05 09:19:58 -08:00
Adam Wolf 90cb82b32d Install translations into macOS bundle. 2021-02-22 23:36:08 +00:00
Jon Evans 884de1f932 Allow translations to load from build dir 2021-02-12 22:39:37 -05:00
Marek Roszko 28c6967dbc Start trying to shuffle around path management 2021-01-27 19:12:18 -05:00
Seth Hillbrand f303b07086 Initialize translation dictionary to default
Initializes the dictionary before potential messages are shown on the
screen.

Fixes https://gitlab.com/kicad/code/kicad/issues/7076
2021-01-12 13:33:40 -08:00
Seth Hillbrand e73b852c2a Forgot a '0' in tool tip commit 2021-01-08 10:27:27 -08:00
Seth Hillbrand c5b6cf722d Adjust Windows tooltip display time
While most platforms keep the tooltips if the mouse doesn't move, MSW
will hide the tooltip after 5 seconds (by default).  This bumps that up
to 10s for all tooltips in the program.

Fixes https://gitlab.com/kicad/code/kicad/issues/6836
2021-01-08 10:09:35 -08:00
Seth Hillbrand 1e4d81e3c4 Protect against invalid HOME variable
Fixes https://gitlab.com/kicad/code/kicad/issues/6990
2021-01-07 15:13:45 -08:00
Seth Hillbrand 099ddb1517 Update Lanugage list with new contributions 2021-01-06 14:23:59 -08:00
Seth Hillbrand 8de9cff4e0 Change environmental variables to human-readable
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.
2021-01-01 16:20:35 +00:00
lê văn lập 1adb86aa52 Add vietnamese language 2020-12-21 18:54:24 +00:00
Wayne Stambaugh ec97d1d737 Remove unnecessary decimal point notation test on application start. 2020-12-09 13:53:50 -05:00
Jeff Young fc2bdc49de Once more into the depths of hell... er, I mean fix a focus issue.
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
2020-11-26 16:47:40 +00:00
Marek Roszko 16e3e59495 Split out arrayDim and MIRROR templates from macros.h
These were not macros
2020-11-17 20:21:04 -05:00
jean-pierre charras f9a19f1d13 Language selection: do not disallow switching to English language when the
English dictionnary is missing. It is not mandatory because all messages are
in English, just restricted to ASCII7 chars

Fixes #6261
https://gitlab.com/kicad/code/kicad/issues/6261
2020-11-03 11:47:28 +01:00
Seth Hillbrand 9ed6cdd943 Remove GITHUB plugins
KiCad github downloads are no longer supported

Fixes https://gitlab.com/kicad/code/kicad/issues/6182
2020-10-29 16:45:04 -07:00
Ian McInerney 31e626f279 Cleanup creation of all our smart pointers 2020-10-26 23:52:44 +00:00
Marek Roszko 91e5611341 Move dialog_configure_paths.h and dialog_edit_library_tables.h to dialogs folder 2020-10-25 20:01:12 -04:00
jean-pierre charras f6b4b66a86 Avoid include wx/wx.h in many files that do not actually use this include.
Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
2020-10-18 18:21:34 +02:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
Seth Hillbrand e684c6d94d Move default model location to 3dmodels 2020-10-15 16:55:51 +00:00
jean-pierre charras 36bc44e6d7 more cleanup about removing useless include 2020-10-02 19:56:10 +02:00
jean-pierre charras 8e80a4d2ed Common settings: better fix for common environment vars deletion.
The previous fix (d4461f6) removed all vars before re-add them.
Clear all vars created issues with externally defined variables (the internal
initial value was lost)
Now only old, no longer existing, vars are deleted.
Fix also a potential issue related to non ASCII7 in last stored path.
2020-09-14 16:46:56 +02:00
jean-pierre charras d4461f6c53 Common settings: fix: common environment vars: deleted vars were still in list.
When updating common environment variables list, the initial list was never
deleted. Therefore one could not remove an existing var.
The common environment variables list is now deleted before updating.
2020-09-14 14:44:54 +02:00
Ian McInerney 8bdf25d3e2 Show an error message when switching to a language that isn't installed
Also, ensure that the language names are not translated in the menus
and messages, since they are already translated in the code.

Fixes https://gitlab.com/kicad/code/kicad/issues/5324
2020-09-02 00:10:25 +01:00
Seth Hillbrand 18e06c659c Set launguage selection to be untranslated
Users should see their language option presented in their own language,
not the current language being used on the system.
2020-08-18 05:32:21 -07:00
Seth Hillbrand 6381f80bfa Remove flags icons and abandoned languages
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
2020-08-18 05:32:21 -07:00
Ian McInerney 47f7c616f8 Fix Python environment variable handling
The variables in the common settings struct are only updated on
save, so Python must use the ones from Pgm to get its values.
This does lead to the observation that Python's changes to the
variables do affect KiCad (they can break resolvers). So apparently
it can mess with us but we can't mess with it easily.

Also, improve the environment variable tracing infrastructure to capture
more changes.
2020-08-12 00:14:19 +01:00
Jeff Young 625eca8170 Save language changes to file so they're picked up by other apps.
Fixes https://gitlab.com/kicad/code/kicad/issues/1939
2020-07-31 22:29:05 +01:00
Jon Evans a5a19076fd Move PROJECT storage to SETTINGS_MANAGER 2020-07-02 22:08:54 -04: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
Ian McInerney 0259e0ba07 Cleanup struct initialization and formatting 2019-12-17 16:09:32 +00:00
Ian McInerney 99b9354a51 Add clear recent files action to the menus
ADDED: Menu item to allow the recent file lists in each program to be
cleared

Fixes: lp:1821685
* https://bugs.launchpad.net/kicad/+bug/1821685
2019-11-23 23:35:21 +00:00
Jeff Young c2d77a7300 Add some defensive code to prevent re-entrant printing.
Fixes: lp:1765965
* https://bugs.launchpad.net/kicad/+bug/1765965
2019-08-13 18:00:09 +01:00
Jeff Young e6d5110ccf Implement I18N for ACTIONs.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro.  We do still want it in the
code, however, because the string harvesting is based off of it.

Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
2019-06-17 10:45:23 +01:00
jean-pierre charras 66d2060942 Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
2019-06-16 20:35:57 +02:00
Seth Hillbrand 06d2170501 Fix default User Template location
When we assign a string to the wxFilename, it takes the last section as
the filename (unless there is a trailing '/').  So on Linux, we got
/home/user for the Documents dir and /home/ was the directory while
'user' was the filename.  Appending directories 'kicad/templates' made
the final directory '/home/kicad/templates'.  Forcing this to be a
directory restores correct behavior.

(cherry picked from commit 0ee38653f7)
2019-06-11 17:11:27 -07:00
Jeff Young 6025256e07 Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 2019-06-10 23:46:00 +01:00
jean-pierre charras 4d3e86d795 DIALOG_CONFIGURE_PATHS: do not allow users to define the env var KIPRJMOD
It always defines the project path, and should never be defined by users.

Fixes: lp:1824912
https://bugs.launchpad.net/kicad/+bug/1824912
2019-04-16 11:41:30 +02:00
jean-pierre charras ed03d3436d fix a minor wxWidgets assert. 2019-01-10 16:23:52 +01:00
Seth Hillbrand 1e5ba6f1b1 Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time.  Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
2019-01-06 08:43:12 -08:00
Seth Hillbrand e8333633fe GAL: Add antialiasing options to Cairo
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.
2019-01-04 13:39:56 -08:00
Maciej Suminski 24f9bfa13b Fixed memory leaks
This is commit a9efbf47 with a fix for SWIG to deal with unique_ptr.
2018-12-20 10:05:58 +01:00
Seth Hillbrand e307d9318b Revert "Fixed memory leaks"
This reverts commit a9efbf4716.

The commit broke compiles with scripting
2018-12-11 10:12:44 -08:00
Maciej Suminski a9efbf4716 Fixed memory leaks 2018-12-11 16:21:43 +01:00
Jeff Young 05d9f49d25 Init icon scale when reading it from PCB prefs.
Fixes: lp:1804926
* https://bugs.launchpad.net/kicad/+bug/1804926
2018-11-24 16:19:38 +00:00
Wayne Stambaugh f584b30c73 Replace log debugging output with tracing.
Replace all instances of wxLogDebug with wxLogTrace in the common and
kicad folders to prevent unwanted debugging output.

Add new trace flags for locale and screen object tracing.

The usual smattering of code policy fixes.
2018-10-17 15:03:33 -04:00