From 6a193155574c6a107f5f912a080edf3af44fe96b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 4 Jan 2015 08:19:04 +0100 Subject: [PATCH 1/9] Fix compat with swig 3.03 --- common/footprint_info.cpp | 2 +- demos/ecc83/ecc83-pp_v2.cmp | 4 +- demos/ecc83/ecc83-pp_v2.kicad_pcb | 236 +++++++++++----------- demos/ecc83/ecc83-pp_v2.net | 28 +-- demos/ecc83/ecc83-pp_v2.sch | 39 +--- include/eda_text.h | 6 +- pcbnew/class_module.h | 14 +- pcbnew/scripting/board.i | 4 +- pcbnew/scripting/module.i | 4 +- scripting/build_tools/fix_swig_imports.py | 5 +- scripting/dlist.i | 4 +- scripting/kicad.i | 4 +- 12 files changed, 169 insertions(+), 181 deletions(-) diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp index 382e141bb3..815aeb16c1 100644 --- a/common/footprint_info.cpp +++ b/common/footprint_info.cpp @@ -101,7 +101,7 @@ void FOOTPRINT_INFO::load() std::auto_ptr m( fptable->FootprintLoad( m_nickname, m_fpname ) ); - m_pad_count = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); + m_pad_count = m->GetPadCount( DO_NOT_INCLUDE_NPTH ); m_keywords = m->GetKeywords(); m_doc = m->GetDescription(); diff --git a/demos/ecc83/ecc83-pp_v2.cmp b/demos/ecc83/ecc83-pp_v2.cmp index 8f751d07ce..4306bec632 100644 --- a/demos/ecc83/ecc83-pp_v2.cmp +++ b/demos/ecc83/ecc83-pp_v2.cmp @@ -1,4 +1,4 @@ -Cmp-Mod V01 Created by Cvpcb (2014-12-31 BZR 5344)-product date = 01/01/2015 18:25:40 +Cmp-Mod V01 Created by Cvpcb (2014-12-31 BZR 5344)-product date = 01/01/2015 20:57:19 BeginCmp TimeStamp = /4549F4BE; @@ -102,7 +102,7 @@ BeginCmp TimeStamp = /48B4F266; Reference = U1; ValeurCmp = ECC83; -IdModule = Valves:VALVE-ECC-83-1; +IdModule = Valves:VALVE-ECC-83-2; EndCmp EndListe diff --git a/demos/ecc83/ecc83-pp_v2.kicad_pcb b/demos/ecc83/ecc83-pp_v2.kicad_pcb index 16be1f0280..dcfca8358c 100644 --- a/demos/ecc83/ecc83-pp_v2.kicad_pcb +++ b/demos/ecc83/ecc83-pp_v2.kicad_pcb @@ -1,12 +1,12 @@ (kicad_pcb (version 4) (host pcbnew "(2014-12-31 BZR 5344)-product") (general - (links 20) - (no_connects 0) - (area 118.759514 89.3318 168.710429 133.6802) + (links 21) + (no_connects 1) + (area 119.824499 90.614499 168.465501 132.905501) (thickness 1.6002) (drawings 4) - (tracks 46) + (tracks 49) (zones 0) (modules 15) (nets 14) @@ -411,41 +411,6 @@ ) ) - (module Valves:VALVE-ECC-83-1 (layer Dessus) (tedit 54A58223) (tstamp 54A5839D) - (at 149.3 109.2) - (path /48B4F266) - (fp_text reference U1 (at 1.27 -11.43) (layer F.SilkS) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value ECC83 (at 0 11.43) (layer F.SilkS) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_circle (center 0 0) (end 10.16 1.27) (layer F.SilkS) (width 0.15)) - (pad 1 thru_hole circle (at 3.4544 4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 8 "Net-(R1-Pad1)")) - (pad 2 thru_hole circle (at 5.60832 1.8288) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 5 "Net-(P1-Pad2)")) - (pad 3 thru_hole circle (at 5.60832 -1.8288) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 9 "Net-(R2-Pad1)")) - (pad 4 thru_hole circle (at 3.4544 -4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 6 "Net-(P4-Pad1)")) - (pad 5 thru_hole circle (at 0 -5.8928) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 6 "Net-(P4-Pad1)")) - (pad 6 thru_hole circle (at -3.4544 -4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 2 "Net-(C1-Pad1)")) - (pad 7 thru_hole circle (at -5.60832 -1.8288) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 8 "Net-(R1-Pad1)")) - (pad 8 thru_hole circle (at -5.60832 1.78816) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 4 "Net-(C2-Pad2)")) - (pad 9 thru_hole circle (at -3.4544 4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 7 "Net-(P4-Pad2)")) - (model Valves/VALVE-ECC-83-1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - (module connect:1pin (layer Dessus) (tedit 54A58223) (tstamp 54A583D2) (at 123.19 93.98) (descr "module 1 pin (ou trou mecanique de percage)") @@ -510,57 +475,97 @@ (net 13 "Net-(P8-Pad1)")) ) + (module Valves:VALVE-ECC-83-2 (layer Dessus) (tedit 54A5A61F) (tstamp 54A5A6B2) + (at 149.3 109.2) + (path /48B4F266) + (fp_text reference U1 (at 0 -11.43) (layer F.SilkS) + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text value ECC83 (at 0 11.43) (layer F.SilkS) + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_circle (center 0 0) (end 10.16 1.27) (layer F.SilkS) (width 0.15)) + (pad 1 thru_hole oval (at 3.4544 4.75488 306) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 8 "Net-(R1-Pad1)")) + (pad 2 thru_hole oval (at 5.60832 1.8288 342) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 5 "Net-(P1-Pad2)")) + (pad 3 thru_hole oval (at 5.60832 -1.8288 18) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 9 "Net-(R2-Pad1)")) + (pad 4 thru_hole oval (at 3.4544 -4.75488 54) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 6 "Net-(P4-Pad1)")) + (pad 5 thru_hole oval (at 0 -5.8928 90) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 6 "Net-(P4-Pad1)")) + (pad 6 thru_hole oval (at -3.4544 -4.75488 306) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 2 "Net-(C1-Pad1)")) + (pad 7 thru_hole oval (at -5.60832 -1.8288 342) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 8 "Net-(R1-Pad1)")) + (pad 8 thru_hole oval (at -5.60832 1.78816 18) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 4 "Net-(C2-Pad2)")) + (pad 9 thru_hole oval (at -3.4544 4.75488 54) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) + (net 7 "Net-(P4-Pad2)")) + (pad 2 thru_hole circle (at 0 0) (size 4.50088 4.50088) (drill 3.0988) (layers *.Cu *.Mask F.SilkS) + (net 5 "Net-(P1-Pad2)")) + (model Valves/VALVE-ECC-83-2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + (gr_line (start 168.275 132.715) (end 120.015 132.715) (angle 90) (layer Edge.Cuts) (width 0.381)) (gr_line (start 168.275 90.805) (end 120.015 90.805) (angle 90) (layer Edge.Cuts) (width 0.381)) (gr_line (start 168.275 90.805) (end 168.275 132.715) (angle 90) (layer Edge.Cuts) (width 0.381)) (gr_line (start 120.015 90.805) (end 120.015 132.715) (angle 90) (layer Edge.Cuts) (width 0.381)) (segment (start 165.1 123.825) (end 165.354 123.825) (width 0.8636) (layer Dessous) (net 1) (status 30)) - (segment (start 125.73 101.6) (end 131.445 101.6) (width 0.8636) (layer Dessous) (net 2) (status 420)) - (segment (start 123.19 102.87) (end 124.46 102.87) (width 0.8636) (layer Dessous) (net 2) (status 810)) - (segment (start 142.90548 101.6) (end 145.7706 104.46512) (width 0.8636) (layer Dessous) (net 2) (status 420)) - (segment (start 131.445 101.6) (end 142.90548 101.6) (width 0.8636) (layer Dessous) (net 2) (status 810)) (segment (start 124.46 102.87) (end 125.73 101.6) (width 0.8636) (layer Dessous) (net 2)) - (segment (start 124.46 114.935) (end 123.825 114.935) (width 0.8636) (layer Dessous) (net 3) (status 30)) - (segment (start 123.19 114.3) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 3) (status 20)) - (segment (start 123.825 114.935) (end 123.19 114.3) (width 0.8636) (layer Dessous) (net 3) (status 10)) - (segment (start 131.445 108.585) (end 128.905 111.125) (width 0.8636) (layer Dessous) (net 3) (status 810)) + (segment (start 131.445 101.6) (end 142.90548 101.6) (width 0.8636) (layer Dessous) (net 2) (status 810)) + (segment (start 142.90548 101.6) (end 145.7706 104.46512) (width 0.8636) (layer Dessous) (net 2) (status 420)) + (segment (start 123.19 102.87) (end 124.46 102.87) (width 0.8636) (layer Dessous) (net 2) (status 810)) + (segment (start 125.73 101.6) (end 131.445 101.6) (width 0.8636) (layer Dessous) (net 2) (status 420)) (segment (start 128.905 111.125) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 3) (status 420)) - (segment (start 142.875 116.205) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 142.875 112.395) (end 142.875 116.205) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 143.61668 111.65332) (end 142.875 112.395) (width 0.8636) (layer Dessous) (net 4) (status 10)) - (segment (start 140.97 128.905) (end 142.24 128.905) (width 0.8636) (layer Dessous) (net 4) (status 810)) - (segment (start 142.24 128.905) (end 143.51 127.635) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 143.51 127.635) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 143.61668 111.00816) (end 143.61668 111.65332) (width 0.8636) (layer Dessous) (net 4) (status 830)) + (segment (start 131.445 108.585) (end 128.905 111.125) (width 0.8636) (layer Dessous) (net 3) (status 810)) + (segment (start 123.825 114.935) (end 123.19 114.3) (width 0.8636) (layer Dessous) (net 3) (status 10)) + (segment (start 123.19 114.3) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 3) (status 20)) + (segment (start 124.46 114.935) (end 123.825 114.935) (width 0.8636) (layer Dessous) (net 3) (status 30)) (segment (start 131.445 128.905) (end 140.97 128.905) (width 0.8636) (layer Dessous) (net 4) (status C30)) - (segment (start 161.925 113.03) (end 165.1 113.03) (width 0.8636) (layer Dessous) (net 5) (status 420)) - (segment (start 159.9438 111.0488) (end 161.925 113.03) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 165.1 113.03) (end 165.1 116.205) (width 0.8636) (layer Dessous) (net 5) (status C30)) + (segment (start 143.61668 111.00816) (end 143.61668 111.65332) (width 0.8636) (layer Dessous) (net 4) (status 830)) + (segment (start 143.51 127.635) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 142.24 128.905) (end 143.51 127.635) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 140.97 128.905) (end 142.24 128.905) (width 0.8636) (layer Dessous) (net 4) (status 810)) + (segment (start 143.61668 111.65332) (end 142.875 112.395) (width 0.8636) (layer Dessous) (net 4) (status 10)) + (segment (start 142.875 112.395) (end 142.875 116.205) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 142.875 116.205) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 4)) (segment (start 154.83332 111.0488) (end 159.9438 111.0488) (width 0.8636) (layer Dessous) (net 5) (status 810)) - (segment (start 149.86 115.697) (end 149.86 107.33952) (width 0.8636) (layer Dessous) (net 6)) - (segment (start 149.86 107.33952) (end 152.7544 104.44512) (width 0.8636) (layer Dessous) (net 6) (tstamp 54A589AE) (status 20)) - (segment (start 149.86 115.697) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 6)) - (segment (start 149.225 103.3272) (end 151.54148 103.3272) (width 0.8636) (layer Dessous) (net 6) (status 10)) - (segment (start 151.54148 103.3272) (end 152.6794 104.46512) (width 0.8636) (layer Dessous) (net 6) (status 420)) + (segment (start 165.1 113.03) (end 165.1 116.205) (width 0.8636) (layer Dessous) (net 5) (status C30)) + (segment (start 159.9438 111.0488) (end 161.925 113.03) (width 0.8636) (layer Dessous) (net 5)) + (segment (start 161.925 113.03) (end 165.1 113.03) (width 0.8636) (layer Dessous) (net 5) (status 420)) + (segment (start 152.7544 104.44512) (end 152.7544 105.5456) (width 0.8636) (layer Dessous) (net 6) (status C00000)) + (segment (start 152.7544 105.5456) (end 152.5 105.8) (width 0.8636) (layer Dessous) (net 6) (tstamp 54A5A703) (status 400000)) + (segment (start 152.5 105.8) (end 152.5 110.7) (width 0.8636) (layer Dessous) (net 6) (tstamp 54A5A705)) + (segment (start 152.5 110.7) (end 149.86 113.34) (width 0.8636) (layer Dessous) (net 6) (tstamp 54A5A707)) + (segment (start 149.86 113.34) (end 149.86 115.697) (width 0.8636) (layer Dessous) (net 6) (tstamp 54A5A709)) (segment (start 150.495 128.905) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 6) (status 810)) - (segment (start 147.955 128.905) (end 147.955 116.15928) (width 0.8636) (layer Dessous) (net 7) (status 810)) + (segment (start 151.54148 103.3272) (end 152.6794 104.46512) (width 0.8636) (layer Dessous) (net 6) (status 420)) + (segment (start 149.225 103.3272) (end 151.54148 103.3272) (width 0.8636) (layer Dessous) (net 6) (status 10)) + (segment (start 149.86 115.697) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 6)) (segment (start 147.955 116.15928) (end 145.7706 113.97488) (width 0.8636) (layer Dessous) (net 7) (status 420)) - (segment (start 153.67 131.445) (end 154.94 130.175) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 130.175 131.445) (end 153.67 131.445) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 128.905 130.175) (end 130.175 131.445) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 128.905 127) (end 128.905 130.175) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 154.94 130.175) (end 154.94 116.23548) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 154.94 116.23548) (end 152.6794 113.97488) (width 0.8636) (layer Dessous) (net 8) (status 420)) - (segment (start 140.97 121.285) (end 140.97 123.825) (width 0.8636) (layer Dessous) (net 8) (status 810)) - (segment (start 142.1638 107.3912) (end 140.97 108.585) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 140.97 108.585) (end 140.97 121.285) (width 0.8636) (layer Dessous) (net 8) (status 420)) - (segment (start 143.61668 107.3912) (end 142.1638 107.3912) (width 0.8636) (layer Dessous) (net 8) (status 810)) - (segment (start 130.175 125.73) (end 128.905 127) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 139.065 125.73) (end 130.175 125.73) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 147.955 128.905) (end 147.955 116.15928) (width 0.8636) (layer Dessous) (net 7) (status 810)) (segment (start 140.97 123.825) (end 139.065 125.73) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 154.83332 107.3912) (end 165.0238 107.3912) (width 0.8636) (layer Dessous) (net 9) (status 830)) + (segment (start 139.065 125.73) (end 130.175 125.73) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 130.175 125.73) (end 128.905 127) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 143.61668 107.3912) (end 142.1638 107.3912) (width 0.8636) (layer Dessous) (net 8) (status 810)) + (segment (start 140.97 108.585) (end 140.97 121.285) (width 0.8636) (layer Dessous) (net 8) (status 420)) + (segment (start 142.1638 107.3912) (end 140.97 108.585) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 140.97 121.285) (end 140.97 123.825) (width 0.8636) (layer Dessous) (net 8) (status 810)) + (segment (start 154.94 116.23548) (end 152.6794 113.97488) (width 0.8636) (layer Dessous) (net 8) (status 420)) + (segment (start 154.94 130.175) (end 154.94 116.23548) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 128.905 127) (end 128.905 130.175) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 128.905 130.175) (end 130.175 131.445) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 130.175 131.445) (end 153.67 131.445) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 153.67 131.445) (end 154.94 130.175) (width 0.8636) (layer Dessous) (net 8)) (segment (start 165.0238 107.3912) (end 165.1 107.315) (width 0.8636) (layer Dessous) (net 9) (status 430)) + (segment (start 154.83332 107.3912) (end 165.0238 107.3912) (width 0.8636) (layer Dessous) (net 9) (status 830)) (zone (net 1) (net_name GND) (layer Dessous) (tstamp 4EED96A1) (hatch edge 0.508) (connect_pads (clearance 0.635)) @@ -618,53 +623,52 @@ (xy 151.54148 102.1334) (xy 151.165771 102.1334) (xy 151.110021 102.049964) (xy 150.533196 101.664542) (xy 149.852785 101.5292) (xy 148.747215 101.5292) (xy 148.066804 101.664542) (xy 147.489979 102.049964) (xy 147.13985 102.573968) (xy 146.570951 102.364091) (xy 145.877744 102.391328) (xy 145.540546 102.546778) (xy 143.749624 100.755856) (xy 143.362328 100.497073) (xy 142.90548 100.4062) - (xy 133.03253 100.4062) (xy 132.979992 100.279362) (xy 132.765638 100.065008) (xy 132.727151 100.049066) (xy 132.727151 96.701126) - (xy 132.698867 96.196681) (xy 132.560239 95.862003) (xy 132.375891 95.763326) (xy 132.201674 95.937543) (xy 132.201674 95.589109) - (xy 132.102997 95.404761) (xy 131.626126 95.237849) (xy 131.121681 95.266133) (xy 130.787003 95.404761) (xy 130.688326 95.589109) - (xy 131.445 96.345783) (xy 132.201674 95.589109) (xy 132.201674 95.937543) (xy 131.619217 96.52) (xy 132.375891 97.276674) - (xy 132.560239 97.177997) (xy 132.727151 96.701126) (xy 132.727151 100.049066) (xy 132.485571 99.949) (xy 132.201674 99.949) + (xy 133.045192 100.4062) (xy 132.886808 100.165087) (xy 132.727151 100.057317) (xy 132.727151 96.701126) (xy 132.698867 96.196681) + (xy 132.560239 95.862003) (xy 132.375891 95.763326) (xy 132.201674 95.937543) (xy 132.201674 95.589109) (xy 132.102997 95.404761) + (xy 131.626126 95.237849) (xy 131.121681 95.266133) (xy 130.787003 95.404761) (xy 130.688326 95.589109) (xy 131.445 96.345783) + (xy 132.201674 95.589109) (xy 132.201674 95.937543) (xy 131.619217 96.52) (xy 132.375891 97.276674) (xy 132.560239 97.177997) + (xy 132.727151 96.701126) (xy 132.727151 100.057317) (xy 132.633568 99.994148) (xy 132.334 99.934072) (xy 132.201674 99.934072) (xy 132.201674 97.450891) (xy 131.445 96.694217) (xy 131.270783 96.868434) (xy 131.270783 96.52) (xy 130.514109 95.763326) (xy 130.329761 95.862003) (xy 130.162849 96.338874) (xy 130.191133 96.843319) (xy 130.329761 97.177997) (xy 130.514109 97.276674) (xy 131.270783 96.52) (xy 131.270783 96.868434) (xy 130.688326 97.450891) (xy 130.787003 97.635239) (xy 131.263874 97.802151) - (xy 131.768319 97.773867) (xy 132.102997 97.635239) (xy 132.201674 97.450891) (xy 132.201674 99.949) (xy 132.182429 99.949) - (xy 130.404429 99.949) (xy 130.124362 100.065008) (xy 129.910008 100.279362) (xy 129.857469 100.4062) (xy 125.73 100.4062) - (xy 125.273152 100.497073) (xy 124.885856 100.755856) (xy 124.345603 101.296108) (xy 124.345603 100.480745) (xy 124.315325 100.02704) - (xy 124.19995 99.7485) (xy 124.028783 99.665433) (xy 123.854567 99.839649) (xy 123.854567 99.491217) (xy 123.7715 99.32005) - (xy 123.340745 99.174397) (xy 122.88704 99.204675) (xy 122.6085 99.32005) (xy 122.525433 99.491217) (xy 123.19 100.155783) - (xy 123.854567 99.491217) (xy 123.854567 99.839649) (xy 123.364217 100.33) (xy 124.028783 100.994567) (xy 124.19995 100.9115) - (xy 124.345603 100.480745) (xy 124.345603 101.296108) (xy 124.239435 101.402276) (xy 124.103571 101.346) (xy 123.800429 101.346) - (xy 123.756894 101.346) (xy 123.7715 101.33995) (xy 123.854567 101.168783) (xy 123.19 100.504217) (xy 123.015783 100.678433) - (xy 123.015783 100.33) (xy 122.351217 99.665433) (xy 122.18005 99.7485) (xy 122.034397 100.179255) (xy 122.064675 100.63296) - (xy 122.18005 100.9115) (xy 122.351217 100.994567) (xy 123.015783 100.33) (xy 123.015783 100.678433) (xy 122.525433 101.168783) - (xy 122.6085 101.33995) (xy 122.626392 101.346) (xy 122.276429 101.346) (xy 121.996362 101.462008) (xy 121.782008 101.676362) - (xy 121.666 101.956429) (xy 121.666 102.259571) (xy 121.666 103.783571) (xy 121.782008 104.063638) (xy 121.996362 104.277992) - (xy 122.276429 104.394) (xy 122.579571 104.394) (xy 124.103571 104.394) (xy 124.383638 104.277992) (xy 124.597992 104.063638) - (xy 124.610309 104.033901) (xy 124.916847 103.972927) (xy 124.916848 103.972927) (xy 125.304144 103.714144) (xy 126.224488 102.7938) - (xy 129.857469 102.7938) (xy 129.910008 102.920638) (xy 130.124362 103.134992) (xy 130.404429 103.251) (xy 130.707571 103.251) - (xy 132.485571 103.251) (xy 132.765638 103.134992) (xy 132.979992 102.920638) (xy 133.03253 102.7938) (xy 142.410992 102.7938) + (xy 131.768319 97.773867) (xy 132.102997 97.635239) (xy 132.201674 97.450891) (xy 132.201674 99.934072) (xy 130.556 99.934072) + (xy 130.265452 99.990445) (xy 130.010087 100.158192) (xy 129.842679 100.4062) (xy 125.73 100.4062) (xy 125.273152 100.497073) + (xy 124.885856 100.755856) (xy 124.345603 101.296108) (xy 124.345603 100.480745) (xy 124.315325 100.02704) (xy 124.19995 99.7485) + (xy 124.028783 99.665433) (xy 123.854567 99.839649) (xy 123.854567 99.491217) (xy 123.7715 99.32005) (xy 123.340745 99.174397) + (xy 122.88704 99.204675) (xy 122.6085 99.32005) (xy 122.525433 99.491217) (xy 123.19 100.155783) (xy 123.854567 99.491217) + (xy 123.854567 99.839649) (xy 123.364217 100.33) (xy 124.028783 100.994567) (xy 124.19995 100.9115) (xy 124.345603 100.480745) + (xy 124.345603 101.296108) (xy 124.250731 101.39098) (xy 123.952 101.331072) (xy 123.775808 101.331072) (xy 123.854567 101.168783) + (xy 123.19 100.504217) (xy 123.015783 100.678433) (xy 123.015783 100.33) (xy 122.351217 99.665433) (xy 122.18005 99.7485) + (xy 122.034397 100.179255) (xy 122.064675 100.63296) (xy 122.18005 100.9115) (xy 122.351217 100.994567) (xy 123.015783 100.33) + (xy 123.015783 100.678433) (xy 122.525433 101.168783) (xy 122.604191 101.331072) (xy 122.428 101.331072) (xy 122.137452 101.387445) + (xy 121.882087 101.555192) (xy 121.711148 101.808432) (xy 121.651072 102.108) (xy 121.651072 103.632) (xy 121.707445 103.922548) + (xy 121.875192 104.177913) (xy 122.128432 104.348852) (xy 122.428 104.408928) (xy 123.952 104.408928) (xy 124.242548 104.352555) + (xy 124.497913 104.184808) (xy 124.598142 104.036321) (xy 124.916847 103.972927) (xy 124.916848 103.972927) (xy 125.304144 103.714144) + (xy 126.224488 102.7938) (xy 129.844807 102.7938) (xy 130.003192 103.034913) (xy 130.256432 103.205852) (xy 130.556 103.265928) + (xy 132.334 103.265928) (xy 132.624548 103.209555) (xy 132.879913 103.041808) (xy 133.04732 102.7938) (xy 142.410992 102.7938) (xy 143.768082 104.15089) (xy 143.642278 104.4919) (xy 143.665741 105.089099) (xy 143.055305 105.261261) (xy 142.510498 105.690752) (xy 142.226761 106.1974) (xy 142.1638 106.1974) (xy 141.706952 106.288273) (xy 141.319656 106.547056) (xy 140.125856 107.740856) (xy 139.867073 108.128152) (xy 139.7762 108.585) (xy 139.7762 120.413059) (xy 139.73257 120.456613) (xy 139.509754 120.993214) (xy 139.509247 121.574237) (xy 139.731126 122.111226) (xy 139.7762 122.156378) (xy 139.7762 123.330512) (xy 138.570512 124.5362) - (xy 133.096 124.5362) (xy 133.096 109.625571) (xy 133.096 109.322429) (xy 133.096 107.544429) (xy 132.979992 107.264362) - (xy 132.765638 107.050008) (xy 132.485571 106.934) (xy 132.182429 106.934) (xy 130.404429 106.934) (xy 130.124362 107.050008) - (xy 129.910008 107.264362) (xy 129.794 107.544429) (xy 129.794 107.847571) (xy 129.794 108.547712) (xy 128.410512 109.9312) - (xy 124.59783 109.9312) (xy 124.383638 109.717008) (xy 124.345603 109.701253) (xy 124.345603 108.735745) (xy 124.315325 108.28204) - (xy 124.19995 108.0035) (xy 124.028783 107.920433) (xy 123.854567 108.094649) (xy 123.854567 107.746217) (xy 123.7715 107.57505) - (xy 123.340745 107.429397) (xy 122.88704 107.459675) (xy 122.6085 107.57505) (xy 122.525433 107.746217) (xy 123.19 108.410783) - (xy 123.854567 107.746217) (xy 123.854567 108.094649) (xy 123.364217 108.585) (xy 124.028783 109.249567) (xy 124.19995 109.1665) - (xy 124.345603 108.735745) (xy 124.345603 109.701253) (xy 124.103571 109.601) (xy 123.800429 109.601) (xy 123.756894 109.601) - (xy 123.7715 109.59495) (xy 123.854567 109.423783) (xy 123.19 108.759217) (xy 123.015783 108.933433) (xy 123.015783 108.585) - (xy 122.351217 107.920433) (xy 122.18005 108.0035) (xy 122.034397 108.434255) (xy 122.064675 108.88796) (xy 122.18005 109.1665) - (xy 122.351217 109.249567) (xy 123.015783 108.585) (xy 123.015783 108.933433) (xy 122.525433 109.423783) (xy 122.6085 109.59495) - (xy 122.626392 109.601) (xy 122.276429 109.601) (xy 121.996362 109.717008) (xy 121.782008 109.931362) (xy 121.666 110.211429) - (xy 121.666 110.514571) (xy 121.666 112.038571) (xy 121.782008 112.318638) (xy 121.9962 112.53283) (xy 121.9962 114.3) - (xy 122.087073 114.756848) (xy 122.345856 115.144144) (xy 122.980856 115.779144) (xy 123.368153 116.037927) (xy 123.529353 116.069991) - (xy 123.631613 116.17243) (xy 124.168214 116.395246) (xy 124.749237 116.395753) (xy 125.286226 116.173874) (xy 125.69743 115.763387) - (xy 125.920246 115.226786) (xy 125.920753 114.645763) (xy 125.698874 114.108774) (xy 125.288387 113.69757) (xy 124.751786 113.474754) - (xy 124.3838 113.474432) (xy 124.3838 112.53283) (xy 124.59783 112.3188) (xy 128.905 112.3188) (xy 129.361847 112.227927) - (xy 129.361848 112.227927) (xy 129.749144 111.969144) (xy 131.482288 110.236) (xy 132.485571 110.236) (xy 132.765638 110.119992) - (xy 132.979992 109.905638) (xy 133.096 109.625571) (xy 133.096 124.5362) (xy 130.175 124.5362) (xy 129.718152 124.627073) + (xy 133.110928 124.5362) (xy 133.110928 109.474) (xy 133.110928 107.696) (xy 133.054555 107.405452) (xy 132.886808 107.150087) + (xy 132.633568 106.979148) (xy 132.334 106.919072) (xy 130.556 106.919072) (xy 130.265452 106.975445) (xy 130.010087 107.143192) + (xy 129.839148 107.396432) (xy 129.779072 107.696) (xy 129.779072 108.56264) (xy 128.410512 109.9312) (xy 124.579767 109.9312) + (xy 124.504808 109.817087) (xy 124.345603 109.709622) (xy 124.345603 108.735745) (xy 124.315325 108.28204) (xy 124.19995 108.0035) + (xy 124.028783 107.920433) (xy 123.854567 108.094649) (xy 123.854567 107.746217) (xy 123.7715 107.57505) (xy 123.340745 107.429397) + (xy 122.88704 107.459675) (xy 122.6085 107.57505) (xy 122.525433 107.746217) (xy 123.19 108.410783) (xy 123.854567 107.746217) + (xy 123.854567 108.094649) (xy 123.364217 108.585) (xy 124.028783 109.249567) (xy 124.19995 109.1665) (xy 124.345603 108.735745) + (xy 124.345603 109.709622) (xy 124.251568 109.646148) (xy 123.952 109.586072) (xy 123.775808 109.586072) (xy 123.854567 109.423783) + (xy 123.19 108.759217) (xy 123.015783 108.933433) (xy 123.015783 108.585) (xy 122.351217 107.920433) (xy 122.18005 108.0035) + (xy 122.034397 108.434255) (xy 122.064675 108.88796) (xy 122.18005 109.1665) (xy 122.351217 109.249567) (xy 123.015783 108.585) + (xy 123.015783 108.933433) (xy 122.525433 109.423783) (xy 122.604191 109.586072) (xy 122.428 109.586072) (xy 122.137452 109.642445) + (xy 121.882087 109.810192) (xy 121.711148 110.063432) (xy 121.651072 110.363) (xy 121.651072 111.887) (xy 121.707445 112.177548) + (xy 121.875192 112.432913) (xy 121.9962 112.514594) (xy 121.9962 114.3) (xy 122.087073 114.756848) (xy 122.345856 115.144144) + (xy 122.980856 115.779144) (xy 123.368153 116.037927) (xy 123.529353 116.069991) (xy 123.631613 116.17243) (xy 124.168214 116.395246) + (xy 124.749237 116.395753) (xy 125.286226 116.173874) (xy 125.69743 115.763387) (xy 125.920246 115.226786) (xy 125.920753 114.645763) + (xy 125.698874 114.108774) (xy 125.288387 113.69757) (xy 124.751786 113.474754) (xy 124.3838 113.474432) (xy 124.3838 112.514767) + (xy 124.497913 112.439808) (xy 124.579594 112.3188) (xy 128.905 112.3188) (xy 129.361847 112.227927) (xy 129.361848 112.227927) + (xy 129.749144 111.969144) (xy 131.46736 110.250928) (xy 132.334 110.250928) (xy 132.624548 110.194555) (xy 132.879913 110.026808) + (xy 133.050852 109.773568) (xy 133.110928 109.474) (xy 133.110928 124.5362) (xy 130.175 124.5362) (xy 129.718152 124.627073) (xy 129.330856 124.885856) (xy 128.060856 126.155856) (xy 127.802073 126.543152) (xy 127.7112 127) (xy 127.7112 130.175) (xy 127.802073 130.631848) (xy 128.060856 131.019144) (xy 128.804212 131.7625) (xy 124.918382 131.7625) (xy 125.557257 131.12474) (xy 125.983514 130.098199) (xy 125.984484 128.986677) (xy 125.560019 127.959394) (xy 125.552271 127.951632) (xy 125.552271 122.69054) diff --git a/demos/ecc83/ecc83-pp_v2.net b/demos/ecc83/ecc83-pp_v2.net index 55dab066b3..fcb3549515 100644 --- a/demos/ecc83/ecc83-pp_v2.net +++ b/demos/ecc83/ecc83-pp_v2.net @@ -1,12 +1,12 @@ (export (version D) (design (source F:/kicad-launchpad/testing/demos/ecc83/ecc83-pp_v2.sch) - (date "01/01/2015 18:25:50") + (date "01/01/2015 20:57:24") (tool "Eeschema (2014-12-31 BZR 5344)-product")) (components (comp (ref U1) (value ECC83) - (footprint Valves:VALVE-ECC-83-1) + (footprint Valves:VALVE-ECC-83-2) (libsource (lib valves) (part ECC83)) (sheetpath (names /) (tstamps /)) (tstamp 48B4F266)) @@ -95,18 +95,6 @@ (sheetpath (names /) (tstamps /)) (tstamp 54A58391))) (libparts - (libpart (lib device) (part C) - (description "Condensateur non polarise") - (footprints - (fp SM*) - (fp C?) - (fp C1-1)) - (fields - (field (name Reference) C) - (field (name Value) C)) - (pins - (pin (num 1) (name ~) (type passive)) - (pin (num 2) (name ~) (type passive)))) (libpart (lib device) (part R) (description Resistance) (footprints @@ -138,6 +126,18 @@ (pin (num 7) (name G) (type input)) (pin (num 8) (name K) (type BiDi)) (pin (num 9) (name F2) (type power_in)))) + (libpart (lib device) (part C) + (description "Condensateur non polarise") + (footprints + (fp SM*) + (fp C?) + (fp C1-1)) + (fields + (field (name Reference) C) + (field (name Value) C)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)))) (libpart (lib conn) (part CONN_1) (description "1 pin") (fields diff --git a/demos/ecc83/ecc83-pp_v2.sch b/demos/ecc83/ecc83-pp_v2.sch index 25a7c462e0..624d826a75 100644 --- a/demos/ecc83/ecc83-pp_v2.sch +++ b/demos/ecc83/ecc83-pp_v2.sch @@ -5,25 +5,6 @@ LIBS:valves LIBS:conn LIBS:linear LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:contrib LIBS:ecc83-pp_v2-cache EELAYER 25 0 EELAYER END @@ -105,7 +86,7 @@ U 3 1 48B4F266 P 2000 6100 F 0 "U1" H 2130 6410 50 0000 C CNN F 1 "ECC83" H 2350 5800 50 0000 C CNN -F 2 "Valves:VALVE-ECC-83-1" H 2450 5650 50 0000 C CNN +F 2 "Valves:VALVE-ECC-83-2" V 1750 6100 30 0000 C CNN F 3 "" H 2000 6100 60 0001 C CNN 3 2000 6100 1 0 0 -1 @@ -116,7 +97,7 @@ U 2 1 48B4F263 P 4950 4450 F 0 "U1" H 5080 4760 50 0000 C CNN F 1 "ECC83" H 5150 4100 50 0000 C CNN -F 2 "Valves:VALVE-ECC-83-1" H 5150 4000 50 0000 C CNN +F 2 "Valves:VALVE-ECC-83-2" H 5150 4000 30 0000 C CNN F 3 "" H 4950 4450 60 0001 C CNN 2 4950 4450 1 0 0 -1 @@ -127,7 +108,7 @@ U 1 1 48B4F256 P 5750 4450 F 0 "U1" H 5880 4760 50 0000 C CNN F 1 "ECC83" H 5500 4150 50 0000 C CNN -F 2 "Valves:VALVE-ECC-83-1" H 5750 3950 50 0000 C CNN +F 2 "Valves:VALVE-ECC-83-2" H 5750 3950 30 0000 C CNN F 3 "" H 5750 4450 60 0001 C CNN 1 5750 4450 -1 0 0 -1 @@ -193,7 +174,7 @@ U 1 1 456A8ACC P 2000 7100 F 0 "P4" V 1950 7100 40 0000 C CNN F 1 "CONN_2" V 2050 7100 40 0000 C CNN -F 2 "pin_array:pin_array_1x02" V 2150 7100 60 0000 C CNN +F 2 "pin_array:pin_array_1x02" V 2150 7100 30 0000 C CNN F 3 "" H 2000 7100 60 0001 C CNN 1 2000 7100 0 1 1 0 @@ -204,7 +185,7 @@ U 1 1 4549F4BE P 6700 4050 F 0 "C1" H 6750 4150 50 0000 L CNN F 1 "10uF" H 6450 4150 50 0000 L CNN -F 2 "discret:C2V10" H 6700 4050 60 0000 C CNN +F 2 "discret:C2V10" H 6700 3950 30 0000 C CNN F 3 "" H 6700 4050 60 0001 C CNN 1 6700 4050 1 0 0 -1 @@ -237,7 +218,7 @@ U 1 1 4549F4A5 P 7300 3950 F 0 "P3" V 7250 3950 40 0000 C CNN F 1 "POWER" V 7350 3950 40 0000 C CNN -F 2 "pin_array:pin_array_1x02" H 7300 4150 60 0000 C CNN +F 2 "pin_array:pin_array_1x02" V 7450 3950 30 0000 C CNN F 3 "" H 7300 3950 60 0001 C CNN 1 7300 3950 1 0 0 -1 @@ -248,7 +229,7 @@ U 1 1 4549F46C P 7300 4900 F 0 "P2" V 7250 4900 40 0000 C CNN F 1 "OUT" V 7350 4900 40 0000 C CNN -F 2 "pin_array:pin_array_1x02" H 7300 5100 60 0000 C CNN +F 2 "pin_array:pin_array_1x02" V 7450 4900 30 0000 C CNN F 3 "" H 7300 4900 60 0001 C CNN 1 7300 4900 1 0 0 -1 @@ -259,7 +240,7 @@ U 1 1 4549F464 P 3800 4900 F 0 "P1" V 3750 4900 40 0000 C CNN F 1 "IN" V 3850 4900 40 0000 C CNN -F 2 "pin_array:pin_array_1x02" H 3750 4700 60 0000 C CNN +F 2 "pin_array:pin_array_1x02" V 3950 4900 30 0000 C CNN F 3 "" H 3800 4900 60 0001 C CNN 1 3800 4900 -1 0 0 1 @@ -270,7 +251,7 @@ U 1 1 4549F3BE P 6500 4800 F 0 "C2" H 6550 4900 50 0000 L CNN F 1 "680nF" H 6550 4700 50 0000 L CNN -F 2 "discret:CP8" H 6400 4900 60 0000 C CNN +F 2 "discret:CP8" V 6350 4800 30 0000 C CNN F 3 "" H 6500 4800 60 0001 C CNN 1 6500 4800 0 1 1 0 @@ -314,7 +295,7 @@ U 1 1 4549F38A P 6300 4250 F 0 "R1" V 6380 4250 50 0000 C CNN F 1 "1.5K" V 6300 4250 50 0000 C CNN -F 2 "discret:R3" H 6400 4150 60 0000 C CNN +F 2 "discret:R3" V 6450 4250 30 0000 C CNN F 3 "" H 6300 4250 60 0001 C CNN 1 6300 4250 1 0 0 -1 diff --git a/include/eda_text.h b/include/eda_text.h index 6eb00e49f7..97a8f77738 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -80,7 +80,7 @@ enum EDA_DRAW_MODE_T { class EDA_TEXT { protected: - wxString m_Text; ///< The 'base' text, maybe later processed for display + wxString m_Text; ///< The 'base' text, maybe later processed for display int m_Thickness; ///< pen size used to draw this text double m_Orient; ///< Orient in 0.1 degrees wxPoint m_Pos; ///< XY position of anchor text. @@ -200,12 +200,12 @@ public: * @param aColor = text color * @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode. * @param aDisplay_mode = LINE, FILLED or SKETCH - * @param aAnchor_color = anchor color ( UNSPECIFIED = do not draw anchor ). + * @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ). */ void Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset, EDA_COLOR_T aColor, GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aDisplay_mode = LINE, - EDA_COLOR_T aAnchor_color = UNSPECIFIED_COLOR ); + EDA_COLOR_T aAnchor_color = EDA_COLOR_T(UNSPECIFIED_COLOR) ); /** * Convert the text shape to a list of segment diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index a34e610784..5b5ea39248 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -52,6 +52,12 @@ class BOARD; class MSG_PANEL_ITEM; +enum INCLUDE_NPTH_T +{ + DO_NOT_INCLUDE_NPTH = false, + INCLUDE_NPTH = true +}; + /** * Enum MODULE_ATTR_T * is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() @@ -425,12 +431,6 @@ public: */ D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET::AllLayersMask() ); - enum INCLUDE_NPTH_T - { - DO_NOT_INCLUDE_NPTH = false, - INCLUDE_NPTH = true - }; - /** * GetPadCount * returns the number of pads. @@ -439,7 +439,7 @@ public: * non-plated through holes when false. * @return the number of pads according to \a aIncludeNPTH. */ - unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH ) const; + unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T( INCLUDE_NPTH ) ) const; double GetArea() const { return m_Surface; } diff --git a/pcbnew/scripting/board.i b/pcbnew/scripting/board.i index 65d0cb1990..88d6e13fdf 100644 --- a/pcbnew/scripting/board.i +++ b/pcbnew/scripting/board.i @@ -31,7 +31,7 @@ %extend BOARD { %pythoncode - { + %{ def GetModules(self): return self.m_Modules def GetDrawings(self): return self.m_Drawings def GetTracks(self): return self.m_Track @@ -48,7 +48,7 @@ def Add(self,item): item.thisown=0 self.AddNative(item) - } + %} } diff --git a/pcbnew/scripting/module.i b/pcbnew/scripting/module.i index 95a42ccfca..21902bfe0e 100644 --- a/pcbnew/scripting/module.i +++ b/pcbnew/scripting/module.i @@ -31,7 +31,7 @@ %extend MODULE { %pythoncode - { + %{ #def SaveToLibrary(self,filename): # return SaveModuleToLibrary(filename,self) @@ -51,7 +51,7 @@ elif type(itemC) in [ TEXTE_PCB, DIMENSION, TEXTE_MODULE, DRAWSEGMENT,EDGE_MODULE]: item.thisown = 0 self.GraphicalItems().PushBack(item) - } + %} } diff --git a/scripting/build_tools/fix_swig_imports.py b/scripting/build_tools/fix_swig_imports.py index e333deb89a..47eb292dc9 100644 --- a/scripting/build_tools/fix_swig_imports.py +++ b/scripting/build_tools/fix_swig_imports.py @@ -37,9 +37,12 @@ if (len(lines)<4000): txt = "" for l in lines: - if l.startswith("if version_info >= (2,6,0):"): + if l.startswith("if version_info >= (2,6,0):"): # ok with swig version <= 3.0.2 l = l.replace("version_info >= (2,6,0)","False") doneOk = True + elif l.startswith("if version_info >= (2, 6, 0):"): # needed with swig version 3.0.3 + l = l.replace("version_info >= (2, 6, 0)","False") + doneOk = True elif l.startswith("if False:"): # it was already patched? doneOk = True txt = txt + l diff --git a/scripting/dlist.i b/scripting/dlist.i index 43241ae3fc..9ea7712a3b 100644 --- a/scripting/dlist.i +++ b/scripting/dlist.i @@ -27,7 +27,7 @@ %extend DLIST { %pythoncode - { + %{ class DLISTIter: def __init__(self,aList): self.last = aList # last item is the start of list @@ -63,5 +63,5 @@ def __iter__(self): return self.DLISTIter(self) - } + %} } diff --git a/scripting/kicad.i b/scripting/kicad.i index b4014b2419..150ca3d805 100644 --- a/scripting/kicad.i +++ b/scripting/kicad.i @@ -136,7 +136,7 @@ const char* Cast_to_CChar() { return (self->c_str()); } %pythoncode - { + %{ # Get the char buffer of the UTF8 string def GetChars(self): @@ -147,6 +147,6 @@ def __str__(self): return self.GetChars() - } + %} } From 100913a696c23dd9b6fca1519e2df4ab1ca92456 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 4 Jan 2015 11:50:45 +0100 Subject: [PATCH 2/9] Cvpcb: better fix of Bug #1402306 --- cvpcb/cvframe.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 52ea015f58..3774109041 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -442,17 +442,6 @@ bool CVPCB_MAINFRAME::OpenProjectFiles( const std::vector& aFileSet, i return false; m_NetlistFileName = aFileSet[0]; - ReadNetListAndLinkFiles(); - - UpdateTitle(); - - // Resize the components list box. This is needed in case the - // contents have shrunk compared to the previous netlist. - m_compListBox->UpdateWidth(); - - // OSX need it since some objects are "rebuild" just make aware AUI - // Fixes #1258081 - m_auimgr.Update(); if( Kiface().IsSingle() ) { @@ -470,6 +459,18 @@ bool CVPCB_MAINFRAME::OpenProjectFiles( const std::vector& aFileSet, i Prj().SetProjectFullName( pro.GetFullPath() ); } + ReadNetListAndLinkFiles(); + + UpdateTitle(); + + // Resize the components list box. This is needed in case the + // contents have shrunk compared to the previous netlist. + m_compListBox->UpdateWidth(); + + // OSX need it since some objects are "rebuild" just make aware AUI + // Fixes #1258081 + m_auimgr.Update(); + return true; } From 036a7cd8ed1146a8ede9e8acf83c37e2b0f47483 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Jan 2015 12:50:12 +0100 Subject: [PATCH 3/9] Fix a typo error in wizard lib. --- pcbnew/dialogs/wizard_add_fplib.cpp | 2 +- pcbnew/dialogs/wizard_add_fplib_base.cpp | 2 +- pcbnew/dialogs/wizard_add_fplib_base.fbp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/wizard_add_fplib.cpp b/pcbnew/dialogs/wizard_add_fplib.cpp index 2d11bf0cb5..edbaaa5d57 100644 --- a/pcbnew/dialogs/wizard_add_fplib.cpp +++ b/pcbnew/dialogs/wizard_add_fplib.cpp @@ -714,7 +714,7 @@ void WIZARD_FPLIB_TABLE::selectLibsGithub() // select a set of library on Git wxArrayString urls; // Run the web viewer and open the default URL: the default path - // or our github library depos + // or our github library repos wxString defaultURL = m_currLibDescr->m_DefaultPath; if( defaultURL.IsEmpty() ) diff --git a/pcbnew/dialogs/wizard_add_fplib_base.cpp b/pcbnew/dialogs/wizard_add_fplib_base.cpp index 8e21bd5848..9789aeffdd 100644 --- a/pcbnew/dialogs/wizard_add_fplib_base.cpp +++ b/pcbnew/dialogs/wizard_add_fplib_base.cpp @@ -22,7 +22,7 @@ WIZARD_FPLIB_TABLE_BASE::WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID i wxBoxSizer* bSizerPage1; bSizerPage1 = new wxBoxSizer( wxVERTICAL ); - wxString m_rbFpLibFormatChoices[] = { _("KiCad (*.Pretty folder containing .kicad_mod files)"), _("GitHub (.Pretty lib stored on GitHub depos)"), _("Legacy ( old *.mod lib file)"), _("Eagle V6 xml library file"), _("Geda footprint folder (folder containing *.fp files)") }; + wxString m_rbFpLibFormatChoices[] = { _("KiCad (*.Pretty folder containing .kicad_mod files)"), _("GitHub (.Pretty lib stored on GitHub repos)"), _("Legacy ( old *.mod lib file)"), _("Eagle V6 xml library file"), _("Geda footprint folder (folder containing *.fp files)") }; int m_rbFpLibFormatNChoices = sizeof( m_rbFpLibFormatChoices ) / sizeof( wxString ); m_rbFpLibFormat = new wxRadioBox( m_wizPage1, wxID_ANY, _("Library Format:"), wxDefaultPosition, wxDefaultSize, m_rbFpLibFormatNChoices, m_rbFpLibFormatChoices, 1, wxRA_SPECIFY_COLS ); m_rbFpLibFormat->SetSelection( 0 ); diff --git a/pcbnew/dialogs/wizard_add_fplib_base.fbp b/pcbnew/dialogs/wizard_add_fplib_base.fbp index 6bf0a8209f..afa601bc52 100644 --- a/pcbnew/dialogs/wizard_add_fplib_base.fbp +++ b/pcbnew/dialogs/wizard_add_fplib_base.fbp @@ -153,7 +153,7 @@ 1 0 - "KiCad (*.Pretty folder containing .kicad_mod files)" "GitHub (.Pretty lib stored on GitHub depos)" "Legacy ( old *.mod lib file)" "Eagle V6 xml library file" "Geda footprint folder (folder containing *.fp files)" + "KiCad (*.Pretty folder containing .kicad_mod files)" "GitHub (.Pretty lib stored on GitHub repos)" "Legacy ( old *.mod lib file)" "Eagle V6 xml library file" "Geda footprint folder (folder containing *.fp files)" 1 1 From ad74a9a191a8e6e14060631a212f5095932af188 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 Jan 2015 14:20:04 +0100 Subject: [PATCH 4/9] Pcbnew: better display of tracks/vias/grid sizes in toolbar --- common/base_screen.cpp | 45 +++++++++++++++++ common/zoom.cpp | 41 +++------------- include/class_base_screen.h | 12 +++++ pcbnew/basepcbframe.cpp | 48 ++++-------------- pcbnew/pcbframe.cpp | 9 ++-- pcbnew/tool_onrightclick.cpp | 3 +- pcbnew/tool_pcb.cpp | 95 +++++++++++++++++++++++++----------- 7 files changed, 145 insertions(+), 108 deletions(-) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index 01a798df4a..c4da616ec3 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -165,6 +165,51 @@ bool BASE_SCREEN::SetPreviousZoom() return false; } +/* Build the list of human readable grid list. + * The list shows the grid size both in mils or mm. + * aMmFirst = true to have mm first and mils after + * false to have mils first and mm after + */ +int BASE_SCREEN::BuildGridsChoiceList( wxArrayString& aGridsList, bool aMmFirst) const +{ + wxString msg; + wxRealPoint curr_grid_size = GetGridSize(); + int idx = -1; + int idx_usergrid = -1; + + for( size_t i = 0; i < GetGridCount(); i++ ) + { + const GRID_TYPE& grid = m_grids[i]; + double gridValueMils = To_User_Unit( INCHES, grid.m_Size.x ) * 1000; + double gridValue_mm = To_User_Unit( MILLIMETRES, grid.m_Size.x ); + + if( grid.m_Id == ID_POPUP_GRID_USER ) + { + msg = _( "User Grid" ); + idx_usergrid = i; + } + else + { + if( aMmFirst ) + msg.Printf( _( "Grid: %.4f mm (%.2f mils)" ), + gridValue_mm, gridValueMils ); + else + msg.Printf( _( "Grid: %.2f mils (%.4f mm)" ), + gridValueMils, gridValue_mm ); + } + + aGridsList.Add( msg ); + + if( curr_grid_size == grid.m_Size ) + idx = i; + } + + if( idx < 0 ) + idx = idx_usergrid; + + return idx; +} + void BASE_SCREEN::SetGridList( GRIDS& gridlist ) { diff --git a/common/zoom.cpp b/common/zoom.cpp index 67526b7450..6a454e2e0c 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -266,43 +266,16 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu ) AddMenuItem( MasterMenu, gridMenu, ID_POPUP_GRID_SELECT, _( "Grid Select" ), KiBitmap( grid_select_xpm ) ); - GRID_TYPE tmp; - wxRealPoint grid = screen->GetGridSize(); + wxArrayString gridsList; + int icurr = screen->BuildGridsChoiceList( gridsList, g_UserUnit != INCHES ); - for( size_t i = 0; i < screen->GetGridCount(); i++ ) + for( unsigned i = 0; i < gridsList.GetCount(); i++ ) { - tmp = screen->GetGrid( i ); - double gridValueInch = To_User_Unit( INCHES, tmp.m_Size.x ); - double gridValue_mm = To_User_Unit( MILLIMETRES, tmp.m_Size.x ); + GRID_TYPE& grid = screen->GetGrid( i ); + gridMenu->Append( grid.m_Id, gridsList[i], wxEmptyString, true ); - if( tmp.m_Id == ID_POPUP_GRID_USER ) - { - msg = _( "User Grid" ); - } - else - { - switch( g_UserUnit ) - { - case INCHES: - msg.Printf( wxT( "%.1f mils, (%.4f mm)" ), - gridValueInch * 1000, gridValue_mm ); - break; - - case MILLIMETRES: - msg.Printf( wxT( "%.4f mm, (%.1f mils)" ), - gridValue_mm, gridValueInch * 1000 ); - break; - - case UNSCALED_UNITS: - msg = wxT( "???" ); - break; - } - } - - gridMenu->Append( tmp.m_Id, msg, wxEmptyString, true ); - - if( grid == tmp.m_Size ) - gridMenu->Check( tmp.m_Id, true ); + if( (int)i == icurr ) + gridMenu->Check( grid.m_Id, true ); } } diff --git a/include/class_base_screen.h b/include/class_base_screen.h index 502ab9a9e6..0ea8fa9e7b 100644 --- a/include/class_base_screen.h +++ b/include/class_base_screen.h @@ -452,6 +452,18 @@ public: return m_grids; } + /** + * Function BuildGridsChoiceList(). + * Build the human readable list of grid list, for menus or combo boxes + * the list shows the grid size both in mils or mm. + * @param aGridsList = a wxArrayString to populate + * @param aMmFirst = true to have mm first and mils after + * false to have mils first and mm after + * @return the index of the curr grid in list, if found or -1 + */ + int BuildGridsChoiceList( wxArrayString& aGridsList, bool aMmFirst) const; + + /** * Function GetClass * returns the class name. diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 14bf5ab89b..29b2a9b0d0 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -810,42 +810,16 @@ void PCB_BASE_FRAME::updateGridSelectBox() // Update grid values with the current units setting. m_gridSelectBox->Clear(); - - wxString msg; - wxString format = _( "Grid:"); - - switch( g_UserUnit ) - { - case INCHES: // the grid size is displayed in mils - case MILLIMETRES: - format += wxT( " %.6f" ); - break; - - case UNSCALED_UNITS: - format += wxT( " %f" ); - break; - } + wxArrayString gridsList; + int icurr = GetScreen()->BuildGridsChoiceList( gridsList, g_UserUnit != INCHES ); for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ ) { GRID_TYPE& grid = GetScreen()->GetGrid( i ); - double value = To_User_Unit( g_UserUnit, grid.m_Size.x ); - if( g_UserUnit == INCHES ) - value *= 1000; - - if( grid.m_Id != ID_POPUP_GRID_USER ) - { - msg.Printf( format.GetData(), value ); - StripTrailingZeros( msg ); - } - else - msg = _( "User Grid" ); - - m_gridSelectBox->Append( msg, (void*) &grid.m_Id ); - - if( ( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 ) == GetScreen()->GetGrid( i ).m_Id ) - m_gridSelectBox->SetSelection( i ); + m_gridSelectBox->Append( gridsList[i], (void*) &grid.m_Id ); } + + m_gridSelectBox->SetSelection( icurr ); } void PCB_BASE_FRAME::updateZoomSelectBox() @@ -856,19 +830,17 @@ void PCB_BASE_FRAME::updateZoomSelectBox() wxString msg; m_zoomSelectBox->Clear(); - m_zoomSelectBox->Append( _( "Auto" ) ); + m_zoomSelectBox->Append( _( "Zoom Auto" ) ); m_zoomSelectBox->SetSelection( 0 ); for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); ++i ) { msg = _( "Zoom " ); - wxString value = wxString::Format( wxT( "%g" ), - - // @todo could do scaling here and show a "percentage" - GetScreen()->m_ZoomList[i] - ); - + // @todo could do scaling here and show the "percentage" depending on + // the screen pixel size + double level = 254000.0 / (double)GetScreen()->m_ZoomList[i]; + wxString value = wxString::Format( wxT( "%d%%" ), int(level * 100) ); msg += value; m_zoomSelectBox->Append( msg ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 19ca312d7b..eb3d2daced 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -731,8 +731,7 @@ void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event ) if( returncode == wxID_OK ) // New rules, or others changes. { ReCreateLayerBox(); - updateTraceWidthSelectBox(); - updateViaSizeSelectBox(); + ReCreateAuxiliaryToolbar(); OnModify(); } } @@ -876,8 +875,7 @@ void PCB_EDIT_FRAME::unitsChangeRefresh() { PCB_BASE_FRAME::unitsChangeRefresh(); // Update the grid size select box. - updateTraceWidthSelectBox(); - updateViaSizeSelectBox(); + ReCreateAuxiliaryToolbar(); } @@ -1064,8 +1062,7 @@ bool PCB_EDIT_FRAME::SetCurrentNetClass( const wxString& aNetClassName ) if( change ) { - updateTraceWidthSelectBox(); - updateViaSizeSelectBox(); + ReCreateAuxiliaryToolbar(); } return change; diff --git a/pcbnew/tool_onrightclick.cpp b/pcbnew/tool_onrightclick.cpp index 80ffdb7938..c397575417 100644 --- a/pcbnew/tool_onrightclick.cpp +++ b/pcbnew/tool_onrightclick.cpp @@ -51,8 +51,7 @@ void PCB_EDIT_FRAME::ToolOnRightClick( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_OK ) { - updateTraceWidthSelectBox(); - updateViaSizeSelectBox(); + ReCreateAuxiliaryToolbar(); } break; diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index e7522c0257..4fbc8ca63a 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -46,13 +46,6 @@ #include - -#ifdef __UNIX__ -#define LISTBOX_WIDTH 150 -#else -#define LISTBOX_WIDTH 130 -#endif - #define SEL_LAYER_HELP _( \ "Show active layer selections\nand select layer pair for route and place via" ) @@ -551,7 +544,20 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() wxWindowUpdateLocker dummy( this ); if( m_auxiliaryToolBar ) + { + updateTraceWidthSelectBox(); + updateViaSizeSelectBox(); + + // combobox sizes can have changed: apply new best sizes + wxAuiToolBarItem* item = m_auxiliaryToolBar->FindTool( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH ); + item->SetMinSize( m_SelTrackWidthBox->GetBestSize() ); + item = m_auxiliaryToolBar->FindTool( ID_AUX_TOOLBAR_PCB_VIA_SIZE ); + item->SetMinSize( m_SelViaSizeBox->GetBestSize() ); + + m_auxiliaryToolBar->Realize(); + m_auimgr.Update(); return; + } m_auxiliaryToolBar = new wxAuiToolBar( this, ID_AUX_TOOLBAR, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT ); @@ -562,19 +568,19 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() m_SelTrackWidthBox = new wxComboBox( m_auxiliaryToolBar, ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, wxEmptyString, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ), + wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + updateTraceWidthSelectBox(); m_auxiliaryToolBar->AddControl( m_SelTrackWidthBox ); - m_auxiliaryToolBar->AddSeparator(); +// m_auxiliaryToolBar->AddSeparator(); // Creates box to display and choose vias diameters: m_SelViaSizeBox = new wxComboBox( m_auxiliaryToolBar, ID_AUX_TOOLBAR_PCB_VIA_SIZE, wxEmptyString, - wxPoint( -1, -1 ), - wxSize( (LISTBOX_WIDTH*12)/10, -1 ), + wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + updateViaSizeSelectBox(); m_auxiliaryToolBar->AddControl( m_SelViaSizeBox ); m_auxiliaryToolBar->AddSeparator(); @@ -591,9 +597,9 @@ an existing track use its width\notherwise, use current width setting" ), m_gridSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ), + wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + updateGridSelectBox(); m_auxiliaryToolBar->AddControl( m_gridSelectBox ); // Add the box to display and select the current Zoom @@ -601,19 +607,14 @@ an existing track use its width\notherwise, use current width setting" ), m_zoomSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_ZOOM_SELECT, wxEmptyString, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ), + wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); - m_auxiliaryToolBar->AddControl( m_zoomSelectBox ); - updateZoomSelectBox(); - updateGridSelectBox(); - updateTraceWidthSelectBox(); - updateViaSizeSelectBox(); + m_auxiliaryToolBar->AddControl( m_zoomSelectBox ); // after adding the buttons to the toolbar, must call Realize() m_auxiliaryToolBar->Realize(); - m_auxiliaryToolBar->AddSeparator(); +// m_auxiliaryToolBar->AddSeparator(); } @@ -623,13 +624,25 @@ void PCB_EDIT_FRAME::updateTraceWidthSelectBox() return; wxString msg; + bool mmFirst = g_UserUnit != INCHES; m_SelTrackWidthBox->Clear(); for( unsigned ii = 0; ii < GetDesignSettings().m_TrackWidthList.size(); ii++ ) { - msg = _( "Track " ) + CoordinateToString( GetDesignSettings().m_TrackWidthList[ii], true ); + int size = GetDesignSettings().m_TrackWidthList[ii]; + double valueMils = To_User_Unit( INCHES, size ) * 1000; + double value_mm = To_User_Unit( MILLIMETRES, size ); + + if( mmFirst ) + msg.Printf( _( "Track: %.3f mm (%.2f mils)" ), + value_mm, valueMils ); + else + msg.Printf( _( "Track: %.2f mils (%.3f mm)" ), + valueMils, value_mm ); + + // Mark the netclass track width value (the first in list) if( ii == 0 ) msg << wxT( " *" ); @@ -651,16 +664,42 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox() wxString msg; m_SelViaSizeBox->Clear(); + bool mmFirst = g_UserUnit != INCHES; for( unsigned ii = 0; ii < GetDesignSettings().m_ViasDimensionsList.size(); ii++ ) { - msg = _( "Via " ); - msg << CoordinateToString( GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter, true ); + int diam = GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter; - if( GetDesignSettings().m_ViasDimensionsList[ii].m_Drill ) - msg << wxT("/ ") - << CoordinateToString( GetDesignSettings().m_ViasDimensionsList[ii].m_Drill, true ); + double valueMils = To_User_Unit( INCHES, diam ) * 1000; + double value_mm = To_User_Unit( MILLIMETRES, diam ); + if( mmFirst ) + msg.Printf( _( "Via: %.2f mm (%.1f mils)" ), + value_mm, valueMils ); + else + msg.Printf( _( "Via: %.1f mils (%.2f mm)" ), + valueMils, value_mm ); + + int hole = GetDesignSettings().m_ViasDimensionsList[ii].m_Drill; + + if( hole ) + { + msg << wxT("/ "); + wxString hole_str; + double valueMils = To_User_Unit( INCHES, hole ) * 1000; + double value_mm = To_User_Unit( MILLIMETRES, hole ); + + if( mmFirst ) + hole_str.Printf( _( "%.2f mm (%.1f mils)" ), + value_mm, valueMils ); + else + hole_str.Printf( _( "%.1f mils (%.2f mm)" ), + valueMils, value_mm ); + + msg += hole_str; + } + + // Mark the netclass via size value (the first in list) if( ii == 0 ) msg << wxT( " *" ); From a2129fcd39a8252470ae71bafa66afc0d7e67312 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 5 Jan 2015 16:01:35 -0500 Subject: [PATCH 5/9] Minor toolbar and menu coherence fixes. * Change Read to Load in Pcbnew and Eeschema preference menus. * Make electrical rules check status bar message the same for both the menu and toolbar entries. --- eeschema/menubar.cpp | 8 ++++---- eeschema/tool_sch.cpp | 2 +- pcbnew/menubar_pcbframe.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 0692444530..d3b6b22ed0 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -419,8 +419,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( preferencesMenu, ID_CONFIG_READ, - _( "&Read Preferences" ), - _( "Read application preferences" ), + _( "Load Prefe&rences" ), + _( "Load application preferences" ), KiBitmap( read_setup_xpm ) ); // Menu Tools: @@ -446,8 +446,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // ERC AddMenuItem( toolsMenu, ID_GET_ERC, - _( "Electric Rules &Checker" ), - _( "Perform electrical rule check" ), + _( "Electrical Rules &Checker" ), + _( "Perform electrical rules check" ), KiBitmap( erc_xpm ) ); AddMenuItem( toolsMenu, diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index 7ef7a71278..726dd6ebe4 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -146,7 +146,7 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() HELP_ANNOTATE ); m_mainToolBar->AddTool( ID_GET_ERC, wxEmptyString, KiBitmap( erc_xpm ), - _( "Perform electrical rule check" ) ); + _( "Perform electrical rules check" ) ); m_mainToolBar->AddTool( ID_GET_NETLIST, wxEmptyString, KiBitmap( netlist_xpm ), _( "Generate netlist" ) ); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 7611f94e06..479ecade6b 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -510,8 +510,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() KiBitmap( save_setup_xpm ) ); AddMenuItem( configmenu, ID_CONFIG_READ, - _( "&Read Preferences" ), - _( "Read application preferences" ), + _( "Load Prefe&rences" ), + _( "Load application preferences" ), KiBitmap( read_setup_xpm ) ); //----- Tools menu ---------------------------------------------------------- From f5059ec4c22ade57941ce7c9fc6db3060cbec042 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Mon, 5 Jan 2015 16:51:47 -0500 Subject: [PATCH 6/9] Fix duplicate text in IDF header export. (fixes lp:1407336) --- pcbnew/exporters/export_idf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 683ad38c44..27149a4a8d 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -548,7 +548,7 @@ bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, bool aUseThou ) idfBoard.SetLibraryVersion( 0 ); std::ostringstream ostr; - ostr << "Created by KiCad " << TO_UTF8( GetBuildVersion() ); + ostr << "KiCad " << TO_UTF8( GetBuildVersion() ); idfBoard.SetIDFSource( ostr.str() ); try From 44bdcaad02c8b488283ad7336d9f603414efc40a Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Tue, 6 Jan 2015 15:40:59 -0500 Subject: [PATCH 7/9] Add .gitignore file for github mirror developers. (fixes lp:1407338) --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..15eedb4598 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.bzrignore \ No newline at end of file From 547c145a1e72dcbb39fc57f5bc2e0b5441ffed1e Mon Sep 17 00:00:00 2001 From: Nick Ostergaard Date: Tue, 6 Jan 2015 16:46:04 -0500 Subject: [PATCH 8/9] Remove .gitignore file and add .gitconfig. (fixes previous fix for lp:1407338) --- .gitconfig | 2 ++ .gitignore | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitconfig delete mode 100644 .gitignore diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000000..079dcc9b60 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,2 @@ +[core] + excludesfile .bzrignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 15eedb4598..0000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.bzrignore \ No newline at end of file From c9a1b239a641498edf615895e79324ebbcd98561 Mon Sep 17 00:00:00 2001 From: Jose Ingnacio Date: Wed, 7 Jan 2015 10:04:57 -0500 Subject: [PATCH 9/9] Use XDG_CONFIG_DIR for lock file path on Linux. * With fixes from Adam Wolf. --- common/common.cpp | 50 ++++++++++++++++++++++++++++++++++++++++----- common/lockfile.cpp | 8 +++++--- common/pgm_base.cpp | 8 ++++---- include/common.h | 16 ++++++++++----- 4 files changed, 65 insertions(+), 17 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index b2b2de4c99..e53959b8c7 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2008-2015 Wayne Stambaugh + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -271,9 +271,9 @@ double RoundTo0( double x, double precision ) int remainder = ix % 10; // remainder is in precision mm - if ( remainder <= 2 ) + if( remainder <= 2 ) ix -= remainder; // truncate to the near number - else if (remainder >= 8 ) + else if( remainder >= 8 ) ix += 10 - remainder; // round to near number if ( x < 0 ) @@ -305,6 +305,46 @@ wxConfigBase* GetNewConfig( const wxString& aProgName ) return cfg; } +wxString GetKicadLockFilePath() +{ + wxFileName lockpath; + lockpath.AssignDir( wxGetHomeDir() ); // Default wx behavior + +#if defined( __WXMAC__ ) + // In OSX use the standard per user cache directory + lockpath.AppendDir( wxT( "Library" ) ); + lockpath.AppendDir( wxT( "Caches" ) ); + lockpath.AppendDir( wxT( "kicad" ) ); +#elif defined( __UNIX__ ) + wxString envstr; + // Try first the standard XDG_RUNTIME_DIR, falling back to XDG_CACHE_HOME + if( wxGetEnv( wxT( "XDG_RUNTIME_DIR" ), &envstr ) && !envstr.IsEmpty() ) + { + lockpath.AssignDir( envstr ); + } + else if( wxGetEnv( wxT( "XDG_CACHE_HOME" ), &envstr ) && !envstr.IsEmpty() ) + { + lockpath.AssignDir( envstr ); + } + else + { + // If all fails, just use ~/.cache + lockpath.AppendDir( wxT( ".cache" ) ); + } + + lockpath.AppendDir( wxT( "kicad" ) ); +#endif + +#if defined( __WXMAC__ ) || defined( __UNIX__ ) + if( !lockpath.DirExists() ) + { + // Lockfiles should be only readable by the user + lockpath.Mkdir( 0700, wxPATH_MKDIR_FULL ); + } +#endif + return lockpath.GetPath(); +} + wxString GetKicadConfigPath() { diff --git a/common/lockfile.cpp b/common/lockfile.cpp index ae0151211d..b3c371400f 100644 --- a/common/lockfile.cpp +++ b/common/lockfile.cpp @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 2014-2015 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -24,6 +24,7 @@ #include #include +#include wxSingleInstanceChecker* LockFile( const wxString& aFileName ) @@ -41,7 +42,8 @@ wxSingleInstanceChecker* LockFile( const wxString& aFileName ) // We can have filenames coming from Windows, so also convert Windows separator lockFileName.Replace( wxT( "\\" ), wxT( "_" ) ); - wxSingleInstanceChecker* p = new wxSingleInstanceChecker( lockFileName ); + wxSingleInstanceChecker* p = new wxSingleInstanceChecker( lockFileName, + GetKicadLockFilePath() ); if( p->IsAnotherRunning() ) { diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index b11d7ff04a..1f9710c78b 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2015 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2015 Wayne Stambaugh + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -353,7 +353,7 @@ bool PGM_BASE::initPgm() wxInitAllImageHandlers(); - m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) + wxGetUserId() ); + m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) + wxGetUserId(), GetKicadLockFilePath() ); if( m_pgm_checker->IsAnotherRunning() ) { diff --git a/include/common.h b/include/common.h index beb726f8bb..68cef30edb 100644 --- a/include/common.h +++ b/include/common.h @@ -1,10 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2008-2013 Wayne Stambaugh - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2007-2015 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2008-2015 Wayne Stambaugh + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -278,7 +278,7 @@ bool EnsureTextCtrlWidth( wxTextCtrl* aCtrl, const wxString* aString = NULL ); * wxExecute()) */ int ProcessExecute( const wxString& aCommandLine, int aFlags = wxEXEC_ASYNC, - wxProcess *callback = NULL ); + wxProcess *callback = NULL ); /*******************/ @@ -433,6 +433,12 @@ const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPa */ wxConfigBase* GetNewConfig( const wxString& aProgName ); +/** + * Function GetKicadLockFilePath + * @return A wxString containing the path for lockfiles in Kicad + */ +wxString GetKicadLockFilePath(); + /** * Function GetKicadConfigPath * @return A wxString containing the config path for Kicad