Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
d6fd8b2e
Commit
d6fd8b2e
authored
May 12, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Plain Diff
Upstream merge.
parents
a4cdf25f
f9ba502b
Changes
60
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
849 additions
and
1097 deletions
+849
-1097
basicframe.cpp
common/basicframe.cpp
+1
-1
dialog_shim.cpp
common/dialog_shim.cpp
+4
-0
fp_lib_table.cpp
common/fp_lib_table.cpp
+14
-1
kiway.cpp
common/kiway.cpp
+6
-2
kiway_player.cpp
common/kiway_player.cpp
+40
-13
project.cpp
common/project.cpp
+27
-12
CMakeLists.txt
cvpcb/CMakeLists.txt
+15
-24
cfg.cpp
cvpcb/cfg.cpp
+2
-17
class_DisplayFootprintsFrame.cpp
cvpcb/class_DisplayFootprintsFrame.cpp
+2
-1
class_library_listbox.cpp
cvpcb/class_library_listbox.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+8
-24
cvpcb_mainframe.h
cvpcb/cvpcb_mainframe.h
+0
-6
readwrite_dlgs.cpp
cvpcb/readwrite_dlgs.cpp
+6
-346
CMakeLists.txt
eeschema/CMakeLists.txt
+11
-13
Info.plist
eeschema/Info.plist
+31
-49
dialog_edit_component_in_schematic.cpp
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+3
-13
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
+34
-6
dialog_edit_libentry_fields_in_lib_base.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
+1
-1
dialog_edit_libentry_fields_in_lib_base.fbp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
+1
-1
dialog_edit_libentry_fields_in_lib_base.h
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
+4
-1
eeschema.cpp
eeschema/eeschema.cpp
+1
-2
getpart.cpp
eeschema/getpart.cpp
+1
-1
libeditframe.cpp
eeschema/libeditframe.cpp
+1
-1
libeditframe.h
eeschema/libeditframe.h
+1
-1
schframe.cpp
eeschema/schframe.cpp
+18
-0
tool_sch.cpp
eeschema/tool_sch.cpp
+8
-2
viewlib_frame.h
eeschema/viewlib_frame.h
+0
-1
CMakeLists.txt
gerbview/CMakeLists.txt
+12
-17
Info.plist
gerbview/Info.plist
+49
-67
common.h
include/common.h
+1
-1
fp_lib_table.h
include/fp_lib_table.h
+2
-0
id.h
include/id.h
+1
-0
kiway_player.h
include/kiway_player.h
+8
-1
project.h
include/project.h
+51
-18
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+2
-8
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+2
-1
CMakeLists.txt
kicad/CMakeLists.txt
+16
-0
Info.plist
kicad/Info.plist
+31
-49
CMakeLists.txt
pagelayout_editor/CMakeLists.txt
+23
-33
Info.plist
pagelayout_editor/Info.plist
+31
-49
CMakeLists.txt
pcb_calculator/CMakeLists.txt
+15
-14
CMakeLists.txt
pcbnew/CMakeLists.txt
+9
-10
Info.plist
pcbnew/Info.plist
+31
-48
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+20
-4
class_track.cpp
pcbnew/class_track.cpp
+1
-1
class_track.h
pcbnew/class_track.h
+1
-1
clean.cpp
pcbnew/clean.cpp
+238
-180
files.cpp
pcbnew/files.cpp
+3
-3
librairi.cpp
pcbnew/librairi.cpp
+14
-10
loadcmp.cpp
pcbnew/loadcmp.cpp
+2
-3
modedit.cpp
pcbnew/modedit.cpp
+1
-1
moduleframe.cpp
pcbnew/moduleframe.cpp
+12
-9
modview_frame.cpp
pcbnew/modview_frame.cpp
+8
-5
netlist.cpp
pcbnew/netlist.cpp
+1
-1
onleftclick.cpp
pcbnew/onleftclick.cpp
+2
-1
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+3
-14
drawing_tool.cpp
pcbnew/tools/drawing_tool.cpp
+2
-1
xchgmod.cpp
pcbnew/xchgmod.cpp
+2
-1
round_value_robin.py
scripts/bom-in-python/round_value_robin.py
+1
-1
kicad-install.sh
scripts/kicad-install.sh
+13
-5
No files found.
common/basicframe.cpp
View file @
d6fd8b2e
...
...
@@ -157,7 +157,7 @@ bool EDA_BASE_FRAME::Enable( bool enable )
#if defined(DEBUG)
const
char
*
type_id
=
typeid
(
*
this
).
name
();
printf
(
"wxFrame %s: %s
\n
"
,
type_id
,
enable
?
"enabled"
:
"disabled"
);
printf
(
"wxFrame %
-28
s: %s
\n
"
,
type_id
,
enable
?
"enabled"
:
"disabled"
);
#endif
return
wxFrame
::
Enable
(
enable
);
...
...
common/dialog_shim.cpp
View file @
d6fd8b2e
...
...
@@ -244,8 +244,12 @@ int DIALOG_SHIM::ShowQuasiModal()
if
(
win
)
win
->
ReleaseMouse
();
// Get the optimal parent
wxWindow
*
parent
=
GetParentForModalDialog
(
GetParent
(),
GetWindowStyle
()
);
// Show the optimal parent
DBG
(
if
(
parent
)
printf
(
"%s: optimal parent: %s
\n
"
,
__func__
,
typeid
(
*
parent
).
name
()
);)
ENABLE_DISABLE
toggle
(
parent
);
// quasi-modal: disable only my "optimal" parent
Show
(
true
);
...
...
common/fp_lib_table.cpp
View file @
d6fd8b2e
...
...
@@ -137,6 +137,12 @@ FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
}
FP_LIB_TABLE
::~
FP_LIB_TABLE
()
{
// *fallBack is not owned here.
}
wxArrayString
FP_LIB_TABLE
::
FootprintEnumerate
(
const
wxString
&
aNickname
)
{
const
ROW
*
row
=
FindRow
(
aNickname
);
...
...
@@ -514,9 +520,16 @@ std::vector<wxString> FP_LIB_TABLE::GetLogicalLibs()
}
while
(
(
cur
=
cur
->
fallBack
)
!=
0
);
ret
.
reserve
(
unique
.
size
()
);
// DBG(printf( "%s: count:%zd\n", __func__, unique.size() );)
// return a sorted, unique set of nicknames in a std::vector<wxString> to caller
for
(
std
::
set
<
wxString
>::
const_iterator
it
=
unique
.
begin
();
it
!=
unique
.
end
();
++
it
)
{
//DBG(printf( " %s\n", TO_UTF8( *it ) );)
ret
.
push_back
(
*
it
);
}
return
ret
;
}
...
...
@@ -738,7 +751,7 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName()
void
FP_LIB_TABLE
::
Load
(
const
wxString
&
aFileName
)
throw
(
IO_ERROR
)
{
//
Empty footprint library tables are valid
.
//
It's OK if footprint library tables are missing
.
if
(
wxFileName
::
IsFileReadable
(
aFileName
)
)
{
FILE_LINE_READER
reader
(
aFileName
);
...
...
common/kiway.cpp
View file @
d6fd8b2e
...
...
@@ -53,7 +53,7 @@ KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ):
// Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are
// propogated upwards to parent windows if not handled below. Therefor the
// propogated upwards to parent windows if not handled below. Therefor
e
the
// m_top window should receive all wxWindowDestroyEvents originating from
// KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops
// on that event stream looking for KIWAY_PLAYERs being closed.
...
...
@@ -67,10 +67,14 @@ void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event )
// if destroying one of our flock, then mark it as deceased.
if
(
(
wxWindow
*
)
m_player
[
i
]
==
w
)
{
DBG
(
printf
(
"%s: marking m_player[%d] as destroyed
\n
"
,
__func__
,
i
);)
DBG
(
printf
(
"%s: m_player[%d] destroyed: %s
\n
"
,
__func__
,
i
,
TO_UTF8
(
m_player
[
i
]
->
GetName
()
)
);)
m_player
[
i
]
=
0
;
}
}
// event.Skip(); skip to who, the wxApp? I'm the top window.
}
...
...
common/kiway_player.cpp
View file @
d6fd8b2e
...
...
@@ -45,7 +45,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType
EDA_BASE_FRAME
(
aParent
,
aFrameType
,
aTitle
,
aPos
,
aSize
,
aStyle
,
aWdoName
),
KIWAY_HOLDER
(
aKiway
),
m_modal
(
false
),
m_modal_loop
(
0
)
m_modal_loop
(
0
)
,
m_modal_resultant_parent
(
0
)
{
// DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
}
...
...
@@ -57,7 +57,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a
EDA_BASE_FRAME
(
aParent
,
(
FRAME_T
)
aId
,
aTitle
,
aPos
,
aSize
,
aStyle
,
aWdoName
),
KIWAY_HOLDER
(
0
),
m_modal
(
false
),
m_modal_loop
(
0
)
m_modal_loop
(
0
)
,
m_modal_resultant_parent
(
0
)
{
// DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
}
...
...
@@ -72,7 +72,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent )
}
bool
KIWAY_PLAYER
::
ShowModal
(
wxString
*
aResult
)
bool
KIWAY_PLAYER
::
ShowModal
(
wxString
*
aResult
,
wxWindow
*
aResultantFocusWindow
)
{
wxASSERT_MSG
(
IsModal
(),
wxT
(
"ShowModal() shouldn't be called on non-modal frame"
)
);
...
...
@@ -94,24 +94,31 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
~
NULLER
()
{
m_what
=
0
;
}
// indeed, set it to NULL on destruction
}
clear_this
(
(
void
*&
)
m_modal_loop
);
// exception safe way to disable all frames except the modal one,
// re-enables only those that were disabled on exit
wxWindowDisabler
toggle
(
this
);
m_modal_resultant_parent
=
aResultantFocusWindow
;
Show
(
true
);
SetFocus
();
WX_EVENT_LOOP
event_loop
;
{
// exception safe way to disable all frames except the modal one,
// re-enables only those that were disabled on exit
wxWindowDisabler
toggle
(
this
);
WX_EVENT_LOOP
event_loop
;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator
event_loop_stacker
(
&
event_loop
);
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator
event_loop_stacker
(
&
event_loop
);
#endif
m_modal_loop
=
&
event_loop
;
m_modal_loop
=
&
event_loop
;
event_loop
.
Run
();
event_loop
.
Run
();
}
// End of scop for some variables.
// End nesting before setting focus below.
if
(
aResult
)
*
aResult
=
m_modal_string
;
...
...
@@ -119,9 +126,29 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
DBG
(
printf
(
"~%s: aResult:'%s' ret:%d
\n
"
,
__func__
,
TO_UTF8
(
m_modal_string
),
m_modal_ret_val
);)
if
(
aResultantFocusWindow
)
{
aResultantFocusWindow
->
Raise
();
// have the final say, after wxWindowDisabler reenables my parent and
// the events settle down, set the focus
wxYield
();
aResultantFocusWindow
->
SetFocus
();
}
return
m_modal_ret_val
;
}
bool
KIWAY_PLAYER
::
Destroy
()
{
// Needed on Windows to leave the modal parent on top with focus
#ifdef __WINDOWS__
if
(
m_modal_resultant_parent
&&
GetParent
()
!=
m_modal_resultant_parent
)
Reparent
(
m_modal_resultant_parent
);
#endif
return
EDA_BASE_FRAME
::
Destroy
();
}
bool
KIWAY_PLAYER
::
IsDismissed
()
{
...
...
common/project.cpp
View file @
d6fd8b2e
...
...
@@ -42,15 +42,22 @@ PROJECT::PROJECT()
memset
(
m_elems
,
0
,
sizeof
(
m_elems
)
);
}
PROJECT
::~
PROJECT
()
void
PROJECT
::
ElemsClear
()
{
#if 1
// careful here, this may work, but the virtual destructor may not
// careful here, this should work, but the virtual destructor may not
// be in the same link image as PROJECT.
for
(
unsigned
i
=
0
;
i
<
DIM
(
m_elems
);
++
i
)
{
delete
m_elems
[
i
];
#endif
m_elems
[
i
]
=
NULL
;
}
}
PROJECT
::~
PROJECT
()
{
ElemsClear
();
}
...
...
@@ -145,21 +152,29 @@ RETAINED_PATH& PROJECT::RPath( RETPATH_T aIndex )
}
PROJECT
::
_ELEM
*
PROJECT
::
Elem
(
ELEM_T
aIndex
,
_ELEM
*
aElem
)
PROJECT
::
_ELEM
*
PROJECT
::
GetElem
(
ELEM_T
aIndex
)
{
unsigned
ndx
=
unsigned
(
aIndex
);
// This is virtual, so implement it out of line
if
(
ndx
<
DIM
(
m_elems
)
)
if
(
unsigned
(
aIndex
)
<
DIM
(
m_elems
)
)
{
if
(
aElem
)
m_elems
[
ndx
]
=
aElem
;
return
m_elems
[
ndx
];
return
m_elems
[
aIndex
];
}
return
NULL
;
}
void
PROJECT
::
SetElem
(
ELEM_T
aIndex
,
_ELEM
*
aElem
)
{
// This is virtual, so implement it out of line
if
(
unsigned
(
aIndex
)
<
DIM
(
m_elems
)
)
{
m_elems
[
aIndex
]
=
aElem
;
}
}
// non-member so it can be moved easily, and kept REALLY private.
// Do NOT Clear() in here.
static
void
add_search_paths
(
SEARCH_STACK
*
aDst
,
wxConfigBase
*
aCfg
,
int
aIndex
)
...
...
cvpcb/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -100,7 +100,6 @@ if( USE_KIWAY_DLLS )
cvpcb.cpp
${
CVPCB_SRCS
}
${
CVPCB_DIALOGS
}
# ${CVPCB_RESOURCES}
)
set_target_properties
(
cvpcb_kiface PROPERTIES
OUTPUT_NAME cvpcb
...
...
@@ -148,12 +147,6 @@ if( USE_KIWAY_DLLS )
target_link_libraries
(
cvpcb_kiface rt
)
endif
()
if
(
APPLE
)
set_target_properties
(
cvpcb PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
set_source_files_properties
(
cvpcb.cpp PROPERTIES
# The KIFACE is in cvpcb.cpp, export it:
COMPILE_DEFINITIONS
"BUILD_KIWAY_DLL;COMPILING_DLL"
...
...
@@ -172,18 +165,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
install
(
TARGETS cvpcb_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
if
(
APPLE
)
# copies kiface into the bundle
add_custom_target
(
_cvpcb_kiface_copy ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_BINARY_DIR
}
/cvpcb/_cvpcb.kiface
"
${
CMAKE_BINARY_DIR
}
/cvpcb/cvpcb.app/Contents/MacOS/"
DEPENDS cvpcb_kiface
COMMENT
"Copying kiface into cvpcb"
)
# puts the *.kiface into the *.app bundle while linking
set_target_properties
(
cvpcb_kiface PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/cvpcb.app/Contents/MacOS/
)
else
()
install
(
TARGETS cvpcb_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
else
()
...
...
@@ -228,15 +219,15 @@ else()
# Must follow github_plugin
target_link_libraries
(
cvpcb
${
Boost_LIBRARIES
}
)
if
(
APPLE
)
set_target_properties
(
cvpcb PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
install
(
TARGETS cvpcb
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
if
(
APPLE
)
set_target_properties
(
cvpcb PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
cvpcb/cfg.cpp
View file @
d6fd8b2e
...
...
@@ -81,23 +81,8 @@ void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName )
if
(
m_NetlistFileExtension
.
IsEmpty
()
)
m_NetlistFileExtension
=
wxT
(
"net"
);
// empty the table, Load() it again below.
FootprintLibs
()
->
Clear
();
/* this is done by ConfigLoad(), and that sets the env var too.
prj.SetProjectFullName( fn.GetFullPath() );
*/
wxString
projectFpLibTableFileName
=
prj
.
FootprintLibTblName
();
try
{
FootprintLibs
()
->
Load
(
projectFpLibTableFileName
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
DisplayError
(
this
,
ioe
.
errorText
);
}
// Force it to be loaded on demand.
prj
.
ElemClear
(
PROJECT
::
ELEM_FPTBL
);
}
...
...
cvpcb/class_DisplayFootprintsFrame.cpp
View file @
d6fd8b2e
...
...
@@ -488,7 +488,8 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName )
wxLogDebug
(
wxT
(
"Load footprint <%s> from library <%s>."
),
fpname
.
c_str
(),
nickname
.
c_str
()
);
footprint
=
FootprintLibs
()
->
FootprintLoad
(
FROM_UTF8
(
nickname
.
c_str
()
),
FROM_UTF8
(
fpname
.
c_str
()
)
);
footprint
=
Prj
().
PcbFootprintLibs
()
->
FootprintLoad
(
FROM_UTF8
(
nickname
.
c_str
()
),
FROM_UTF8
(
fpname
.
c_str
()
)
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
cvpcb/class_library_listbox.cpp
View file @
d6fd8b2e
...
...
@@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList )
{
RefreshItems
(
0L
,
m_libraryList
.
Count
()
-
1
);
#if defined (__WXGTK__ )
//
&& wxMINOR_VERSION == 8
#if defined (__WXGTK__ ) && wxMINOR_VERSION == 8
// @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the
// column parameter is -1. This was the only way to prevent GTK3 from
// ellipsizing long strings down to a few characters. It still doesn't set
...
...
cvpcb/cvframe.cpp
View file @
d6fd8b2e
...
...
@@ -200,24 +200,6 @@ CVPCB_MAINFRAME::~CVPCB_MAINFRAME()
}
FP_LIB_TABLE
*
CVPCB_MAINFRAME
::
FootprintLibs
()
const
{
PROJECT
&
prj
=
Prj
();
FP_LIB_TABLE
*
tbl
=
dynamic_cast
<
FP_LIB_TABLE
*>
(
prj
.
Elem
(
PROJECT
::
FPTBL
)
);
if
(
!
tbl
)
{
// Stack the project specific FP_LIB_TABLE overlay on top of the global table.
// ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may
// stack this way, all using the same global fallback table.
tbl
=
new
FP_LIB_TABLE
(
&
GFootprintTable
);
prj
.
Elem
(
PROJECT
::
FPTBL
,
tbl
);
}
return
tbl
;
}
void
CVPCB_MAINFRAME
::
LoadSettings
(
wxConfigBase
*
aCfg
)
{
EDA_BASE_FRAME
::
LoadSettings
(
aCfg
);
...
...
@@ -493,7 +475,7 @@ void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event )
void
CVPCB_MAINFRAME
::
OnEditFootprintLibraryTable
(
wxCommandEvent
&
aEvent
)
{
bool
tableChanged
=
false
;
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
FootprintLibs
()
);
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
Prj
().
Pcb
FootprintLibs
()
);
if
(
r
&
1
)
{
...
...
@@ -521,7 +503,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
try
{
FootprintLibs
()
->
Save
(
fileName
);
Prj
().
Pcb
FootprintLibs
()
->
Save
(
fileName
);
tableChanged
=
true
;
}
catch
(
const
IO_ERROR
&
ioe
)
...
...
@@ -538,7 +520,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
if
(
tableChanged
)
{
BuildLIBRARY_LISTBOX
();
m_footprints
.
ReadFootprintFiles
(
FootprintLibs
()
);
m_footprints
.
ReadFootprintFiles
(
Prj
().
Pcb
FootprintLibs
()
);
}
}
...
...
@@ -735,7 +717,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
bool
CVPCB_MAINFRAME
::
LoadFootprintFiles
()
{
FP_LIB_TABLE
*
fptbl
=
FootprintLibs
();
FP_LIB_TABLE
*
fptbl
=
Prj
().
Pcb
FootprintLibs
();
// Check if there are footprint libraries in the footprint library table.
if
(
!
fptbl
||
!
fptbl
->
GetLogicalLibs
().
size
()
)
...
...
@@ -1012,11 +994,13 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX()
wxFONTWEIGHT_NORMAL
)
);
}
if
(
FootprintLibs
()
)
FP_LIB_TABLE
*
tbl
=
Prj
().
PcbFootprintLibs
();
if
(
tbl
)
{
wxArrayString
libNames
;
std
::
vector
<
wxString
>
libNickNames
=
FootprintLibs
()
->
GetLogicalLibs
();
std
::
vector
<
wxString
>
libNickNames
=
tbl
->
GetLogicalLibs
();
for
(
unsigned
ii
=
0
;
ii
<
libNickNames
.
size
();
ii
++
)
libNames
.
Add
(
libNickNames
[
ii
]
);
...
...
cvpcb/cvpcb_mainframe.h
View file @
d6fd8b2e
...
...
@@ -88,12 +88,6 @@ public:
bool
OpenProjectFiles
(
const
std
::
vector
<
wxString
>&
aFileSet
,
int
aCtl
=
0
);
// overload KIWAY_PLAYER
/**
* Function FootprintLibs
* @return the project #FP_LIB_TABLE.
*/
FP_LIB_TABLE
*
FootprintLibs
()
const
;
/**
* @return a pointer on the Footprint Viewer frame, if exists, or NULL
*/
...
...
cvpcb/readwrite_dlgs.cpp
View file @
d6fd8b2e
This diff is collapsed.
Click to expand it.
eeschema/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -311,20 +311,18 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
install
(
TARGETS eeschema_kiface
# actual filename subject to change at milestone C)
# modular-kicad blueprint.
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
if
(
APPLE
)
# copies kiface into the bundle
add_custom_target
(
_eeschema_kiface_copy ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_BINARY_DIR
}
/eeschema/_eeschema.kiface
"
${
CMAKE_BINARY_DIR
}
/eeschema/eeschema.app/Contents/MacOS/"
DEPENDS eeschema_kiface
COMMENT
"Copying kiface into eeschema"
)
# puts the *.kiface into the *.app bundle while linking
set_target_properties
(
eeschema_kiface PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/eeschema.app/Contents/MacOS/
)
else
()
install
(
TARGETS eeschema_kiface
# actual filename subject to change at milestone C)
# modular-kicad blueprint.
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
else
()
...
...
eeschema/Info.plist
View file @
d6fd8b2e
...
...
@@ -2,54 +2,36 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
sch
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
eeschema
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
eeschema
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.eeschema
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
EESchema
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
sch
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
eeschema
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
eeschema
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.eeschema
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
EESchema
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
d6fd8b2e
...
...
@@ -436,13 +436,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven
void
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
showButtonHandler
(
wxCommandEvent
&
event
)
{
#if 0
wxString datasheet_uri = fieldValueTextCtrl->GetValue();
::wxLaunchDefaultBrowser( datasheet_uri );
#else
unsigned
fieldNdx
=
getSelectedFieldNdx
();
if
(
fieldNdx
==
DATASHEET
)
{
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
...
...
@@ -455,17 +450,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even
KIWAY_PLAYER
*
frame
=
Kiway
().
Player
(
FRAME_PCB_MODULE_VIEWER_MODAL
,
true
);
if
(
frame
->
ShowModal
(
&
fpid
)
)
if
(
frame
->
ShowModal
(
&
fpid
,
this
)
)
{
printf
(
"%s: %s
\n
"
,
__func__
,
TO_UTF8
(
fpid
)
);
// DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); )
fieldValueTextCtrl
->
SetValue
(
fpid
);
}
frame
->
Destroy
();
}
#endif
}
...
...
@@ -771,8 +763,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
else
m_show_datasheet_button
->
SetLabel
(
wxEmptyString
);
m_show_datasheet_button
->
Enable
(
fieldNdx
==
DATASHEET
||
fieldNdx
==
FOOTPRINT
);
// For power symbols, the value is NOR editable, because value and pin
// name must be same and can be edited only in library editor
if
(
fieldNdx
==
VALUE
&&
m_LibEntry
&&
m_LibEntry
->
IsPower
()
)
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
d6fd8b2e
...
...
@@ -28,6 +28,7 @@
#include <fctsys.h>
#include <pgm_base.h>
#include <kiway.h>
#include <confirm.h>
#include <class_drawpanel.h>
#include <wxEeschemaStruct.h>
...
...
@@ -141,7 +142,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
dlg
(
this
,
m_component
);
int
abort
=
dlg
.
ShowModal
();
int
abort
=
dlg
.
Show
Quasi
Modal
();
if
(
abort
)
return
;
...
...
@@ -211,7 +212,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnListItemSelected( wxListEvent& event
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
OnCancelButtonClick
(
wxCommandEvent
&
event
)
{
EndModal
(
1
);
End
Quasi
Modal
(
1
);
}
...
...
@@ -282,7 +283,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event
m_parent
->
OnModify
();
EndModal
(
0
);
End
Quasi
Modal
(
0
);
}
...
...
@@ -381,8 +382,28 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
showButtonHandler
(
wxCommandEvent
&
event
)
{
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
::
wxLaunchDefaultBrowser
(
datasheet_uri
);
unsigned
fieldNdx
=
getSelectedFieldNdx
();
if
(
fieldNdx
==
DATASHEET
)
{
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
::
wxLaunchDefaultBrowser
(
datasheet_uri
);
}
else
if
(
fieldNdx
==
FOOTPRINT
)
{
// pick a footprint using the footprint picker.
wxString
fpid
;
KIWAY_PLAYER
*
frame
=
Kiway
().
Player
(
FRAME_PCB_MODULE_VIEWER_MODAL
,
true
);
if
(
frame
->
ShowModal
(
&
fpid
,
this
)
)
{
// DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); )
fieldValueTextCtrl
->
SetValue
(
fpid
);
}
frame
->
Destroy
();
}
}
...
...
@@ -652,7 +673,14 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
textSizeTextCtrl
->
SetValue
(
EDA_GRAPHIC_TEXT_CTRL
::
FormatSize
(
g_UserUnit
,
field
.
GetSize
().
x
)
);
m_show_datasheet_button
->
Enable
(
fieldNdx
==
DATASHEET
);
m_show_datasheet_button
->
Enable
(
fieldNdx
==
DATASHEET
||
fieldNdx
==
FOOTPRINT
);
if
(
fieldNdx
==
DATASHEET
)
m_show_datasheet_button
->
SetLabel
(
_
(
"Show in Browser"
)
);
else
if
(
fieldNdx
==
FOOTPRINT
)
m_show_datasheet_button
->
SetLabel
(
_
(
"Assign Footprint"
)
);
else
m_show_datasheet_button
->
SetLabel
(
wxEmptyString
);
wxPoint
coord
=
field
.
GetTextPosition
();
wxPoint
zero
;
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
View file @
d6fd8b2e
...
...
@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////////////////
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
wxDialog
(
parent
,
id
,
title
,
pos
,
size
,
style
)
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
DIALOG_SHIM
(
parent
,
id
,
title
,
pos
,
size
,
style
)
{
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
View file @
d6fd8b2e
...
...
@@ -46,7 +46,7 @@
<property
name=
"pos"
></property>
<property
name=
"size"
>
-1,-1
</property>
<property
name=
"style"
>
wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU
</property>
<property
name=
"subclass"
></property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"title"
>
Field Properties
</property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
View file @
d6fd8b2e
...
...
@@ -11,6 +11,9 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include <wx/listctrl.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
...
...
@@ -33,7 +36,7 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
///////////////////////////////////////////////////////////////////////////////
class
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
:
public
wxDialog
class
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
:
public
DIALOG_SHIM
{
private
:
...
...
eeschema/eeschema.cpp
View file @
d6fd8b2e
...
...
@@ -99,8 +99,7 @@ static struct IFACE : public KIFACE_I
case
FRAME_SCH_LIB_EDITOR
:
{
LIB_EDIT_FRAME
*
frame
=
new
LIB_EDIT_FRAME
(
aKiway
,
dynamic_cast
<
SCH_EDIT_FRAME
*>
(
aParent
)
);
LIB_EDIT_FRAME
*
frame
=
new
LIB_EDIT_FRAME
(
aKiway
,
aParent
);
return
frame
;
}
break
;
...
...
eeschema/getpart.cpp
View file @
d6fd8b2e
...
...
@@ -79,7 +79,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA
wxString
cmpname
;
if
(
viewlibFrame
->
ShowModal
(
&
cmpname
)
)
if
(
viewlibFrame
->
ShowModal
(
&
cmpname
,
this
)
)
{
if
(
aUnit
)
*
aUnit
=
viewlibFrame
->
GetUnit
();
...
...
eeschema/libeditframe.cpp
View file @
d6fd8b2e
...
...
@@ -187,7 +187,7 @@ END_EVENT_TABLE()
#define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" )
LIB_EDIT_FRAME
::
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
SCH_EDIT_FRAME
*
aParent
)
:
LIB_EDIT_FRAME
::
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
)
:
SCH_BASE_FRAME
(
aKiway
,
aParent
,
FRAME_SCH_LIB_EDITOR
,
_
(
"Library Editor"
),
wxDefaultPosition
,
wxDefaultSize
,
KICAD_DEFAULT_DRAWFRAME_STYLE
,
GetLibEditFrameName
()
)
{
...
...
eeschema/libeditframe.h
View file @
d6fd8b2e
...
...
@@ -122,7 +122,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME
public
:
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
SCH_EDIT_FRAME
*
aParent
);
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
);
~
LIB_EDIT_FRAME
();
...
...
eeschema/schframe.cpp
View file @
d6fd8b2e
...
...
@@ -101,6 +101,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL
(
ID_TO_LIBVIEW
,
SCH_EDIT_FRAME
::
OnOpenLibraryViewer
)
EVT_TOOL
(
ID_TO_PCB
,
SCH_EDIT_FRAME
::
OnOpenPcbnew
)
EVT_TOOL
(
ID_TO_PCB_MODULE_EDITOR
,
SCH_EDIT_FRAME
::
OnOpenPcbModuleEditor
)
EVT_TOOL
(
ID_TO_CVPCB
,
SCH_EDIT_FRAME
::
OnOpenCvpcb
)
EVT_TOOL
(
ID_SHEET_SET
,
EDA_DRAW_FRAME
::
Process_PageSettings
)
...
...
@@ -794,6 +796,22 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event )
}
void
SCH_EDIT_FRAME
::
OnOpenPcbModuleEditor
(
wxCommandEvent
&
event
)
{
if
(
!
Kiface
().
IsSingle
()
)
{
wxFileName
fn
=
g_RootSheet
->
GetScreen
()
->
GetFileName
();
if
(
fn
.
IsOk
()
)
{
KIWAY_PLAYER
*
player
=
Kiway
().
Player
(
FRAME_PCB_MODULE_EDITOR
);
player
->
Show
(
true
);
player
->
Raise
();
}
}
}
void
SCH_EDIT_FRAME
::
OnOpenCvpcb
(
wxCommandEvent
&
event
)
{
wxFileName
fn
=
g_RootSheet
->
GetScreen
()
->
GetFileName
();
...
...
eeschema/tool_sch.cpp
View file @
d6fd8b2e
...
...
@@ -30,6 +30,7 @@
#include <fctsys.h>
#include <class_drawpanel.h>
#include <wxEeschemaStruct.h>
#include <kiface_i.h>
#include <general.h>
#include <hotkeys.h>
...
...
@@ -139,10 +140,8 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar
->
AddTool
(
ID_TO_LIBVIEW
,
wxEmptyString
,
KiBitmap
(
library_browse_xpm
),
HELP_RUN_LIB_VIEWER
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_GET_ANNOTATE
,
wxEmptyString
,
KiBitmap
(
annotate_xpm
),
HELP_ANNOTATE
);
...
...
@@ -158,6 +157,13 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar
->
AddSeparator
();
// The user must HAVE footprints before he can assign them. So put this before
// the CVPCB.
if
(
!
Kiface
().
IsSingle
()
)
// if pcbnew is not a separate process
{
m_mainToolBar
->
AddTool
(
ID_TO_PCB_MODULE_EDITOR
,
wxEmptyString
,
KiBitmap
(
module_editor_xpm
),
_
(
"Footprint Editor"
)
);
}
m_mainToolBar
->
AddTool
(
ID_TO_CVPCB
,
wxEmptyString
,
KiBitmap
(
cvpcb_xpm
),
_
(
"Run CvPcb to associate components and footprints"
)
);
...
...
eeschema/viewlib_frame.h
View file @
d6fd8b2e
...
...
@@ -36,7 +36,6 @@
#include <sch_base_frame.h>
#include <class_sch_screen.h>
class
wxSashLayoutWindow
;
class
wxListBox
;
class
CMP_LIBRARY
;
...
...
gerbview/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -81,11 +81,11 @@ endif()
if
(
APPLE
)
set
(
GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/gerbview.icns"
PROPERTIES
set
(
GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/gerbview.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/gerbview_doc.icns"
PROPERTIES
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/gerbview_doc.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set
(
MACOSX_BUNDLE_ICON_FILE gerbview.icns
)
...
...
@@ -120,7 +120,6 @@ if( USE_KIWAY_DLLS )
${
GERBVIEW_SRCS
}
${
DIALOGS_SRCS
}
${
GERBVIEW_EXTRA_SRCS
}
# ${GERBVIEW_RESOURCES}
)
set_target_properties
(
gerbview_kiface PROPERTIES
OUTPUT_NAME gerbview
...
...
@@ -152,18 +151,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
install
(
TARGETS gerbview_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
if
(
APPLE
)
# copies kiface into the bundle
add_custom_target
(
_gerbview_kiface_copy ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_BINARY_DIR
}
/gerbview/_gerbview.kiface
"
${
CMAKE_BINARY_DIR
}
/gerbview/gerbview.app/Contents/MacOS/"
DEPENDS gerbview_kiface
COMMENT
"Copying kiface into gerbview"
)
# puts the *.kiface into the *.app bundle while linking
set_target_properties
(
gerbview_kiface PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/gerbview.app/Contents/MacOS/
)
else
()
install
(
TARGETS gerbview_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
else
()
...
...
@@ -194,5 +191,3 @@ if( APPLE )
set_target_properties
(
gerbview PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
gerbview/Info.plist
View file @
d6fd8b2e
...
...
@@ -2,72 +2,54 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
pen
<
/string
>
<
string
>
gba
<
/string
>
<
string
>
gbr
<
/string
>
<
string
>
gbx
<
/string
>
<
string
>
gbo
<
/string
>
<
string
>
gbl
<
/string
>
<
string
>
gtl
<
/string
>
<
string
>
gto
<
/string
>
<
string
>
gta
<
/string
>
<
string
>
gbp
<
/string
>
<
string
>
gbp
<
/string
>
<
string
>
gbs
<
/string
>
<
string
>
gts
<
/string
>
<
string
>
gtp
<
/string
>
<
string
>
gbx
<
/string
>
<
string
>
lgr
<
/string
>
<
string
>
ger
<
/string
>
<
string
>
pho
<
/string
>
<
string
>
drl
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
gerbview_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
gerbview
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Default
<
/string
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Viewer
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
gerbview
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
gerbview.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.gerbview
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
GerbView
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
pen
<
/string
>
<
string
>
gba
<
/string
>
<
string
>
gbr
<
/string
>
<
string
>
gbx
<
/string
>
<
string
>
gbo
<
/string
>
<
string
>
gbl
<
/string
>
<
string
>
gtl
<
/string
>
<
string
>
gto
<
/string
>
<
string
>
gta
<
/string
>
<
string
>
gbp
<
/string
>
<
string
>
gbp
<
/string
>
<
string
>
gbs
<
/string
>
<
string
>
gts
<
/string
>
<
string
>
gtp
<
/string
>
<
string
>
gbx
<
/string
>
<
string
>
lgr
<
/string
>
<
string
>
ger
<
/string
>
<
string
>
pho
<
/string
>
<
string
>
drl
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
gerbview_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
gerbview
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Default
<
/string
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Viewer
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
gerbview
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
gerbview.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.gerbview
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
GerbView
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
include/common.h
View file @
d6fd8b2e
...
...
@@ -102,7 +102,7 @@ enum pseudokeys {
#define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" )
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" )
#define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" )
#define PL_EDITOR_EXE
wxT( "pcb_calcula
tor.app/Contents/MacOS/pl_editor" )
#define PL_EDITOR_EXE
wxT( "pl_edi
tor.app/Contents/MacOS/pl_editor" )
# endif
#endif
...
...
include/fp_lib_table.h
View file @
d6fd8b2e
...
...
@@ -270,6 +270,8 @@ public:
*/
FP_LIB_TABLE
(
FP_LIB_TABLE
*
aFallBackTable
=
NULL
);
~
FP_LIB_TABLE
();
/// Delete all rows.
void
Clear
()
{
...
...
include/id.h
View file @
d6fd8b2e
...
...
@@ -45,6 +45,7 @@
enum
main_id
{
ID_TO_PCB
=
wxID_HIGHEST
,
ID_TO_PCB_MODULE_EDITOR
,
ID_TO_CVPCB
,
ID_LOAD_PROJECT
,
ID_APPEND_PROJECT
,
...
...
include/kiway_player.h
View file @
d6fd8b2e
...
...
@@ -185,11 +185,12 @@ public:
* event which ends the modal behavior.
*
* @param aResult if not NULL, indicates a place to put a resultant string.
* @param aResultantFocusWindow if not NULL, indicates what window to pass focus to on return.
*
* @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal()
* with aRetVal of true.
*/
VTBL_ENTRY
bool
ShowModal
(
wxString
*
aResult
=
NULL
);
VTBL_ENTRY
bool
ShowModal
(
wxString
*
aResult
=
NULL
,
wxWindow
*
aResultantFocusWindow
=
NULL
);
//----</Cross Module API>----------------------------------------------------
...
...
@@ -201,6 +202,11 @@ public:
*/
virtual
void
KiwayMailIn
(
KIWAY_EXPRESS
&
aEvent
);
/**
* Our version of Destroy() which is virtual from wxWidgets
*/
bool
Destroy
();
protected
:
bool
IsModal
()
{
return
m_modal
;
}
...
...
@@ -228,6 +234,7 @@ protected:
// variables for modal behavior support, only used by a few derivatives.
bool
m_modal
;
// true if frame is intended to be modal, not modeless
WX_EVENT_LOOP
*
m_modal_loop
;
// points to nested event_loop, NULL means not modal and dismissed
wxWindow
*
m_modal_resultant_parent
;
// the window caller in modal mode
wxString
m_modal_string
;
bool
m_modal_ret_val
;
// true if a selection was made
...
...
include/project.h
View file @
d6fd8b2e
...
...
@@ -35,7 +35,7 @@
class
wxConfigBase
;
class
PARAM_CFG_ARRAY
;
class
FP_LIB_TABLE
;
#define VTBL_ENTRY virtual
...
...
@@ -49,11 +49,12 @@ class PROJECT
{
public
:
/// Derive PROJECT elements from this, it has a virtual destructor, and
/// Elem*() functions can work with it. Implementation is opaque in
/// class PROJECT. If find you have to include derived class headers in this
/// file, you are doing something wrong. Keep knowledge of derived classes
/// opaque to class PROJECT please.
/// A PROJECT can hold stuff it knows nothing about, in the form of
/// _ELEM derivatives. Derive PROJECT elements from this, it has a virtual
/// destructor, and Elem*() functions can work with it. Implementation is
/// opaque in class PROJECT. If find you have to include derived class headers
/// in this file, you are doing incompatible with the goal of this class.
/// Keep knowledge of derived classes opaque to class PROJECT please.
class
_ELEM
{
public
:
...
...
@@ -63,6 +64,8 @@ public:
PROJECT
();
~
PROJECT
();
//-----<Cross Module API>----------------------------------------------------
// VTBL_ENTRY bool MaybeLoadProjectSettings( const std::vector<wxString>& aFileSet );
/**
...
...
@@ -154,18 +157,12 @@ public:
*/
enum
ELEM_T
{
FPTBL
,
ELEM_
FPTBL
,
ELEM_COUNT
};
/**
* A PROJECT can hold stuff it knows nothing about, in the form of
* _ELEM derivatives. This function gives access to a PROJECT::_ELEM using
* enum ELEM_T as an index.
* <p>
* Acts as setter iff aElem is not NULL, else getter.
* <p>
* Typically wrapped somewhere else in a more meaningful function wrapper.
* This is a cross module API, therefore the _ELEM destructor is virtual and
* can point to a destructor function in another link image. Be careful that
...
...
@@ -174,7 +171,47 @@ public:
* Summary: 1) cross module API, 2) PROJECT knows nothing about _ELEM objects,
* except how to delete them and set and get pointers to them.
*/
VTBL_ENTRY
_ELEM
*
Elem
(
ELEM_T
aIndex
,
_ELEM
*
aElem
=
NULL
);
VTBL_ENTRY
_ELEM
*
GetElem
(
ELEM_T
aIndex
);
VTBL_ENTRY
void
SetElem
(
ELEM_T
aIndex
,
_ELEM
*
aElem
);
/// Inline, clear the _ELEM at position aIndex
void
ElemClear
(
ELEM_T
aIndex
)
{
_ELEM
*
existing
=
GetElem
(
aIndex
);
delete
existing
;
// virtual
SetElem
(
aIndex
,
NULL
);
}
/**
* Function ElemsClear
* deletes all the _ELEMs and set their pointers to NULL.
*/
VTBL_ENTRY
void
ElemsClear
();
//-----</Cross Module API>---------------------------------------------------
//-----<KIFACE Specific APIs>------------------------------------------------
// These are the non-virtual DATA LOAD ON DEMAND members. They load project related
// data on demand, and do so typicallly into m_elems[] at a particular index using
// SetElem() & GetElem(). That is, they wrap SetElem() and GetElem().
// To get the data to reload on demand, first SetProjectFullName(),
// then call ElemClear() from client code.
// non-virtuals resident in PCBNEW link image(s). By being non-virtual, these
// functions can get linked into the KIFACE that needs them, and only there.
// In fact, the other KIFACEs don't even know they exist.
#if defined(PCBNEW) || defined(CVPCB)
// These are all prefaced with "Pcb"
FP_LIB_TABLE
*
PcbFootprintLibs
();
#endif
#if defined(EESCHEMA)
// These are all prefaced with "Sch"
#endif
//-----</KIFACE Specific APIs>-----------------------------------------------
private
:
...
...
@@ -215,10 +252,6 @@ private:
//-----<possible futures>---------------------------------------------------------
#if 0
VTBL_ENTRY int ElemAllocNdx();
VTBL_ENTRY void ElemSet( int aIndex, ELEMENT_BASE* aBlock );
VTBL_ENTRY ELEM_BASE* ElemGet( int aIndex )
/**
* Function Value
* fetches a project variable @a aVariable and returns true if that variable was
...
...
include/wxBasePcbFrame.h
View file @
d6fd8b2e
...
...
@@ -103,7 +103,7 @@ protected:
*
* @param aFootprintId is the #FPID of component footprint to load.
* @return the #MODULE if found or NULL if \a aFootprintId not found in any of the
* libraries in the table returned from #FootprintLibs().
* libraries in the table returned from #
Prj().Pcb
FootprintLibs().
* @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error
* occurs while reading footprint library files.
*/
...
...
@@ -127,7 +127,7 @@ public:
*
* @param aFootprintId is the #FPID of component footprint to load.
* @return the #MODULE if found or NULL if \a aFootprintId not found in any of the
* libraries in table returned from #FootprintLibs().
* libraries in table returned from #
Prj().Pcb
FootprintLibs().
*/
MODULE
*
LoadFootprint
(
const
FPID
&
aFootprintId
);
...
...
@@ -463,12 +463,6 @@ public:
*/
wxString
SelectFootprintFromLibBrowser
();
/**
* Function FootprintLibs
* @return the project #FP_LIB_TABLE.
*/
FP_LIB_TABLE
*
FootprintLibs
()
const
;
// ratsnest functions
/**
* Function Compile_Ratsnest
...
...
include/wxEeschemaStruct.h
View file @
d6fd8b2e
...
...
@@ -368,7 +368,7 @@ public:
*/
virtual
void
ExecuteRemoteCommand
(
const
char
*
cmdline
);
void
KiwayMailIn
(
KIWAY_EXPRESS
&
aEvent
);
//
virtual overload
from KIWAY_PLAYER
void
KiwayMailIn
(
KIWAY_EXPRESS
&
aEvent
);
//
override virtual
from KIWAY_PLAYER
void
OnLeftClick
(
wxDC
*
aDC
,
const
wxPoint
&
aPosition
);
void
OnLeftDClick
(
wxDC
*
aDC
,
const
wxPoint
&
aPosition
);
...
...
@@ -793,6 +793,7 @@ private:
void
OnLoadProject
(
wxCommandEvent
&
event
);
void
OnAppendProject
(
wxCommandEvent
&
event
);
void
OnOpenPcbnew
(
wxCommandEvent
&
event
);
void
OnOpenPcbModuleEditor
(
wxCommandEvent
&
event
);
void
OnOpenCvpcb
(
wxCommandEvent
&
event
);
void
OnOpenLibraryEditor
(
wxCommandEvent
&
event
);
void
OnSetOptions
(
wxCommandEvent
&
event
);
...
...
kicad/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -57,6 +57,22 @@ if( UNIX )
endif
()
if
(
APPLE
)
# In this CMakeLists.txt's build directory, create kiface symlinks should get
# "installed()" as part of the kicad.app bundle. These are pointers on the
# target which point up and over to the stand alone kicad app's *.kiface files.
foreach
(
symlink pcbnew eeschema cvpcb
)
add_custom_command
(
TARGET kicad
COMMAND
${
CMAKE_COMMAND
}
-E remove
"
${
CMAKE_CURRENT_BINARY_DIR
}
/kicad.app/Contents/MacOS/_
${
symlink
}
.kiface"
COMMAND
${
CMAKE_COMMAND
}
-E create_symlink
"../../../
${
symlink
}
.app/Contents/MacOS/_
${
symlink
}
.kiface"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/kicad.app/Contents/MacOS/_
${
symlink
}
.kiface"
COMMENT
"kicad.app
${
symlink
}
symlink"
)
endforeach
()
endif
()
if
(
APPLE
)
set_target_properties
(
kicad PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
...
...
kicad/Info.plist
View file @
d6fd8b2e
...
...
@@ -2,54 +2,36 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
kicad_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
pro
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
kicad
project
files
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
kicad
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
kicad.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.kicad
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
KiCad
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
kicad_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
pro
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
kicad
project
files
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
kicad
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
kicad.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.kicad
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
KiCad
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
pagelayout_editor/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -49,7 +49,20 @@ set( PL_EDITOR_EXTRA_SRCS
if
(
MINGW
)
# PL_EDITOR_RESOURCES variable is set by the macro.
mingw_resource_compiler
(
pl_editor
)
mingw_resource_compiler
(
pl_editor
)
endif
()
if
(
APPLE
)
set
(
PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/pl_editor.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/pl_editor_doc.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set
(
MACOSX_BUNDLE_ICON_FILE pl_editor.icns
)
set
(
MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor
)
endif
()
...
...
@@ -82,7 +95,6 @@ if( USE_KIWAY_DLLS )
${
PL_EDITOR_SRCS
}
${
DIALOGS_SRCS
}
${
PL_EDITOR_EXTRA_SRCS
}
# ${PL_EDITOR_RESOURCES}
)
target_link_libraries
(
pl_editor_kiface
common
...
...
@@ -114,18 +126,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
install
(
TARGETS pl_editor_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
if
(
APPLE
)
# copies kiface into the bundle
add_custom_target
(
_pleditor_kiface_copy ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_BINARY_DIR
}
/pagelayout_editor/_pl_editor.kiface
"
${
CMAKE_BINARY_DIR
}
/pagelayout_editor/pl_editor.app/Contents/MacOS/"
DEPENDS pl_editor_kiface
COMMENT
"Copying kiface into pleditor"
)
# puts the *.kiface into the *.app bundle while linking
set_target_properties
(
pl_editor_kiface PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/pl_editor.app/Contents/MacOS/
)
else
()
install
(
TARGETS pl_editor_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
else
()
...
...
@@ -137,13 +147,6 @@ else()
${
PL_EDITOR_EXTRA_SRCS
}
${
PL_EDITOR_RESOURCES
}
)
if
(
APPLE
)
set_target_properties
(
pl_editor PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
target_link_libraries
(
pl_editor
common
polygon
...
...
@@ -152,28 +155,15 @@ else()
${
wxWidgets_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
)
install
(
TARGETS pl_editor
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
if
(
APPLE
)
set
(
PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/pl_editor.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/pl_editor_doc.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set
(
MACOSX_BUNDLE_ICON_FILE pl_editor.icns
)
set
(
MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor
)
set_target_properties
(
pl_editor PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
pagelayout_editor/Info.plist
View file @
d6fd8b2e
...
...
@@ -2,54 +2,36 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
kicad_wks
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pl_editor
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pl_editor
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.pl_editor
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
pl_editor
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
kicad_wks
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pl_editor
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pl_editor
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.pl_editor
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
pl_editor
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
pcb_calculator/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -122,14 +122,15 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
install
(
TARGETS pcb_calculator_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
if
(
APPLE
)
set_target_properties
(
pcb_calculator PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
# puts the *.kiface into the *.app bundle while linking
set_target_properties
(
pcb_calculator_kiface PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/pcb_calculator.app/Contents/MacOS/
)
else
()
install
(
TARGETS pcb_calculator_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
...
...
@@ -156,13 +157,6 @@ else()
set_source_files_properties
(
pcb_calculator.cpp PROPERTIES
COMPILE_DEFINITIONS
"COMPILING_DLL"
)
if
(
APPLE
)
set_target_properties
(
pcb_calculator PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
target_link_libraries
(
pcb_calculator
common
bitmaps
...
...
@@ -175,3 +169,10 @@ else()
)
endif
()
if
(
APPLE
)
set_target_properties
(
pcb_calculator PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
pcbnew/CMakeLists.txt
View file @
d6fd8b2e
...
...
@@ -594,17 +594,15 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
install
(
TARGETS pcbnew_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
if
(
APPLE
)
# copies kiface into the bundle
add_custom_target
(
_pcbnew_kiface_copy ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_BINARY_DIR
}
/pcbnew/_pcbnew.kiface
"
${
CMAKE_BINARY_DIR
}
/pcbnew/pcbnew.app/Contents/MacOS/"
DEPENDS pcbnew_kiface
COMMENT
"Copying kiface into pcbnew"
# puts the *.kiface into the *.app bundle while linking
set_target_properties
(
pcbnew_kiface PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.app/Contents/MacOS/
)
else
()
install
(
TARGETS pcbnew_kiface
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
endif
()
...
...
@@ -768,3 +766,4 @@ if( false ) # haven't been used in years.
)
target_link_libraries
(
layer_widget_test common
${
wxWidgets_LIBRARIES
}
)
endif
()
pcbnew/Info.plist
View file @
d6fd8b2e
...
...
@@ -2,53 +2,36 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pcbnew_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
kicad_pcb
<
/string
>
<
string
>
brd
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pcbnew
board
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pcbnew
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
pcbnew.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.pcbnew
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
PCBNew
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pcbnew_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
kicad_pcb
<
/string
>
<
string
>
brd
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pcbnew
board
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pcbnew
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
pcbnew.icns
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.pcbnew
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
PCBNew
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
pcbnew/basepcbframe.cpp
View file @
d6fd8b2e
...
...
@@ -175,10 +175,15 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME()
}
FP_LIB_TABLE
*
P
CB_BASE_FRAME
::
FootprintLibs
()
const
FP_LIB_TABLE
*
P
ROJECT
::
PcbFootprintLibs
()
{
PROJECT
&
prj
=
Prj
();
FP_LIB_TABLE
*
tbl
=
dynamic_cast
<
FP_LIB_TABLE
*>
(
prj
.
Elem
(
PROJECT
::
FPTBL
)
);
// This is a lazy loading function, it loads the project specific table when
// that table is asked for, not before.
FP_LIB_TABLE
*
tbl
=
(
FP_LIB_TABLE
*
)
GetElem
(
ELEM_FPTBL
);
// its gotta be NULL or a FP_LIB_TABLE, or a bug.
wxASSERT
(
!
tbl
||
dynamic_cast
<
FP_LIB_TABLE
*>
(
tbl
)
);
if
(
!
tbl
)
{
...
...
@@ -187,7 +192,18 @@ FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const
// stack this way, all using the same global fallback table.
tbl
=
new
FP_LIB_TABLE
(
&
GFootprintTable
);
prj
.
Elem
(
PROJECT
::
FPTBL
,
tbl
);
SetElem
(
ELEM_FPTBL
,
tbl
);
wxString
projectFpLibTableFileName
=
FootprintLibTblName
();
try
{
tbl
->
Load
(
projectFpLibTableFileName
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
DisplayError
(
NULL
,
ioe
.
errorText
);
}
}
return
tbl
;
...
...
pcbnew/class_track.cpp
View file @
d6fd8b2e
...
...
@@ -1231,7 +1231,7 @@ void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList )
}
bool
TRACK
::
HitTest
(
const
wxPoint
&
aPosition
)
bool
TRACK
::
HitTest
(
const
wxPoint
&
aPosition
)
const
{
return
TestSegmentHit
(
aPosition
,
m_Start
,
m_End
,
m_Width
/
2
);
}
...
...
pcbnew/class_track.h
View file @
d6fd8b2e
...
...
@@ -223,7 +223,7 @@ public:
const
KICAD_T
scanTypes
[]
);
virtual
bool
HitTest
(
const
wxPoint
&
aPosition
);
virtual
bool
HitTest
(
const
wxPoint
&
aPosition
)
const
;
/** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect,
* bool aContained = true, int aAccuracy ) const
...
...
pcbnew/clean.cpp
View file @
d6fd8b2e
This diff is collapsed.
Click to expand it.
pcbnew/files.cpp
View file @
d6fd8b2e
...
...
@@ -173,7 +173,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
Clear_Pcb
(
true
);
// Clear footprint library table for the new board.
FootprintLibs
()
->
Clear
();
Prj
().
Pcb
FootprintLibs
()
->
Clear
();
wxFileName
fn
;
...
...
@@ -603,7 +603,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
return
false
;
// Save the project specific footprint library table.
if
(
!
FootprintLibs
()
->
IsEmpty
(
false
)
)
if
(
!
Prj
().
Pcb
FootprintLibs
()
->
IsEmpty
(
false
)
)
{
wxString
fp_lib_tbl
=
Prj
().
FootprintLibTblName
();
...
...
@@ -613,7 +613,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
{
try
{
FootprintLibs
()
->
Save
(
fp_lib_tbl
);
Prj
().
Pcb
FootprintLibs
()
->
Save
(
fp_lib_tbl
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
pcbnew/librairi.cpp
View file @
d6fd8b2e
...
...
@@ -469,7 +469,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
{
wxString
nickname
=
getLibNickName
();
if
(
!
FootprintLibs
()
->
IsFootprintLibWritable
(
nickname
)
)
if
(
!
Prj
().
Pcb
FootprintLibs
()
->
IsFootprintLibWritable
(
nickname
)
)
{
wxString
msg
=
wxString
::
Format
(
_
(
"Library '%s' is read only"
),
...
...
@@ -481,7 +481,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
}
wxString
fpid_txt
=
PCB_BASE_FRAME
::
SelectFootprint
(
this
,
nickname
,
wxEmptyString
,
wxEmptyString
,
FootprintLibs
()
);
wxEmptyString
,
wxEmptyString
,
Prj
().
Pcb
FootprintLibs
()
);
if
(
!
fpid_txt
)
return
false
;
...
...
@@ -497,7 +497,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
try
{
FootprintLibs
()
->
FootprintDelete
(
nickname
,
fpname
);
Prj
().
Pcb
FootprintLibs
()
->
FootprintDelete
(
nickname
,
fpname
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
@@ -545,22 +545,24 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly )
try
{
FP_LIB_TABLE
*
tbl
=
Prj
().
PcbFootprintLibs
();
// Delete old library if we're replacing it entirely.
if
(
!
aNewModulesOnly
)
{
FootprintLibs
()
->
FootprintLibDelete
(
nickname
);
FootprintLibs
()
->
FootprintLibCreate
(
nickname
);
tbl
->
FootprintLibDelete
(
nickname
);
tbl
->
FootprintLibCreate
(
nickname
);
for
(
MODULE
*
m
=
GetBoard
()
->
m_Modules
;
m
;
m
=
m
->
Next
()
)
{
FootprintLibs
()
->
FootprintSave
(
nickname
,
m
,
true
);
tbl
->
FootprintSave
(
nickname
,
m
,
true
);
}
}
else
{
for
(
MODULE
*
m
=
GetBoard
()
->
m_Modules
;
m
;
m
=
m
->
Next
()
)
{
FootprintLibs
()
->
FootprintSave
(
nickname
,
m
,
false
);
tbl
->
FootprintSave
(
nickname
,
m
,
false
);
// Check for request to stop backup (ESCAPE key actuated)
if
(
m_canvas
->
GetAbortRequest
()
)
...
...
@@ -627,7 +629,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary,
try
{
MODULE
*
m
=
FootprintLibs
()
->
FootprintLoad
(
aLibrary
,
footprintName
);
FP_LIB_TABLE
*
tbl
=
Prj
().
PcbFootprintLibs
();
MODULE
*
m
=
tbl
->
FootprintLoad
(
aLibrary
,
footprintName
);
if
(
m
)
{
...
...
@@ -653,7 +657,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary,
// this always overwrites any existing footprint, but should yell on its
// own if the library or footprint is not writable.
FootprintLibs
()
->
FootprintSave
(
aLibrary
,
aModule
);
tbl
->
FootprintSave
(
aLibrary
,
aModule
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
@@ -738,7 +742,7 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting )
headers
.
Add
(
_
(
"Nickname"
)
);
headers
.
Add
(
_
(
"Description"
)
);
FP_LIB_TABLE
*
fptbl
=
FootprintLibs
();
FP_LIB_TABLE
*
fptbl
=
Prj
().
Pcb
FootprintLibs
();
std
::
vector
<
wxArrayString
>
itemsToDisplay
;
std
::
vector
<
wxString
>
nicknames
=
fptbl
->
GetLogicalLibs
();
...
...
pcbnew/loadcmp.cpp
View file @
d6fd8b2e
...
...
@@ -135,7 +135,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser()
wxString
fpid
;
viewer
->
ShowModal
(
&
fpid
);
viewer
->
ShowModal
(
&
fpid
,
this
);
//DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );)
...
...
@@ -274,7 +274,6 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
GetBoard
()
->
m_Status_Pcb
=
0
;
// Put it on FRONT layer,
// (Can be stored flipped if the lib is an archive built from a board)
if
(
module
->
IsFlipped
()
)
...
...
@@ -316,7 +315,7 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId )
MODULE
*
PCB_BASE_FRAME
::
loadFootprint
(
const
FPID
&
aFootprintId
)
throw
(
IO_ERROR
,
PARSE_ERROR
)
{
FP_LIB_TABLE
*
fptbl
=
FootprintLibs
();
FP_LIB_TABLE
*
fptbl
=
Prj
().
Pcb
FootprintLibs
();
wxCHECK_MSG
(
fptbl
,
NULL
,
wxT
(
"Cannot look up FPID in NULL FP_LIB_TABLE."
)
);
...
...
pcbnew/modedit.cpp
View file @
d6fd8b2e
...
...
@@ -491,7 +491,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Clear_Pcb
(
true
);
SetCrossHairPosition
(
wxPoint
(
0
,
0
)
);
LoadModuleFromLibrary
(
getLibNickName
(),
FootprintLibs
(),
true
);
LoadModuleFromLibrary
(
getLibNickName
(),
Prj
().
Pcb
FootprintLibs
(),
true
);
redraw
=
true
;
if
(
GetBoard
()
->
m_Modules
)
...
...
pcbnew/moduleframe.cpp
View file @
d6fd8b2e
...
...
@@ -31,7 +31,7 @@
#include <fctsys.h>
#include <pgm_base.h>
//#include <kiface_i
.h>
#include <kiway
.h>
#include <project.h>
#include <class_drawpanel.h>
#include <confirm.h>
...
...
@@ -50,7 +50,6 @@
#include <hotkeys.h>
#include <module_editor_frame.h>
#include <wildcards_and_files_ext.h>
#include <kiway.h>
static
PCB_SCREEN
*
s_screenModule
;
// the PCB_SCREEN used by the footprint editor
...
...
@@ -275,7 +274,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath()
{
const
wxString
&
nickname
=
getLibNickName
();
const
FP_LIB_TABLE
::
ROW
*
row
=
FootprintLibs
()
->
FindRow
(
nickname
);
const
FP_LIB_TABLE
::
ROW
*
row
=
Prj
().
Pcb
FootprintLibs
()
->
FindRow
(
nickname
);
return
row
->
GetFullURI
(
true
);
}
...
...
@@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const
{
// get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD.
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
GetParent
();
// @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
Kiway
().
Player
(
FRAME_PCB
,
true
);
wxASSERT
(
parentFrame
);
...
...
@@ -308,7 +308,8 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
{
// set the BOARD_DESIGN_SETTINGS into parent editor, not our BOARD.
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
GetParent
();
// @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
Kiway
().
Player
(
FRAME_PCB
,
true
);
wxASSERT
(
parentFrame
);
...
...
@@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
{
// get the settings from the parent editor, not our BOARD.
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
GetParent
();
// @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
Kiway
().
Player
(
FRAME_PCB
,
true
);
wxASSERT
(
parentFrame
);
...
...
@@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
{
// set the settings into parent editor, not our BOARD.
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
GetParent
();
// @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME
*
parentFrame
=
(
PCB_BASE_FRAME
*
)
Kiway
().
Player
(
FRAME_PCB
,
true
);
wxASSERT
(
parentFrame
);
...
...
@@ -478,7 +481,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent
void
FOOTPRINT_EDIT_FRAME
::
OnUpdateSelectCurrentLib
(
wxUpdateUIEvent
&
aEvent
)
{
FP_LIB_TABLE
*
fptbl
=
FootprintLibs
();
FP_LIB_TABLE
*
fptbl
=
Prj
().
Pcb
FootprintLibs
();
aEvent
.
Enable
(
fptbl
&&
!
fptbl
->
IsEmpty
()
);
}
...
...
@@ -618,7 +621,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
{
try
{
bool
writable
=
FootprintLibs
()
->
IsFootprintLibWritable
(
nickname
);
bool
writable
=
Prj
().
Pcb
FootprintLibs
()
->
IsFootprintLibWritable
(
nickname
);
// no exception was thrown, this means libPath is valid, but it may be read only.
title
=
_
(
"Module Editor (active library: "
)
+
nickname
+
wxT
(
")"
);
...
...
pcbnew/modview_frame.cpp
View file @
d6fd8b2e
...
...
@@ -309,7 +309,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
{
m_libList
->
Clear
();
std
::
vector
<
wxString
>
nicknames
=
FootprintLibs
()
->
GetLogicalLibs
();
std
::
vector
<
wxString
>
nicknames
=
Prj
().
Pcb
FootprintLibs
()
->
GetLogicalLibs
();
for
(
unsigned
ii
=
0
;
ii
<
nicknames
.
size
();
ii
++
)
m_libList
->
Append
(
nicknames
[
ii
]
);
...
...
@@ -348,7 +348,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList()
FOOTPRINT_LIST
fp_info_list
;
fp_info_list
.
ReadFootprintFiles
(
FootprintLibs
(),
&
m_libraryName
);
fp_info_list
.
ReadFootprintFiles
(
Prj
().
Pcb
FootprintLibs
(),
&
m_libraryName
);
if
(
fp_info_list
.
GetErrorCount
()
)
{
...
...
@@ -509,7 +509,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
m_selectedFootprintName
.
Empty
();
// Ensure we have the right library list:
std
::
vector
<
wxString
>
libNicknames
=
FootprintLibs
()
->
GetLogicalLibs
();
std
::
vector
<
wxString
>
libNicknames
=
Prj
().
Pcb
FootprintLibs
()
->
GetLogicalLibs
();
if
(
libNicknames
.
size
()
==
m_libList
->
GetCount
()
)
{
...
...
@@ -742,13 +742,16 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
void
FOOTPRINT_VIEWER_FRAME
::
SelectCurrentFootprint
(
wxCommandEvent
&
event
)
{
#if 0 // cannot remember why this is here
// The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent,
// so use Kiway().Player() to fetch.
PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true );
(void*) parent;
#endif
wxString
libname
=
m_libraryName
+
wxT
(
"."
)
+
LegacyFootprintLibPathExtension
;
MODULE
*
oldmodule
=
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
LoadModuleFromLibrary
(
libname
,
parent
->
FootprintLibs
(),
false
);
MODULE
*
module
=
LoadModuleFromLibrary
(
libname
,
Prj
().
Pcb
FootprintLibs
(),
false
);
if
(
module
)
{
...
...
@@ -808,7 +811,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode )
// Delete the current footprint
GetBoard
()
->
m_Modules
.
DeleteAll
();
MODULE
*
footprint
=
FootprintLibs
()
->
FootprintLoad
(
m_libraryName
,
m_footprintName
);
MODULE
*
footprint
=
Prj
().
Pcb
FootprintLibs
()
->
FootprintLoad
(
m_libraryName
,
m_footprintName
);
if
(
footprint
)
GetBoard
()
->
Add
(
footprint
,
ADD_APPEND
);
...
...
pcbnew/netlist.cpp
View file @
d6fd8b2e
...
...
@@ -192,7 +192,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
MODULE
*
module
=
0
;
MODULE
*
fpOnBoard
;
if
(
aNetlist
.
IsEmpty
()
||
FootprintLibs
()
->
IsEmpty
()
)
if
(
aNetlist
.
IsEmpty
()
||
Prj
().
Pcb
FootprintLibs
()
->
IsEmpty
()
)
return
;
aNetlist
.
SortByFPID
();
...
...
pcbnew/onleftclick.cpp
View file @
d6fd8b2e
...
...
@@ -37,6 +37,7 @@
#include <class_board.h>
#include <class_zone.h>
#include <class_pcb_text.h>
#include <project.h>
#include <pcbnew.h>
#include <pcbnew_id.h>
...
...
@@ -355,7 +356,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{
m_canvas
->
MoveCursorToCrossHair
();
DrawStruct
=
(
BOARD_ITEM
*
)
LoadModuleFromLibrary
(
wxEmptyString
,
FootprintLibs
(),
true
,
aDC
);
wxEmptyString
,
Prj
().
Pcb
FootprintLibs
(),
true
,
aDC
);
SetCurItem
(
DrawStruct
);
...
...
pcbnew/pcbnew_config.cpp
View file @
d6fd8b2e
...
...
@@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
case
ID_PCB_LIB_TABLE_EDIT
:
{
bool
tableChanged
=
false
;
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
FootprintLibs
()
);
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
Prj
().
Pcb
FootprintLibs
()
);
if
(
r
&
1
)
{
...
...
@@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
try
{
FootprintLibs
()
->
Save
(
tblName
);
Prj
().
Pcb
FootprintLibs
()
->
Save
(
tblName
);
tableChanged
=
true
;
}
catch
(
const
IO_ERROR
&
ioe
)
...
...
@@ -259,18 +259,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
SetElementVisibility( RATSNEST_VISIBLE, showRats );
#endif
wxString
projectFpLibTableFileName
=
Prj
().
FootprintLibTblName
();
FootprintLibs
()
->
Clear
();
try
{
FootprintLibs
()
->
Load
(
projectFpLibTableFileName
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
DisplayError
(
this
,
ioe
.
errorText
);
}
Prj
().
ElemClear
(
PROJECT
::
ELEM_FPTBL
);
// Force it to be reloaded on demand.
// Load the page layout decr file, from the filename stored in
// BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
...
...
pcbnew/tools/drawing_tool.cpp
View file @
d6fd8b2e
...
...
@@ -27,6 +27,7 @@
#include "common_actions.h"
#include <wxPcbStruct.h>
#include <project.h>
#include <id.h>
#include <pcbnew_id.h>
#include <confirm.h>
...
...
@@ -711,7 +712,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
{
// Init the new item attributes
module
=
m_frame
->
LoadModuleFromLibrary
(
wxEmptyString
,
m_frame
->
FootprintLibs
(),
m_frame
->
Prj
().
Pcb
FootprintLibs
(),
true
,
NULL
);
if
(
module
==
NULL
)
continue
;
...
...
pcbnew/xchgmod.cpp
View file @
d6fd8b2e
...
...
@@ -38,6 +38,7 @@
#include <class_board.h>
#include <class_module.h>
#include <project.h>
#include <pcbnew.h>
#include <dialog_exchange_modules_base.h>
...
...
@@ -492,7 +493,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event )
wxString
newname
;
newname
=
m_parent
->
SelectFootprint
(
m_parent
,
wxEmptyString
,
wxEmptyString
,
wxEmptyString
,
m_parent
->
FootprintLibs
()
);
Prj
().
Pcb
FootprintLibs
()
);
if
(
newname
!=
wxEmptyString
)
m_NewModule
->
SetValue
(
newname
);
...
...
scripts/bom-in-python/round_value_robin.py
View file @
d6fd8b2e
...
...
@@ -30,7 +30,7 @@ def checkvalue(self):
if
v
.
isdigit
():
i
=
int
(
v
)
if
(
i
>
1000000
):
i
=
i
/
100000
i
=
i
/
100000
0
v
=
str
(
i
)
+
"M"
if
(
i
>
1000
):
i
=
i
/
1000
...
...
scripts/kicad-install.sh
View file @
d6fd8b2e
...
...
@@ -34,6 +34,17 @@
# Set where the 3 source trees will go, use a full path
WORKING_TREES
=
~/kicad_sources
STABLE
=
tag:pre-kiway
# currently the best mix of features and stabilty
TESTING
=
last:1
# the most recent
# Set this to STABLE or TESTING or other known revision number:
REVISION
=
$STABLE
# For info on revision syntax:
# $ bzr help revisionspec
# CMake Options
#OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF"
...
...
@@ -45,9 +56,6 @@ WORKING_TREES=~/kicad_sources
# https results in read only access.
REPOS
=
https://code.launchpad.net
# This is no longer maintained, is old
#LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only
# This branch is a bzr/launchpad import of the Git repository
# at https://github.com/KiCad/kicad-library.git.
# It has schematic parts and 3D models in it.
...
...
@@ -212,11 +220,11 @@ install_or_update()
echo
"step 3) checking out the source code from launchpad repo..."
if
[
!
-d
"
$WORKING_TREES
/kicad.bzr"
]
;
then
bzr checkout
$SRCS_REPO
kicad.bzr
bzr checkout
-r
$REVISION
$SRCS_REPO
kicad.bzr
echo
" source repo to local working tree."
else
cd
kicad.bzr
bzr up
bzr up
-r
$REVISION
echo
" local source working tree updated."
cd
../
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment