Commit Graph

115 Commits

Author SHA1 Message Date
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
Mikolaj Wielgus 921105330a Remove printing files from Project Manager 2021-11-12 20:18:32 +00:00
Mikolaj Wielgus 6d9456ea4d Fix opening files with spaces on Linux
`wxLaunchDefaultApplication()` fails on files with spaces on Unix
systems due to a programmer error. This is fixed in newer wxWidgets
versions, so let's backport it as a workaround.
2021-11-07 14:31:14 +00:00
Jeff Young 1f19c41c29 Support printing of kicad_dru files. 2021-10-15 12:45:43 +01:00
Jeff Young 8a8775bed8 Remove another use of non-argv wxExecute
(Fixes supplied by mwielgus.)
2021-10-15 12:45:43 +01:00
Jeff Young 1b6c4638ca Escape quotes to prevent break-out.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-10-13 17:17:57 +01:00
Jeff Young 10dd70881c New paramaterized interface doesn't like quoted parameters.
(At least on MSW, anyway.)
2021-10-02 14:08:36 +01:00
jean-pierre charras e96108d3c8 Fix int ExecuteFile(...) incorrect behavior with quoted filename.
It uses a wxExecute() version that add quotes to filename, so the final
filename was incorrect.
Fixes #9292
https://gitlab.com/kicad/code/kicad/issues/9292
2021-10-01 17:26:01 +02:00
Jeff Young 3413358992 Make sure there is a filename before creating a parameter for it.
Fixes https://gitlab.com/kicad/code/kicad/issues/9263
2021-09-27 22:57:15 +01:00
Jeff Young 5dc82037fb Fix typo. 2021-09-26 17:26:56 +01:00
Jeff Young 1723106b4d Compile fixes for wx3.0. 2021-09-26 17:02:27 +01:00
Jeff Young 88ad249f76 Cleanup. 2021-09-26 16:34:32 +01:00
Jeff Young 67fb8cbe9e Compile fix. 2021-09-26 16:20:46 +01:00
Jeff Young fa032400ee Fix compile error. 2021-09-26 15:28:17 +01:00
Jeff Young bbea8afdc5 Trim some (probably) excess includes. 2021-09-26 15:28:17 +01:00
Jeff Young 5bf042fcc1 Use individual parameter version of wxExecute.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-09-26 15:03:06 +01:00
Jeff Young c6bcb85562 Excise system() calls.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-09-25 20:09:06 +01:00
Jeff Young 157c21d325 Only run Unix file handling stuff on Unix.
Fixes https://gitlab.com/kicad/code/kicad/issues/9217
2021-09-23 13:08:31 +01:00
jean-pierre charras bdb1231169 Fix compil issues on GTK and MSW. 2021-09-19 17:28:14 +02: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
Wayne Stambaugh f233f4a0a9 Expunge EDA_FILE_SELECTOR.
EDA_FILE_SELECTOR was just an obfuscation of wxFileSelector().
2021-07-28 14:12:51 -04:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Jeff Young 062c4fda62 More error message regularization (and translatability improvements). 2021-06-28 00:45:24 +01:00
jean-pierre charras 964cbb95d3 gestfich.cpp: fix an issue on wxGTK when calling wxLaunchDefaultApplication()
- On wxGTK version < 3.1, the filename must be quoted if containing spaces,
and can be always quoted.
- On wxGTK version >= 3.1, the filename must *never* be quoted because
a quoted filename breaks wxLaunchDefaultApplication().
Fixes #8670
https://gitlab.com/kicad/code/kicad/issues/8670
2021-06-25 11:06:41 +02:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Marek Roszko bdc41f7365 Don't search hardcoded (and never valid on non-english) Windows paths 2020-11-18 19:22:00 -05:00
Wayne Stambaugh 04a3619428 Fix opening symbol documentation field paths with spaces on GTK.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6422
2020-11-18 11:54:12 -05: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
Marek Roszko 64484f5fc4 Split KIID out of common.h 2020-10-24 00:17:08 -04:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
jean-pierre charras b38cef409b Rename CopyFile() to KiCopyFile() to avoid name colliding with a windows header.
Using CopyFile() that can collide with a windows header create hard to
understand errors, including link errors.

Renaming this function avoids these strange errors.
2020-10-03 10:08:21 +02:00
jean-pierre charras 36bc44e6d7 more cleanup about removing useless include 2020-10-02 19:56:10 +02:00
Ian McInerney a0d84e94fd Use move to trash to the project manager instead of immediate delete
CHANGED: Delete in the project manager now moves files to the trash can

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2499
2020-08-28 23:00:43 +00:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Ian McInerney 20e7fc8a0e Properly escape spaces when opening PDFs on windows
Fixes https://gitlab.com/kicad/code/kicad/issues/2625
2020-01-03 19:06:49 +00:00
jean-pierre charras 52db6acb86 Fix a compil issue on Windows.
A wxString was defined as const, but on Windows it is modified.
2019-12-06 08:40:58 +01:00
Seth Hillbrand 6983c56cf8 Use const references where possible
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -08:00
jean-pierre charras 767d7f2009 Fix bug (typo?) in gestfich.cpp.
Minor enhancement in treeproject_item.cpp
2019-11-19 16:11:56 +01:00
Ian McInerney 88e55bbf2d Recursively delete directories in the project tree
Ensure we iterate over all the sub directories and files inside of them
when deleting a directory from the project tree.

Fixes: lp:1852357
* https://bugs.launchpad.net/kicad/+bug/1852357
2019-11-15 00:26:52 +00:00
jean-pierre charras 4de6ed6206 Fix issues created by Adds Save As... to the Kicad manger.
Mainly replacing std::string by wxString to manage filenames.
On Windows, a sdt::string cannot manage a filename, unless using
in many places TO_UTF8 and FROM_UTF8.
So the best way is to use a wxString for filenames and error messages.
2019-11-10 09:37:39 +01:00
Jeff Young b5904b0401 Installment one of project Save As... feature.
ADD: Adds Save As... to the File menu for the project window.

Fixes: lp:594051
* https://bugs.launchpad.net/kicad/+bug/594051
2019-11-09 20:22:44 +00:00
Jeff Young a612fb690b Cherry pick of line-ending-safety fix from 5.1.
Fixes: lp:1842943
* https://bugs.launchpad.net/kicad/+bug/1842943
2019-09-07 03:14:03 +01:00
Jeff Young d55f4d05b4 Workaround wxWidgets inability to find the default PDF viewer.
Fixes: lp:1843061
* https://bugs.launchpad.net/kicad/+bug/1843061
2019-09-06 23:38:20 +01:00
Jeff Young 2274895acf Add print preflight so the menu item is only shown when we can print.
Fixes: lp:1836473
* https://bugs.launchpad.net/kicad/+bug/1836473
2019-08-29 23:56:16 +01:00
Jeff Young 678294b8a6 Try harder to find a viable print solution on GTK.
Fixes: lp:1836473
* https://bugs.launchpad.net/kicad/+bug/1836473
2019-08-28 20:04:35 +01:00
Jeff Young 360a52399a Add printing to RMB project items.
Fixes: lp:1836473
* https://bugs.launchpad.net/kicad/+bug/1836473
2019-08-28 17:32:08 +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
Maciej Suminski bbfc1eb12c Use quoted file name when opening a PDF file
Fixes: lp:1783667
* https://bugs.launchpad.net/kicad/+bug/1783667
2018-07-26 12:05:05 +02:00
Camille 3168d03fe5 Fix unnecessary copy initialization detected by clang-tidy 2018-01-09 18:22:10 -05:00