Commit Graph

38 Commits

Author SHA1 Message Date
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 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Simon Richter 715eddf68b Code cleanup: remove dead code, add comment. 2016-06-08 08:32:01 +02:00
Simon Richter dca358076e Make sure KIFACE_GETTER linkage is consistent
This makes sure that the declaration is always the same within a single
module, so all users have the same idea of whether the symbol is imported.

In all dynamically linked objects, all users should be aware that the
symbol is imported, while in the statically linked bitmap2component
program, no import/export decorations should be used.
2016-05-28 13:10:06 -04:00
Simon Wells 24d293ab8d bmp2cmp: include cleanup 2016-01-15 19:57:52 -05: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
unknown b411b240f2 bitmap2component: Add a layer selection to export a logo for Pcbnew from a Cirilo Bernardo's patch.
Apply patch from Cirilo Bernardo with some minor changes: mainly allows also the solder mask layer and keep ref and value fields on the silk layer.
2014-11-12 17:59:12 +01:00
Moses McKnight 6da5e2cdd0 Configuration file consolidation patch from Moses McKnight.
* Create GetNewConfig() and GetKicadConfigPath() to unify configuration file
  creation and location.
* Move Windows configuration out of the registry into configuration files.
* Move Linux configuration files from $HOME to $HOME/.config/kicad to eliminate
  configuration file pollution in the users $HOME folder.
* Fix a bug in the configuration file where the Eeschema hot keys are saved.
2014-09-05 17:12:38 -04:00
jean-pierre charras a26449b3ef 3d-viewer: code cleaning; bitmap2component: minor fix and code cleanup 2014-08-22 12:24:14 +02:00
unknown eec819a274 Bitmap2component: old .emp output format removed (patch from Cirilo Bernardo) 2014-08-21 16:57:25 +02:00
Dick Hollenbeck 5f65d0da93 *) Add KIFACE_I::StartFlags() and IsSingle() so a KIFACE implementation can know
if it is running under single_top.cpp or under a project manager.

*)  Test Kiface().IsSingle() when adding menus, some operations are not permitted
    when running under a project manager and the KIWAY_PLAYER is pegged to a
    specific project.

*)  Implemented KIWAY::KiFACE() so it loads *.kiface files.  They still have to be
    in the same directory as the main *.exe launcher, so this presents some difficulty
    when the binaries are not yet installed but rather the *.kiface files are still
    in their original build directories.  For today, I simply copied _pcbnew.kiface
    to build/kicad/.

*)  Add a test case to kicad/mainframe.cpp just to get an early peek at loading
    _pcbnew.kiface under the C++ project manager.  Got that working for one
    specific invocation just for proof of concept.  Surprise, it works.
2014-04-17 21:05:40 -05:00
Dick Hollenbeck 6bfff89fe5 merge tip in, resolve. 2014-03-20 01:24:33 -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
jean-pierre charras 91c53a947a bitmap2component: add management of image resolution: Is read from file, when exists, and can be modified in bitmap2component.
It also fix issue #747631
2014-03-16 15:10:42 +01:00
Dick Hollenbeck 4f26386e8d Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:10:37 -06:00
jean-pierre charras 6181e9e46e Bitmap2component: fix Bug #1273082 (patch from Wesley Dungan) 2014-01-27 18:22:49 +01:00
jean-pierre charras 3b423cb12d Pcbnew fix Bug #1192203 (I hope ...)
Bitmap2component: add export for .kicad_mod new footprint file format, and export polygon descr for page layout description (.kicad_wks file)
2013-06-18 19:27:47 +02:00
Wayne Stambaugh bed96be750 Internal unit improvements and Pcbnew s-expression file format changes.
* Move EDA_TEXT object into separate header and source file.
* Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units.
* Compile PAGE_INFO  class separately for BOARD_ITEM and SCH_ITEM units.
* Minor formatting tweaks to Pcbnew s-expression file.
* Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
2012-04-12 17:31:31 -04:00
jean-pierre charras 8f62c6aa05 Move AddMenuItem inline functions outside wxstruct.h in a new file (menu_helpers.h)
Enhancements in AddMenuItem (that accepts now a menu type)
Partial use of the Edwin van den Oetelaar's patch (patch not fully working or correct)
2012-04-09 11:16:47 +02:00
Wayne Stambaugh d7feb9ab45 Initial Pcbnew s-expression file format commit.
* Add s-expression Format() function to all objects derived from
  BOARD_ITEM.
* Add s-expression Format() function to base objects as required.
* Add functions to convert coordinates from base internal units
  (nanometers) to millimeter string for writing to s-expression
  file.
* Add temporary dummy conversion functions to prevent link errors
  until schematic and board object and action code can be separated
  into DSO/DLL.
* Add CMake build option to build Pcbnew with nanometer internal
  units.
2012-04-01 16:51:56 -04:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
jean-pierre charras 51a845470b bitmap2component: use BOOST:POLYGON instead of KBool, and minor enhancements. 2011-10-26 11:53:42 +02:00
jean-pierre charras 4cbcf56cee remove useless USE_BOOST_POLYGON_LIBRARY cmake option, and remove unused files.
BOOST POLYGON is always used in zone filling functions.
Kbool is still in use in other calculations.
2011-10-25 18:24:56 +02:00
jean-pierre charras 1c412879d5 New icons: fix problems about .ico files (under Window)
Remove or move old .ico and .pgn files and add new icons (.ico files and .png files) in bitmaps_png/icons and bitmaps_xpm/icons
.png files and .ico are used to build desktop shortcuts
Handle variable size bitmaps in kicad.
2011-09-10 19:48:35 +02:00
jean-pierre charras 3b381cf8cf Remove *.ico files and used only xpm or new pgn bitmaps for icons under Window.
Fix minor other issues.
Remove unused files.
2011-09-09 21:30:59 +02:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
Andrey Fedorushkov 2b45335749 bitmap2component: fix localize GUI, fix *nix native string 2011-08-16 22:32:56 +04:00
Marco Serantoni a6c6041266 OSX: Fixes making bitmap2compoenent work. 2010-12-27 15:01:52 +01:00
jean-pierre charras 052876079a fixed bug 603481. Better bitmap2component look. fixed some locate problems for footprints using polygons (mainly created by bitmap2component) 2010-07-11 18:24:44 +02:00
jean-pierre charras af7c26e8be bitmap2component minor enhancements 2010-06-25 21:02:39 +02:00
jean-pierre charras 000085792c minor enhancement 2010-06-21 18:15:05 +02:00
jean-pierre charras 7d2ff522c1 give an icon to bitmapt2component frame 2010-06-20 20:04:29 +02:00
jean-pierre charras 9cf56261b6 give an icon to bitmapt2component frame 2010-06-20 16:47:30 +02:00
jean-pierre charras 63e7ecae59 fix bitmap2component compil issue under Linux 2010-06-15 22:17:33 +02:00
jean-pierre charras 65a585b5d9 bitmap2component: better user interface (using wxWidgets) and more bitmaps file format import 2010-06-15 20:45:22 +02:00