Commit Graph

28 Commits

Author SHA1 Message Date
Marek Roszko b02d28c676 Remove another abandoned prototype 2021-02-26 19:33:35 -05:00
Marek Roszko 23beaff2ff Remove unused prototype 2021-02-26 19:30:58 -05:00
Wayne Stambaugh a1fae02427 Header clean up round 2. 2020-12-19 13:55:28 -05: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
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
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 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 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
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Wayne Stambaugh a6a9d8eedf Default and most recently used path fixes. (fixes: 1494210)
* 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.
2015-09-25 15:38:09 -04:00
jean-pierre charras 6dd0073130 Move the non shared file class_sch_screen.h to eeschema folder. Code cleaning. Remove some wxCHECK_VERSION tests now useless. 2015-07-29 20:06:45 +02:00
Wayne Stambaugh fd0d266bfe More missing source license fixes. 2014-10-22 11:51:34 -04:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
     get disassociated from their true PROJECT.
  *) Allow loading eeschema library editor from kicad.exe
  *) Allow loading pcbnew library editor from kicad.exe
  *) Rename LIB_COMPONENT to LIB_PART.
  *) Add class PART_LIBS, and PART_LIB.
  *) Make PART_LIBS non-global, i.e. PROJECT specific.
  *) Implement "data on demand" for PART_LIBS
  *) Implement "data on demand" for schematic SEARCH_STACK.
  *) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
  *) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
     a weak pointer.
  *) Remove all chdir() calls so projects don't need to be CWD.
  *) Romove APPEND support from OpenProjectFiles().
  *) Make OpenProjectFiles() robust, even for creating new projects.
  *) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
     and save them in the .eeschema config file, not in the project file.
  *) Fix bug with wxDir() while accessing protected dirs in kicad.exe
  *) Consolidate template copying into PROJECT class, not in kicad.exe source.
  *) Generally untangle eeschema, making its libraries not global but rather
     held in the PROJECT.
2014-08-13 15:28:54 -05:00
Dick Hollenbeck c39385a5cd improve help file finding after kiway breakage. 2014-04-14 13:49:52 -05:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
Jacobo Aragunde Perez 295b5b5dea Add patch from Jacobo Aragunde Perez <Log of opened and closed applications in KiCad launcher> 2013-01-18 11:42:23 +01:00
Wayne Stambaugh cd0b231656 Minor fixes, dead code removal, and coding policy fixes.
* Use version of DateAndTime that returns a wxString and delete the
  version that takes a char* as it is no longer required.
* Merge StrNumICmp() and StrLenNumICmp() into StrLenNumCmp() to create a
  single function for comparing strings with integers and remove a lot
  of duplicate code.
* Remove unused strupper from string.cpp.
* Use wxArrayString for sorting the EDA_LIST_DIALOG contents.
2011-11-08 11:37:25 -05:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* Correct all user strings and comments for the correct capitalization of
  application names according to JP.  They are KiCad, Pcbnew, CvPcb,
  Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
2011-09-30 14:15:37 -04:00
Wayne Stambaugh 750f84c19a Coding style policy fixes and dead code removal. 2011-09-06 15:42:46 -04:00
Dick Hollenbeck 6c9244e8c3 fix function comments, this time ones in *.cpp files until they
can be deleted later if they exist in the headers, or moved to 
headers if they should exist in the headers.
2010-11-12 10:59:16 -06:00
Dick Hollenbeck 74cc5a75a8 fix Bug #578532, document and embellish QuoteFullPath() 2010-05-11 09:35:13 -05:00
stambaughw d2eac37ddf Comment translation complete, Yeah!!!! 2009-11-23 20:18:47 +00:00
stambaughw 5b3c5861bd More search path, compiler warning, and bug fixes.
Added template subdirectory to library search path list.
Removed PARAM_CFG_BASE empty destructor to prevent GCC warning.
Set timeout to 0 on DisplayInfo call to prevent debug assertion in eeschema/files-io.cpp.
Declare PARAM_CFG_ARRAY for future project file object implementation.
Removed unnecessary COMMON_GLOBL definition in gr_basic.h and param_config.h.
2009-04-06 18:54:57 +00:00
stambaughw 689579bde1 Global variable unobfuscation, new library path search, and lots of other changes. See CHANGELOG.txt. 2009-04-05 20:49:15 +00:00
stambaughw b833a46bad More header file realignments to reduce recompiling and general code cleaning. 2009-02-04 15:25:03 +00:00
jerryjacobs 72dbdf7faa Splitted common.h subroutines to seperate include files. Minor code cleanup. 2009-01-19 19:08:42 +00:00