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.
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.
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.
Split antialiasing options out from display options. Move
antialiasing to common. Duplicate the rest of display options
for Eeschema.
Implement OnSelectGrid and hookup GAL canvas refresh to
SetPresetGrid.
Add Grid Settings... to View menu and move Show Grid from
preferences to View Menu to match Pcbnew.
LC_NUMERIC is the right option to use in LOCALE_IO because only the floating point separator must be modified
When using LC_ALL, the Env var expansion wxGetEnv() was not working when the env var contains non ascii7 codes after a call to LOCALE_IO.
When using setlocale( LC_NUMERIC, "C" ) in LOCALE_IO, wxGetEnv() works fine.
Fixes: lp:1795990
https://bugs.launchpad.net/kicad/+bug/1795990
Also updates the file menu IDs so that we can actually handle
more than 9 items in the file history.
Also adds configurable file history length to the other gerber
files (zip, drill and job).
Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
Paths based on DEFAULT_INSTALL_PATH do not work on Windows,
as in fact there is no default install path, as in case of Unix-based
systems. In such case, the initial paths point to mingw subdirectories
that normally do not exist on user machines.
The patch changes the initial path values to make them relative to
the executable and follow the current Windows installer scheme.
Fixes: lp:1775796
* https://bugs.launchpad.net/kicad/+bug/1775796
Remove KICAD_PTEMPLATE environment variable as it's purpose was not
clear and was often poorly defined as the path to the KiCad installed
templates.
Add a new KICAD_TEMPLATE_DIR environment variable which clearly should
be the path of the KiCad installed templates. Make this environment
variable available in the user settings in case the default is wrong
which has been the case in some instances. Use the standard search
stack to set the default system template path which has a much greater
chance of being correct.
Add a new KICAD_USER_TEMPLATE_DIR environment variable which clearly
should be the path of the user defined templates. Users most likely
were not even aware of the old default user path unless they read the
fine manual.
Set template path search stack priority as follows:
* KICAD_USER_TEMPLATE_DIR
* KICAD_TEMPLATE_DIR
* Search stack template paths
Reverse template selection dialog and project path dialog for improved
user experience.
Fixes lp:1543443
https://bugs.launchpad.net/kicad/+bug/1543443
Use GetPath() instead of GetFullPath() when initializing environment
variable table entries KICAD_SYMBOL_DIR and KICAD_PTEMPALTE due to
unexpected trailing path separator which was causing find libraries
by URI to fail.
Don't create a project symbol library table when there are no libraries
not found in the global symbol library table.
Don't add non-existent libraries to project symbol library table.
Clear symbol library table when loading a new schematic.
Minor remapping status message improvements.
Create a new dialog to edit global and project specific symbol library
tables.
Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.
Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.
Fix bug in default environment variables initialization. A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
Add loading symbol library table code to schematic PROJECT object.
Fix minor issues with loading global symbol library table.
Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.
Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.
Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
This function is called only from three sites, it doesn't need to be in
common.h.
The implementation was already in systemdirsappend.cpp, so a matching
header was created for it.
This reduces the visibility of the function to only the files that need
it and slightly shrinks common.h.
The global ::LockFile() function is used in a single place, but it's in
common.h, so visible to all files.
The GetKicadLockFilePath function is used in only two places, and one of
them is LockFile.
This commit puts them both in a separate header, so they're only visible
to code using them.
The implementation of GetKicadLockFilePath is moved to lockfile.cpp,
where LockFile already was.
Also removed a (large) handful of wxT macros, which aren't needed any
more and make code less readable.
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
which is to be applied to any function which needs C++ to python
exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
which rebuilds the swig generated *.cxx file when one of its dependencies
change.
*) Re-architect the board.i file so that it can be split into multiple *.i
files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
phase III.
The functions involved in the problem were PGM_BASE::GetEditorName and
EDA_BASE_FRAME::OnSelectPreferredEditor:
1) OnSelectPreferredEditor showed a dialog to allow the user selecting the
editor, but before that called GetEditorName to get the name of the current
editor (to show as a default in the choose file dialog).
2) The problem was when there was no editor, GetEditorName showed its own
dialog.
3) So the user was seeing first the dialog from (2) and then the dialog from
(1).
4) As GetEditorName is used in many other places the solution I did was to add
to it an optional parameter that tells it what to do if no editor is set. To
avoid modifying other code that relies on the current behaviour, this parameter
has a default value that causes to show the dialog. But now when
OnSelectPreferredEditor calls it, it passes the parameter that causes it to
return an empty string if no editor was set.
5) Also, I found a second bug while doing it which allowed in the first dialog
to select an unexistent file (the dialog was missing the wxFD_FILE_MUST_EXIST
flag).
6) Lastly, to avoid having duplicated code (the one that showed the same dialog
and that configured the wildcard was in two methods) I created a single
function that now both functions call: PGM_BASE::AskUserForPreferredEditor.
This way we also will have consistency in the behaviour of both dialogs and
there is a single place where it needs to be modified.
* Dick Hollenbeck also contributed commit r6440. I inadvertently forgot to set
the Bazaar author tag before I committed it. My apologies.
* Switch to static linking of libcurl and on linux and windows and also
statically link in only required portions of openssl.
* Add the required thread locks which openssl needs.
* Remove the get curl version call from BASEFRAME since it pulls in curl and
openssl into every derived wxFrame class link image.
* Remove curl function from PGM_BASE, switch to atexit() instead. Anything in
PGM_BASE made the singletops bigger.
* Tested on Linux, Windows, and OSX.
* Prevent libcurl from inadvertently being initialized twice.
* Dynamically load libcurl only when required.
* Reduce the number of worker threads when loading footprint libraries to
prevent issues with the GitHub plugin.
* Rename Eda_FileSelector to EDA_FILE_SELECTOR.
* Add optional pointer to wxString to save the most recently used path to EDA_FILE_SELECTOR.
* Rename Eda_DirectorySelector to EDA_PATH_SELECTOR.
* Replace wxGetCwd() with wxStandardPaths::GetDocumentsDir(). This fixes the windows issue
where wxGetCwd() returns the path where the executable files are located.
* Add code to handle most recently used path to EDA_BASE_FRAME.
* Fix string formatting error in kicad/files-io.cpp.
* Remove setting and restoring current working directory when launching GerbView. Setting the CWD
has no effect on the launched executable which starts with it's own CWD.
* Allow project path to be passed to GerbView when launched from KiCad.
* Note: this is a work in progress. Do not expect every path and/or file selection dialog to properly
update the most recently used path. The correct solution to this problem requires a much more
well though out solution which will not happen until after the next stable release.
* Mainly the wxDialog that was opened when the wizard is created is now no more created by the wizard frame CTOR. On some W.M. it created a serious issue related to the way Event Loops are managed. Now the user has to call it by the toolbar tool.
* 2 settings not saved in config are now saved.
* a few other minor enhancements
* better icon in footprint wizard frame
Remove a few #define relative to the wxWidgets 2.8 version, no more supported.