37 Commits

Author SHA1 Message Date
Seth Hillbrand
1b0ed24558 Minor cleanup logic 2025-08-11 11:03:31 -07:00
Seth Hillbrand
ac7ae87495 Parse gitignore when building new project from template
Avoids cloning the .git subdirectory and will also avoid any files
listed as ignored in the .gitignore file.  It will copy both gitignore
and gitattributes into the new project

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16507
2025-08-11 10:06:39 -07:00
jean-pierre charras
93d90962e5 FOOTPRINT_CHOOSER_FRAME: add tool-tips to buttons; PROJECT_TEMPLATE: fix strings
Translated strings must use Printf to be built, and cannot be created by
concatenating sub strings that fixes the word ordering (that should be
depending on language)
2025-07-25 10:09:47 +02:00
Seth Hillbrand
094870e7a4 String fixes
- Clarify wording in a couple places
- Fix missing 'not' and remove non-standard dashes
- Standardize on single-quote for strings in strings
2025-07-23 17:36:51 -07:00
Jeff Young
9750f7690c Performance optimizations. 2025-06-05 18:01:44 +01:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jan Wichmann
6d44d407a7 kicad: Fixed multi-line title in project template selector
Replaces some file extensions with symbols
2024-12-10 14:03:36 +00:00
Alex Shvartzkop
2babd574be Refactor autosave prefix into FILEEXT. 2024-04-22 04:06:04 +03:00
Wayne Stambaugh
105bcd4082 Use reference to strings in for loop rather than copy.
Closes Coverity ID 486180.
2024-02-07 07:58:57 -05:00
Jan Wichmann
2a0a41f149 Better template handling of include/excluded files
Reject all hidden folders and files when copying the template files, only allow '.gitignore', '.gitattributes' files as these are likely intended.  Do not copy `.lck`, `autosave` or `backup` files
2024-02-07 01:36:34 +00:00
Marek Roszko
9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Wayne Stambaugh
a309e24132 Don't copy hidden files and folders when creating project from template.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16093
2023-11-19 10:48:29 -05:00
jean-pierre charras
4915f6ca20 Fix a few compil warnings 2022-07-30 14:06:51 +02:00
Jeff Young
cff52c70d0 Handle empty directories in template projects.
Fixes https://gitlab.com/kicad/code/kicad/issues/10191
2022-05-31 17:48:38 +01:00
Seth Hillbrand
2d66b6fd3e Cound't -> Couldn't 2021-11-08 15:56:51 -08:00
Jeff Young
b00d01dcc4 Don't infer two projects when we find both .kicad_pro and .pro.
Also makes the terminology around folder/directory consistent in
the error messages and dialogs.

Fixes https://gitlab.com/kicad/code/kicad/issues/8481
2021-06-08 14:52:23 +01:00
Jeff Young
c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Wayne Stambaugh
4a60da42d1 KiCad: don't rename page description file on new project from template.
Doing so will break the link in the schematic and/or board file so copy
page description file(s) verbatim to the new project folder.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6524
2021-05-05 07:00:13 -04:00
Marek Roszko
7565f60a03 Swap wxFileInputStream/wxFileOutputStream for the buffered kind 2020-12-12 18:52:02 -05:00
Seth Hillbrand
4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Jon Evans
b592a4169f Update project template system for new format 2020-07-02 22:08:54 -04:00
Seth Hillbrand
b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Jeff Young
114ea1f406 Cleanup. 2019-11-09 20:22:44 +00:00
Wayne Stambaugh
c7fc54b348 KiCad: fix new project from template bug.
Do no rename symbol library files to the new project name.  Only rename
the cache library.  This prevents breaking symbol library links in the
schematic due to the project symbol library table pointing to the wrong
library file name.

Fixes lp:1837667

https://bugs.launchpad.net/kicad/+bug/1837667
2019-08-07 15:37:46 -04:00
Seth Hillbrand
3514473a5a Project Templates: Allow multiple line titles
This fixes two display issues in the project template selector.  The
first captured HTML tags in the template title display and the second
prevented more than one line for showing (at least on GTK) in the
preview.  This prevented disambiguation between the various templates.

(cherry picked from commit 24b032ce5bf31b1d3d8d7de185c828ffa6b44647)
2019-07-23 16:15:04 -07:00
Camille
f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Simon Richter
a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Wayne Stambaugh
525e04ce75 Prevent KiCad from overwriting existing files with template files.
Add tests to check for existing files before copying template files.

Split load project, create new project, create new project from template,
and load project from history command events into simple methods that
perform the correct actions before loading the project.  This greatly
simplifies the code.

Create a load project method that can be called from the event handlers
above.  This simplified a lot of duplicate code that existed in many of
these event handlers.

Remove the dummy "noname.pro" file creation which created required some
ugly code to prevent this file from being created unexpectedly.  Now
KiCad launches without setting a project file name when appropriate.

Fixes lp:1713951

https://bugs.launchpad.net/kicad/+bug/1713951
2017-08-31 11:15:20 -04:00
Simon Wells
1c0a0c4bfe Kicad: clean up include files. 2016-02-24 16:36:52 -05:00
jean-pierre charras
da4055ae88 Kicad: refinements in project_template.cpp.
Eeschema: schematic libraries in a sub path of standard libraries paths are now better handled.
2014-09-07 18:56:55 +02:00
jean-pierre charras
fc6d73813e Kicad: more understandable dialog when creating a project from template. Fix also a bug when copying and renaming template files.
Pcbnew: dialog to create new .pretty lib: fix an issue which prevent to open a full disk directory (at least on Windows)
2014-09-06 21:55:20 +02:00
Povilas Kanapickas
7f12513c7e Remove some uses of using namespace std. 2013-12-13 10:27:30 -06:00
Dick Hollenbeck
8ccf0320b4 1) Add "rules" to base of tree for copying into BZR_HOME/rules.
File "rules" has instructional text as comments near top.

2) Convert all text files in repo to LF line ending form.
   Any checkout done with "rules" in play will convert the working
   tree to native line ending, while keeping repo as LF line ending.
2013-05-25 23:36:44 -05:00
Brian Sidebotham
08f8703898 Fixes a bug in the template file copying mechanism. The previous code failed to honour sub-directorys and flattened the whole tree whilst copying files.
I have fixed this so that sub-directories that are not the meta directory will get copied verbatim into the new project directory.
2013-01-01 14:39:25 -06:00
jean-pierre charras
45b01a5c9c Kicad manager: first use of wxFileSystemWatcher (only with wxWidgets >= 2.9.2) to monitor files list. 2012-12-31 09:12:29 +01:00
jean-pierre charras
2dc8c27ec2 Kicad manager: project_template.cpp: accepts lower and upper case HTML keywords (compatibility with libreoffice) 2012-10-15 19:55:04 +02:00
Brian Sidebotham
9823666ca9 Commit patch from Brian Sidebotham: Project template in Kicad manager 2012-10-14 18:57:11 +02:00