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
2ed804b8
Commit
2ed804b8
authored
May 12, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Plain Diff
Upstream merge.
parents
9536ed81
7dc8fc1f
Changes
60
Expand all
Show 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 @
2ed804b8
...
@@ -157,7 +157,7 @@ bool EDA_BASE_FRAME::Enable( bool enable )
...
@@ -157,7 +157,7 @@ bool EDA_BASE_FRAME::Enable( bool enable )
#if defined(DEBUG)
#if defined(DEBUG)
const
char
*
type_id
=
typeid
(
*
this
).
name
();
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
#endif
return
wxFrame
::
Enable
(
enable
);
return
wxFrame
::
Enable
(
enable
);
...
...
common/dialog_shim.cpp
View file @
2ed804b8
...
@@ -244,8 +244,12 @@ int DIALOG_SHIM::ShowQuasiModal()
...
@@ -244,8 +244,12 @@ int DIALOG_SHIM::ShowQuasiModal()
if
(
win
)
if
(
win
)
win
->
ReleaseMouse
();
win
->
ReleaseMouse
();
// Get the optimal parent
wxWindow
*
parent
=
GetParentForModalDialog
(
GetParent
(),
GetWindowStyle
()
);
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
ENABLE_DISABLE
toggle
(
parent
);
// quasi-modal: disable only my "optimal" parent
Show
(
true
);
Show
(
true
);
...
...
common/fp_lib_table.cpp
View file @
2ed804b8
...
@@ -137,6 +137,12 @@ FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
...
@@ -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
)
wxArrayString
FP_LIB_TABLE
::
FootprintEnumerate
(
const
wxString
&
aNickname
)
{
{
const
ROW
*
row
=
FindRow
(
aNickname
);
const
ROW
*
row
=
FindRow
(
aNickname
);
...
@@ -514,9 +520,16 @@ std::vector<wxString> FP_LIB_TABLE::GetLogicalLibs()
...
@@ -514,9 +520,16 @@ std::vector<wxString> FP_LIB_TABLE::GetLogicalLibs()
}
while
(
(
cur
=
cur
->
fallBack
)
!=
0
);
}
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
// 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
)
for
(
std
::
set
<
wxString
>::
const_iterator
it
=
unique
.
begin
();
it
!=
unique
.
end
();
++
it
)
{
//DBG(printf( " %s\n", TO_UTF8( *it ) );)
ret
.
push_back
(
*
it
);
ret
.
push_back
(
*
it
);
}
return
ret
;
return
ret
;
}
}
...
@@ -738,7 +751,7 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName()
...
@@ -738,7 +751,7 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName()
void
FP_LIB_TABLE
::
Load
(
const
wxString
&
aFileName
)
void
FP_LIB_TABLE
::
Load
(
const
wxString
&
aFileName
)
throw
(
IO_ERROR
)
throw
(
IO_ERROR
)
{
{
//
Empty footprint library tables are valid
.
//
It's OK if footprint library tables are missing
.
if
(
wxFileName
::
IsFileReadable
(
aFileName
)
)
if
(
wxFileName
::
IsFileReadable
(
aFileName
)
)
{
{
FILE_LINE_READER
reader
(
aFileName
);
FILE_LINE_READER
reader
(
aFileName
);
...
...
common/kiway.cpp
View file @
2ed804b8
...
@@ -53,7 +53,7 @@ KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ):
...
@@ -53,7 +53,7 @@ KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ):
// Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are
// 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
// m_top window should receive all wxWindowDestroyEvents originating from
// KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops
// KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops
// on that event stream looking for KIWAY_PLAYERs being closed.
// on that event stream looking for KIWAY_PLAYERs being closed.
...
@@ -67,10 +67,14 @@ void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event )
...
@@ -67,10 +67,14 @@ void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event )
// if destroying one of our flock, then mark it as deceased.
// if destroying one of our flock, then mark it as deceased.
if
(
(
wxWindow
*
)
m_player
[
i
]
==
w
)
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
;
m_player
[
i
]
=
0
;
}
}
}
}
// event.Skip(); skip to who, the wxApp? I'm the top window.
}
}
...
...
common/kiway_player.cpp
View file @
2ed804b8
...
@@ -45,7 +45,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType
...
@@ -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
),
EDA_BASE_FRAME
(
aParent
,
aFrameType
,
aTitle
,
aPos
,
aSize
,
aStyle
,
aWdoName
),
KIWAY_HOLDER
(
aKiway
),
KIWAY_HOLDER
(
aKiway
),
m_modal
(
false
),
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 );)
// 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
...
@@ -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
),
EDA_BASE_FRAME
(
aParent
,
(
FRAME_T
)
aId
,
aTitle
,
aPos
,
aSize
,
aStyle
,
aWdoName
),
KIWAY_HOLDER
(
0
),
KIWAY_HOLDER
(
0
),
m_modal
(
false
),
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 );)
// DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
}
}
...
@@ -72,7 +72,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent )
...
@@ -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"
)
);
wxASSERT_MSG
(
IsModal
(),
wxT
(
"ShowModal() shouldn't be called on non-modal frame"
)
);
...
@@ -94,12 +94,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
...
@@ -94,12 +94,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
~
NULLER
()
{
m_what
=
0
;
}
// indeed, set it to NULL on destruction
~
NULLER
()
{
m_what
=
0
;
}
// indeed, set it to NULL on destruction
}
clear_this
(
(
void
*&
)
m_modal_loop
);
}
clear_this
(
(
void
*&
)
m_modal_loop
);
m_modal_resultant_parent
=
aResultantFocusWindow
;
Show
(
true
);
SetFocus
();
{
// exception safe way to disable all frames except the modal one,
// exception safe way to disable all frames except the modal one,
// re-enables only those that were disabled on exit
// re-enables only those that were disabled on exit
wxWindowDisabler
toggle
(
this
);
wxWindowDisabler
toggle
(
this
);
Show
(
true
);
WX_EVENT_LOOP
event_loop
;
WX_EVENT_LOOP
event_loop
;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
...
@@ -113,15 +117,38 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
...
@@ -113,15 +117,38 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
event_loop
.
Run
();
event_loop
.
Run
();
}
// End of scop for some variables.
// End nesting before setting focus below.
if
(
aResult
)
if
(
aResult
)
*
aResult
=
m_modal_string
;
*
aResult
=
m_modal_string
;
DBG
(
printf
(
"~%s: aResult:'%s' ret:%d
\n
"
,
DBG
(
printf
(
"~%s: aResult:'%s' ret:%d
\n
"
,
__func__
,
TO_UTF8
(
m_modal_string
),
m_modal_ret_val
);)
__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
;
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
()
bool
KIWAY_PLAYER
::
IsDismissed
()
{
{
...
...
common/project.cpp
View file @
2ed804b8
...
@@ -42,15 +42,22 @@ PROJECT::PROJECT()
...
@@ -42,15 +42,22 @@ PROJECT::PROJECT()
memset
(
m_elems
,
0
,
sizeof
(
m_elems
)
);
memset
(
m_elems
,
0
,
sizeof
(
m_elems
)
);
}
}
PROJECT
::~
PROJECT
()
void
PROJECT
::
ElemsClear
()
{
{
#if 1
// careful here, this should work, but the virtual destructor may not
// careful here, this may work, but the virtual destructor may not
// be in the same link image as PROJECT.
// be in the same link image as PROJECT.
for
(
unsigned
i
=
0
;
i
<
DIM
(
m_elems
);
++
i
)
for
(
unsigned
i
=
0
;
i
<
DIM
(
m_elems
);
++
i
)
{
delete
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 )
...
@@ -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
)
return
m_elems
[
aIndex
];
m_elems
[
ndx
]
=
aElem
;
return
m_elems
[
ndx
];
}
}
return
NULL
;
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.
// non-member so it can be moved easily, and kept REALLY private.
// Do NOT Clear() in here.
// Do NOT Clear() in here.
static
void
add_search_paths
(
SEARCH_STACK
*
aDst
,
wxConfigBase
*
aCfg
,
int
aIndex
)
static
void
add_search_paths
(
SEARCH_STACK
*
aDst
,
wxConfigBase
*
aCfg
,
int
aIndex
)
...
...
cvpcb/CMakeLists.txt
View file @
2ed804b8
...
@@ -100,7 +100,6 @@ if( USE_KIWAY_DLLS )
...
@@ -100,7 +100,6 @@ if( USE_KIWAY_DLLS )
cvpcb.cpp
cvpcb.cpp
${
CVPCB_SRCS
}
${
CVPCB_SRCS
}
${
CVPCB_DIALOGS
}
${
CVPCB_DIALOGS
}
# ${CVPCB_RESOURCES}
)
)
set_target_properties
(
cvpcb_kiface PROPERTIES
set_target_properties
(
cvpcb_kiface PROPERTIES
OUTPUT_NAME cvpcb
OUTPUT_NAME cvpcb
...
@@ -148,12 +147,6 @@ if( USE_KIWAY_DLLS )
...
@@ -148,12 +147,6 @@ if( USE_KIWAY_DLLS )
target_link_libraries
(
cvpcb_kiface rt
)
target_link_libraries
(
cvpcb_kiface rt
)
endif
()
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
set_source_files_properties
(
cvpcb.cpp PROPERTIES
# The KIFACE is in cvpcb.cpp, export it:
# The KIFACE is in cvpcb.cpp, export it:
COMPILE_DEFINITIONS
"BUILD_KIWAY_DLL;COMPILING_DLL"
COMPILE_DEFINITIONS
"BUILD_KIWAY_DLL;COMPILING_DLL"
...
@@ -172,18 +165,16 @@ if( USE_KIWAY_DLLS )
...
@@ -172,18 +165,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
# 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
install
(
TARGETS cvpcb_kiface
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
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"
)
endif
()
endif
()
else
()
else
()
...
@@ -228,15 +219,15 @@ else()
...
@@ -228,15 +219,15 @@ else()
# Must follow github_plugin
# Must follow github_plugin
target_link_libraries
(
cvpcb
${
Boost_LIBRARIES
}
)
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
install
(
TARGETS cvpcb
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
endif
()
if
(
APPLE
)
set_target_properties
(
cvpcb PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
endif
()
cvpcb/cfg.cpp
View file @
2ed804b8
...
@@ -81,23 +81,8 @@ void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName )
...
@@ -81,23 +81,8 @@ void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName )
if
(
m_NetlistFileExtension
.
IsEmpty
()
)
if
(
m_NetlistFileExtension
.
IsEmpty
()
)
m_NetlistFileExtension
=
wxT
(
"net"
);
m_NetlistFileExtension
=
wxT
(
"net"
);
// empty the table, Load() it again below.
// Force it to be loaded on demand.
FootprintLibs
()
->
Clear
();
prj
.
ElemClear
(
PROJECT
::
ELEM_FPTBL
);
/* 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
);
}
}
}
...
...
cvpcb/class_DisplayFootprintsFrame.cpp
View file @
2ed804b8
...
@@ -488,7 +488,8 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName )
...
@@ -488,7 +488,8 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName )
wxLogDebug
(
wxT
(
"Load footprint <%s> from library <%s>."
),
wxLogDebug
(
wxT
(
"Load footprint <%s> from library <%s>."
),
fpname
.
c_str
(),
nickname
.
c_str
()
);
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
)
catch
(
const
IO_ERROR
&
ioe
)
{
{
...
...
cvpcb/class_library_listbox.cpp
View file @
2ed804b8
...
@@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList )
...
@@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList )
{
{
RefreshItems
(
0L
,
m_libraryList
.
Count
()
-
1
);
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
// @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
// 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
// ellipsizing long strings down to a few characters. It still doesn't set
...
...
cvpcb/cvframe.cpp
View file @
2ed804b8
...
@@ -200,24 +200,6 @@ CVPCB_MAINFRAME::~CVPCB_MAINFRAME()
...
@@ -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
)
void
CVPCB_MAINFRAME
::
LoadSettings
(
wxConfigBase
*
aCfg
)
{
{
EDA_BASE_FRAME
::
LoadSettings
(
aCfg
);
EDA_BASE_FRAME
::
LoadSettings
(
aCfg
);
...
@@ -493,7 +475,7 @@ void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event )
...
@@ -493,7 +475,7 @@ void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event )
void
CVPCB_MAINFRAME
::
OnEditFootprintLibraryTable
(
wxCommandEvent
&
aEvent
)
void
CVPCB_MAINFRAME
::
OnEditFootprintLibraryTable
(
wxCommandEvent
&
aEvent
)
{
{
bool
tableChanged
=
false
;
bool
tableChanged
=
false
;
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
FootprintLibs
()
);
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
Prj
().
Pcb
FootprintLibs
()
);
if
(
r
&
1
)
if
(
r
&
1
)
{
{
...
@@ -521,7 +503,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
...
@@ -521,7 +503,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
try
try
{
{
FootprintLibs
()
->
Save
(
fileName
);
Prj
().
Pcb
FootprintLibs
()
->
Save
(
fileName
);
tableChanged
=
true
;
tableChanged
=
true
;
}
}
catch
(
const
IO_ERROR
&
ioe
)
catch
(
const
IO_ERROR
&
ioe
)
...
@@ -538,7 +520,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
...
@@ -538,7 +520,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
if
(
tableChanged
)
if
(
tableChanged
)
{
{
BuildLIBRARY_LISTBOX
();
BuildLIBRARY_LISTBOX
();
m_footprints
.
ReadFootprintFiles
(
FootprintLibs
()
);
m_footprints
.
ReadFootprintFiles
(
Prj
().
Pcb
FootprintLibs
()
);
}
}
}
}
...
@@ -735,7 +717,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
...
@@ -735,7 +717,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
bool
CVPCB_MAINFRAME
::
LoadFootprintFiles
()
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.
// Check if there are footprint libraries in the footprint library table.
if
(
!
fptbl
||
!
fptbl
->
GetLogicalLibs
().
size
()
)
if
(
!
fptbl
||
!
fptbl
->
GetLogicalLibs
().
size
()
)
...
@@ -1012,11 +994,13 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX()
...
@@ -1012,11 +994,13 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX()
wxFONTWEIGHT_NORMAL
)
);
wxFONTWEIGHT_NORMAL
)
);
}
}
if
(
FootprintLibs
()
)
FP_LIB_TABLE
*
tbl
=
Prj
().
PcbFootprintLibs
();
if
(
tbl
)
{
{
wxArrayString
libNames
;
wxArrayString
libNames
;
std
::
vector
<
wxString
>
libNickNames
=
FootprintLibs
()
->
GetLogicalLibs
();
std
::
vector
<
wxString
>
libNickNames
=
tbl
->
GetLogicalLibs
();
for
(
unsigned
ii
=
0
;
ii
<
libNickNames
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
libNickNames
.
size
();
ii
++
)
libNames
.
Add
(
libNickNames
[
ii
]
);
libNames
.
Add
(
libNickNames
[
ii
]
);
...
...
cvpcb/cvpcb_mainframe.h
View file @
2ed804b8
...
@@ -88,12 +88,6 @@ public:
...
@@ -88,12 +88,6 @@ public:
bool
OpenProjectFiles
(
const
std
::
vector
<
wxString
>&
aFileSet
,
int
aCtl
=
0
);
// overload KIWAY_PLAYER
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
* @return a pointer on the Footprint Viewer frame, if exists, or NULL
*/
*/
...
...
cvpcb/readwrite_dlgs.cpp
View file @
2ed804b8
This diff is collapsed.
Click to expand it.
eeschema/CMakeLists.txt
View file @
2ed804b8
...
@@ -311,20 +311,18 @@ if( USE_KIWAY_DLLS )
...
@@ -311,20 +311,18 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
# 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
install
(
TARGETS eeschema_kiface
# actual filename subject to change at milestone C)
# actual filename subject to change at milestone C)
# modular-kicad blueprint.
# modular-kicad blueprint.
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
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"
)
endif
()
endif
()
else
()
else
()
...
...
eeschema/Info.plist
View file @
2ed804b8
...
@@ -5,51 +5,33 @@
...
@@ -5,51 +5,33 @@
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
sch
<
/string
>
<
string
>
sch
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
eeschema
document
<
/string
>
<
string
>
eeschema
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
eeschema
<
/string
>
<
string
>
eeschema
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
eeschema.icns
<
/string
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.eeschema
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
string
>
eeschema.icns
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
EESchema
<
/string
>
<
string
>
org.kicad-eda.eeschema
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
string
>
EESchema
<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
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
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
2ed804b8
...
@@ -436,13 +436,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven
...
@@ -436,13 +436,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven
void
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
showButtonHandler
(
wxCommandEvent
&
event
)
void
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
showButtonHandler
(
wxCommandEvent
&
event
)
{
{
#if 0
wxString datasheet_uri = fieldValueTextCtrl->GetValue();
::wxLaunchDefaultBrowser( datasheet_uri );
#else
unsigned
fieldNdx
=
getSelectedFieldNdx
();
unsigned
fieldNdx
=
getSelectedFieldNdx
();
if
(
fieldNdx
==
DATASHEET
)
if
(
fieldNdx
==
DATASHEET
)
{
{
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
...
@@ -455,17 +450,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even
...
@@ -455,17 +450,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even
KIWAY_PLAYER
*
frame
=
Kiway
().
Player
(
FRAME_PCB_MODULE_VIEWER_MODAL
,
true
);
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
);
fieldValueTextCtrl
->
SetValue
(
fpid
);
}
}
frame
->
Destroy
();
frame
->
Destroy
();
}
}
#endif
}
}
...
@@ -771,8 +763,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
...
@@ -771,8 +763,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
else
else
m_show_datasheet_button
->
SetLabel
(
wxEmptyString
);
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
// For power symbols, the value is NOR editable, because value and pin
// name must be same and can be edited only in library editor
// name must be same and can be edited only in library editor
if
(
fieldNdx
==
VALUE
&&
m_LibEntry
&&
m_LibEntry
->
IsPower
()
)
if
(
fieldNdx
==
VALUE
&&
m_LibEntry
&&
m_LibEntry
->
IsPower
()
)
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
2ed804b8
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <fctsys.h>
#include <fctsys.h>
#include <pgm_base.h>
#include <pgm_base.h>
#include <kiway.h>
#include <confirm.h>
#include <confirm.h>
#include <class_drawpanel.h>
#include <class_drawpanel.h>
#include <wxEeschemaStruct.h>
#include <wxEeschemaStruct.h>
...
@@ -141,7 +142,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
...
@@ -141,7 +142,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
dlg
(
this
,
m_component
);
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
dlg
(
this
,
m_component
);
int
abort
=
dlg
.
ShowModal
();
int
abort
=
dlg
.
Show
Quasi
Modal
();
if
(
abort
)
if
(
abort
)
return
;
return
;
...
@@ -211,7 +212,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnListItemSelected( wxListEvent& event
...
@@ -211,7 +212,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnListItemSelected( wxListEvent& event
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
OnCancelButtonClick
(
wxCommandEvent
&
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
...
@@ -282,7 +283,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event
m_parent
->
OnModify
();
m_parent
->
OnModify
();
EndModal
(
0
);
End
Quasi
Modal
(
0
);
}
}
...
@@ -381,8 +382,28 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e
...
@@ -381,8 +382,28 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
showButtonHandler
(
wxCommandEvent
&
event
)
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
showButtonHandler
(
wxCommandEvent
&
event
)
{
{
unsigned
fieldNdx
=
getSelectedFieldNdx
();
if
(
fieldNdx
==
DATASHEET
)
{
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
wxString
datasheet_uri
=
fieldValueTextCtrl
->
GetValue
();
::
wxLaunchDefaultBrowser
(
datasheet_uri
);
::
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()
...
@@ -652,7 +673,14 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
textSizeTextCtrl
->
SetValue
(
EDA_GRAPHIC_TEXT_CTRL
::
FormatSize
(
g_UserUnit
,
field
.
GetSize
().
x
)
);
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
coord
=
field
.
GetTextPosition
();
wxPoint
zero
;
wxPoint
zero
;
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
View file @
2ed804b8
...
@@ -9,7 +9,7 @@
...
@@ -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
);
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
View file @
2ed804b8
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<property
name=
"pos"
></property>
<property
name=
"pos"
></property>
<property
name=
"size"
>
-1,-1
</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=
"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=
"title"
>
Field Properties
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_extra_style"
></property>
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
View file @
2ed804b8
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
#include <wx/artprov.h>
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include <wx/listctrl.h>
#include <wx/listctrl.h>
#include <wx/gdicmn.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/font.h>
...
@@ -33,7 +36,7 @@
...
@@ -33,7 +36,7 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
/// 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
:
private
:
...
...
eeschema/eeschema.cpp
View file @
2ed804b8
...
@@ -99,8 +99,7 @@ static struct IFACE : public KIFACE_I
...
@@ -99,8 +99,7 @@ static struct IFACE : public KIFACE_I
case
FRAME_SCH_LIB_EDITOR
:
case
FRAME_SCH_LIB_EDITOR
:
{
{
LIB_EDIT_FRAME
*
frame
=
new
LIB_EDIT_FRAME
(
aKiway
,
LIB_EDIT_FRAME
*
frame
=
new
LIB_EDIT_FRAME
(
aKiway
,
aParent
);
dynamic_cast
<
SCH_EDIT_FRAME
*>
(
aParent
)
);
return
frame
;
return
frame
;
}
}
break
;
break
;
...
...
eeschema/getpart.cpp
View file @
2ed804b8
...
@@ -79,7 +79,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA
...
@@ -79,7 +79,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA
wxString
cmpname
;
wxString
cmpname
;
if
(
viewlibFrame
->
ShowModal
(
&
cmpname
)
)
if
(
viewlibFrame
->
ShowModal
(
&
cmpname
,
this
)
)
{
{
if
(
aUnit
)
if
(
aUnit
)
*
aUnit
=
viewlibFrame
->
GetUnit
();
*
aUnit
=
viewlibFrame
->
GetUnit
();
...
...
eeschema/libeditframe.cpp
View file @
2ed804b8
...
@@ -187,7 +187,7 @@ END_EVENT_TABLE()
...
@@ -187,7 +187,7 @@ END_EVENT_TABLE()
#define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" )
#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"
),
SCH_BASE_FRAME
(
aKiway
,
aParent
,
FRAME_SCH_LIB_EDITOR
,
_
(
"Library Editor"
),
wxDefaultPosition
,
wxDefaultSize
,
KICAD_DEFAULT_DRAWFRAME_STYLE
,
GetLibEditFrameName
()
)
wxDefaultPosition
,
wxDefaultSize
,
KICAD_DEFAULT_DRAWFRAME_STYLE
,
GetLibEditFrameName
()
)
{
{
...
...
eeschema/libeditframe.h
View file @
2ed804b8
...
@@ -122,7 +122,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME
...
@@ -122,7 +122,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME
public
:
public
:
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
SCH_EDIT_FRAME
*
aParent
);
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
);
~
LIB_EDIT_FRAME
();
~
LIB_EDIT_FRAME
();
...
...
eeschema/schframe.cpp
View file @
2ed804b8
...
@@ -101,6 +101,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
...
@@ -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_LIBVIEW
,
SCH_EDIT_FRAME
::
OnOpenLibraryViewer
)
EVT_TOOL
(
ID_TO_PCB
,
SCH_EDIT_FRAME
::
OnOpenPcbnew
)
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_TO_CVPCB
,
SCH_EDIT_FRAME
::
OnOpenCvpcb
)
EVT_TOOL
(
ID_SHEET_SET
,
EDA_DRAW_FRAME
::
Process_PageSettings
)
EVT_TOOL
(
ID_SHEET_SET
,
EDA_DRAW_FRAME
::
Process_PageSettings
)
...
@@ -794,6 +796,22 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event )
...
@@ -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
)
void
SCH_EDIT_FRAME
::
OnOpenCvpcb
(
wxCommandEvent
&
event
)
{
{
wxFileName
fn
=
g_RootSheet
->
GetScreen
()
->
GetFileName
();
wxFileName
fn
=
g_RootSheet
->
GetScreen
()
->
GetFileName
();
...
...
eeschema/tool_sch.cpp
View file @
2ed804b8
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <fctsys.h>
#include <fctsys.h>
#include <class_drawpanel.h>
#include <class_drawpanel.h>
#include <wxEeschemaStruct.h>
#include <wxEeschemaStruct.h>
#include <kiface_i.h>
#include <general.h>
#include <general.h>
#include <hotkeys.h>
#include <hotkeys.h>
...
@@ -139,10 +140,8 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
...
@@ -139,10 +140,8 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar
->
AddTool
(
ID_TO_LIBVIEW
,
wxEmptyString
,
KiBitmap
(
library_browse_xpm
),
m_mainToolBar
->
AddTool
(
ID_TO_LIBVIEW
,
wxEmptyString
,
KiBitmap
(
library_browse_xpm
),
HELP_RUN_LIB_VIEWER
);
HELP_RUN_LIB_VIEWER
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_GET_ANNOTATE
,
wxEmptyString
,
KiBitmap
(
annotate_xpm
),
m_mainToolBar
->
AddTool
(
ID_GET_ANNOTATE
,
wxEmptyString
,
KiBitmap
(
annotate_xpm
),
HELP_ANNOTATE
);
HELP_ANNOTATE
);
...
@@ -158,6 +157,13 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
...
@@ -158,6 +157,13 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar
->
AddSeparator
();
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
),
m_mainToolBar
->
AddTool
(
ID_TO_CVPCB
,
wxEmptyString
,
KiBitmap
(
cvpcb_xpm
),
_
(
"Run CvPcb to associate components and footprints"
)
);
_
(
"Run CvPcb to associate components and footprints"
)
);
...
...
eeschema/viewlib_frame.h
View file @
2ed804b8
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <sch_base_frame.h>
#include <sch_base_frame.h>
#include <class_sch_screen.h>
#include <class_sch_screen.h>
class
wxSashLayoutWindow
;
class
wxListBox
;
class
wxListBox
;
class
CMP_LIBRARY
;
class
CMP_LIBRARY
;
...
...
gerbview/CMakeLists.txt
View file @
2ed804b8
...
@@ -81,11 +81,11 @@ endif()
...
@@ -81,11 +81,11 @@ endif()
if
(
APPLE
)
if
(
APPLE
)
set
(
GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns
)
set
(
GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns
)
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/gerbview.icns"
PROPERTIES
set_source_files_properties
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/gerbview.icns"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
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
MACOSX_PACKAGE_LOCATION Resources
)
)
set
(
MACOSX_BUNDLE_ICON_FILE gerbview.icns
)
set
(
MACOSX_BUNDLE_ICON_FILE gerbview.icns
)
...
@@ -120,7 +120,6 @@ if( USE_KIWAY_DLLS )
...
@@ -120,7 +120,6 @@ if( USE_KIWAY_DLLS )
${
GERBVIEW_SRCS
}
${
GERBVIEW_SRCS
}
${
DIALOGS_SRCS
}
${
DIALOGS_SRCS
}
${
GERBVIEW_EXTRA_SRCS
}
${
GERBVIEW_EXTRA_SRCS
}
# ${GERBVIEW_RESOURCES}
)
)
set_target_properties
(
gerbview_kiface PROPERTIES
set_target_properties
(
gerbview_kiface PROPERTIES
OUTPUT_NAME gerbview
OUTPUT_NAME gerbview
...
@@ -152,18 +151,16 @@ if( USE_KIWAY_DLLS )
...
@@ -152,18 +151,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
# 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
install
(
TARGETS gerbview_kiface
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
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"
)
endif
()
endif
()
else
()
else
()
...
@@ -194,5 +191,3 @@ if( APPLE )
...
@@ -194,5 +191,3 @@ if( APPLE )
set_target_properties
(
gerbview PROPERTIES
set_target_properties
(
gerbview PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
endif
()
gerbview/Info.plist
View file @
2ed804b8
...
@@ -27,47 +27,29 @@
...
@@ -27,47 +27,29 @@
<
string
>
pho
<
/string
>
<
string
>
pho
<
/string
>
<
string
>
drl
<
/string
>
<
string
>
drl
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
gerbview_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
gerbview_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
gerbview
document
<
/string
>
<
string
>
gerbview
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Default
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Viewer
<
/string
>
<
string
>
Default
<
/string
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Viewer
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
gerbview
<
/string
>
<
string
>
gerbview
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
gerbview.icns
<
/string
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.gerbview
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
string
>
gerbview.icns
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
GerbView
<
/string
>
<
string
>
org.kicad-eda.gerbview
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
string
>
GerbView
<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
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
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
include/common.h
View file @
2ed804b8
...
@@ -102,7 +102,7 @@ enum pseudokeys {
...
@@ -102,7 +102,7 @@ enum pseudokeys {
#define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" )
#define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" )
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" )
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" )
#define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" )
#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
#endif
#endif
...
...
include/fp_lib_table.h
View file @
2ed804b8
...
@@ -270,6 +270,8 @@ public:
...
@@ -270,6 +270,8 @@ public:
*/
*/
FP_LIB_TABLE
(
FP_LIB_TABLE
*
aFallBackTable
=
NULL
);
FP_LIB_TABLE
(
FP_LIB_TABLE
*
aFallBackTable
=
NULL
);
~
FP_LIB_TABLE
();
/// Delete all rows.
/// Delete all rows.
void
Clear
()
void
Clear
()
{
{
...
...
include/id.h
View file @
2ed804b8
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
enum
main_id
enum
main_id
{
{
ID_TO_PCB
=
wxID_HIGHEST
,
ID_TO_PCB
=
wxID_HIGHEST
,
ID_TO_PCB_MODULE_EDITOR
,
ID_TO_CVPCB
,
ID_TO_CVPCB
,
ID_LOAD_PROJECT
,
ID_LOAD_PROJECT
,
ID_APPEND_PROJECT
,
ID_APPEND_PROJECT
,
...
...
include/kiway_player.h
View file @
2ed804b8
...
@@ -185,11 +185,12 @@ public:
...
@@ -185,11 +185,12 @@ public:
* event which ends the modal behavior.
* event which ends the modal behavior.
*
*
* @param aResult if not NULL, indicates a place to put a resultant string.
* @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()
* @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal()
* with aRetVal of true.
* with aRetVal of true.
*/
*/
VTBL_ENTRY
bool
ShowModal
(
wxString
*
aResult
=
NULL
);
VTBL_ENTRY
bool
ShowModal
(
wxString
*
aResult
=
NULL
,
wxWindow
*
aResultantFocusWindow
=
NULL
);
//----</Cross Module API>----------------------------------------------------
//----</Cross Module API>----------------------------------------------------
...
@@ -201,6 +202,11 @@ public:
...
@@ -201,6 +202,11 @@ public:
*/
*/
virtual
void
KiwayMailIn
(
KIWAY_EXPRESS
&
aEvent
);
virtual
void
KiwayMailIn
(
KIWAY_EXPRESS
&
aEvent
);
/**
* Our version of Destroy() which is virtual from wxWidgets
*/
bool
Destroy
();
protected
:
protected
:
bool
IsModal
()
{
return
m_modal
;
}
bool
IsModal
()
{
return
m_modal
;
}
...
@@ -228,6 +234,7 @@ protected:
...
@@ -228,6 +234,7 @@ protected:
// variables for modal behavior support, only used by a few derivatives.
// variables for modal behavior support, only used by a few derivatives.
bool
m_modal
;
// true if frame is intended to be modal, not modeless
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
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
;
wxString
m_modal_string
;
bool
m_modal_ret_val
;
// true if a selection was made
bool
m_modal_ret_val
;
// true if a selection was made
...
...
include/project.h
View file @
2ed804b8
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
class
wxConfigBase
;
class
wxConfigBase
;
class
PARAM_CFG_ARRAY
;
class
PARAM_CFG_ARRAY
;
class
FP_LIB_TABLE
;
#define VTBL_ENTRY virtual
#define VTBL_ENTRY virtual
...
@@ -49,11 +49,12 @@ class PROJECT
...
@@ -49,11 +49,12 @@ class PROJECT
{
{
public
:
public
:
/// Derive PROJECT elements from this, it has a virtual destructor, and
/// A PROJECT can hold stuff it knows nothing about, in the form of
/// Elem*() functions can work with it. Implementation is opaque in
/// _ELEM derivatives. Derive PROJECT elements from this, it has a virtual
/// class PROJECT. If find you have to include derived class headers in this
/// destructor, and Elem*() functions can work with it. Implementation is
/// file, you are doing something wrong. Keep knowledge of derived classes
/// opaque in class PROJECT. If find you have to include derived class headers
/// opaque to class PROJECT please.
/// 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
class
_ELEM
{
{
public
:
public
:
...
@@ -63,6 +64,8 @@ public:
...
@@ -63,6 +64,8 @@ public:
PROJECT
();
PROJECT
();
~
PROJECT
();
~
PROJECT
();
//-----<Cross Module API>----------------------------------------------------
// VTBL_ENTRY bool MaybeLoadProjectSettings( const std::vector<wxString>& aFileSet );
// VTBL_ENTRY bool MaybeLoadProjectSettings( const std::vector<wxString>& aFileSet );
/**
/**
...
@@ -154,18 +157,12 @@ public:
...
@@ -154,18 +157,12 @@ public:
*/
*/
enum
ELEM_T
enum
ELEM_T
{
{
FPTBL
,
ELEM_
FPTBL
,
ELEM_COUNT
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.
* Typically wrapped somewhere else in a more meaningful function wrapper.
* This is a cross module API, therefore the _ELEM destructor is virtual and
* 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
* can point to a destructor function in another link image. Be careful that
...
@@ -174,7 +171,47 @@ public:
...
@@ -174,7 +171,47 @@ public:
* Summary: 1) cross module API, 2) PROJECT knows nothing about _ELEM objects,
* Summary: 1) cross module API, 2) PROJECT knows nothing about _ELEM objects,
* except how to delete them and set and get pointers to them.
* 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
:
private
:
...
@@ -215,10 +252,6 @@ private:
...
@@ -215,10 +252,6 @@ private:
//-----<possible futures>---------------------------------------------------------
//-----<possible futures>---------------------------------------------------------
#if 0
#if 0
VTBL_ENTRY int ElemAllocNdx();
VTBL_ENTRY void ElemSet( int aIndex, ELEMENT_BASE* aBlock );
VTBL_ENTRY ELEM_BASE* ElemGet( int aIndex )
/**
/**
* Function Value
* Function Value
* fetches a project variable @a aVariable and returns true if that variable was
* fetches a project variable @a aVariable and returns true if that variable was
...
...
include/wxBasePcbFrame.h
View file @
2ed804b8
...
@@ -103,7 +103,7 @@ protected:
...
@@ -103,7 +103,7 @@ protected:
*
*
* @param aFootprintId is the #FPID of component footprint to load.
* @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
* @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
* @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error
* occurs while reading footprint library files.
* occurs while reading footprint library files.
*/
*/
...
@@ -127,7 +127,7 @@ public:
...
@@ -127,7 +127,7 @@ public:
*
*
* @param aFootprintId is the #FPID of component footprint to load.
* @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
* @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
);
MODULE
*
LoadFootprint
(
const
FPID
&
aFootprintId
);
...
@@ -463,12 +463,6 @@ public:
...
@@ -463,12 +463,6 @@ public:
*/
*/
wxString
SelectFootprintFromLibBrowser
();
wxString
SelectFootprintFromLibBrowser
();
/**
* Function FootprintLibs
* @return the project #FP_LIB_TABLE.
*/
FP_LIB_TABLE
*
FootprintLibs
()
const
;
// ratsnest functions
// ratsnest functions
/**
/**
* Function Compile_Ratsnest
* Function Compile_Ratsnest
...
...
include/wxEeschemaStruct.h
View file @
2ed804b8
...
@@ -368,7 +368,7 @@ public:
...
@@ -368,7 +368,7 @@ public:
*/
*/
virtual
void
ExecuteRemoteCommand
(
const
char
*
cmdline
);
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
OnLeftClick
(
wxDC
*
aDC
,
const
wxPoint
&
aPosition
);
void
OnLeftDClick
(
wxDC
*
aDC
,
const
wxPoint
&
aPosition
);
void
OnLeftDClick
(
wxDC
*
aDC
,
const
wxPoint
&
aPosition
);
...
@@ -793,6 +793,7 @@ private:
...
@@ -793,6 +793,7 @@ private:
void
OnLoadProject
(
wxCommandEvent
&
event
);
void
OnLoadProject
(
wxCommandEvent
&
event
);
void
OnAppendProject
(
wxCommandEvent
&
event
);
void
OnAppendProject
(
wxCommandEvent
&
event
);
void
OnOpenPcbnew
(
wxCommandEvent
&
event
);
void
OnOpenPcbnew
(
wxCommandEvent
&
event
);
void
OnOpenPcbModuleEditor
(
wxCommandEvent
&
event
);
void
OnOpenCvpcb
(
wxCommandEvent
&
event
);
void
OnOpenCvpcb
(
wxCommandEvent
&
event
);
void
OnOpenLibraryEditor
(
wxCommandEvent
&
event
);
void
OnOpenLibraryEditor
(
wxCommandEvent
&
event
);
void
OnSetOptions
(
wxCommandEvent
&
event
);
void
OnSetOptions
(
wxCommandEvent
&
event
);
...
...
kicad/CMakeLists.txt
View file @
2ed804b8
...
@@ -57,6 +57,22 @@ if( UNIX )
...
@@ -57,6 +57,22 @@ if( UNIX )
endif
()
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
)
if
(
APPLE
)
set_target_properties
(
kicad PROPERTIES
set_target_properties
(
kicad PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
...
...
kicad/Info.plist
View file @
2ed804b8
...
@@ -5,51 +5,33 @@
...
@@ -5,51 +5,33 @@
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
kicad_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
kicad_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
pro
<
/string
>
<
string
>
pro
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
kicad
project
files
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
kicad
project
files
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
kicad
<
/string
>
<
string
>
kicad
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
kicad.icns
<
/string
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.kicad
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
string
>
kicad.icns
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
KiCad
<
/string
>
<
string
>
org.kicad-eda.kicad
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
string
>
KiCad
<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
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
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
pagelayout_editor/CMakeLists.txt
View file @
2ed804b8
...
@@ -49,7 +49,20 @@ set( PL_EDITOR_EXTRA_SRCS
...
@@ -49,7 +49,20 @@ set( PL_EDITOR_EXTRA_SRCS
if
(
MINGW
)
if
(
MINGW
)
# PL_EDITOR_RESOURCES variable is set by the macro.
# 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
()
endif
()
...
@@ -82,7 +95,6 @@ if( USE_KIWAY_DLLS )
...
@@ -82,7 +95,6 @@ if( USE_KIWAY_DLLS )
${
PL_EDITOR_SRCS
}
${
PL_EDITOR_SRCS
}
${
DIALOGS_SRCS
}
${
DIALOGS_SRCS
}
${
PL_EDITOR_EXTRA_SRCS
}
${
PL_EDITOR_EXTRA_SRCS
}
# ${PL_EDITOR_RESOURCES}
)
)
target_link_libraries
(
pl_editor_kiface
target_link_libraries
(
pl_editor_kiface
common
common
...
@@ -114,18 +126,16 @@ if( USE_KIWAY_DLLS )
...
@@ -114,18 +126,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
# 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
install
(
TARGETS pl_editor_kiface
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
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"
)
endif
()
endif
()
else
()
else
()
...
@@ -137,13 +147,6 @@ else()
...
@@ -137,13 +147,6 @@ else()
${
PL_EDITOR_EXTRA_SRCS
}
${
PL_EDITOR_EXTRA_SRCS
}
${
PL_EDITOR_RESOURCES
}
${
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
target_link_libraries
(
pl_editor
common
common
polygon
polygon
...
@@ -152,28 +155,15 @@ else()
...
@@ -152,28 +155,15 @@ else()
${
wxWidgets_LIBRARIES
}
${
wxWidgets_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
)
)
install
(
TARGETS pl_editor
install
(
TARGETS pl_editor
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
endif
()
endif
()
if
(
APPLE
)
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
set_target_properties
(
pl_editor PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
)
endif
()
endif
()
pagelayout_editor/Info.plist
View file @
2ed804b8
...
@@ -5,51 +5,33 @@
...
@@ -5,51 +5,33 @@
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
kicad_wks
<
/string
>
<
string
>
kicad_wks
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pl_editor
document
<
/string
>
<
string
>
pl_editor
document
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pl_editor
<
/string
>
<
string
>
pl_editor
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
pl_editor.icns
<
/string
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.pl_editor
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
string
>
pl_editor.icns
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
pl_editor
<
/string
>
<
string
>
org.kicad-eda.pl_editor
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
string
>
pl_editor
<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/string
>
<
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
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
pcb_calculator/CMakeLists.txt
View file @
2ed804b8
...
@@ -122,15 +122,16 @@ if( USE_KIWAY_DLLS )
...
@@ -122,15 +122,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
# 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
install
(
TARGETS pcb_calculator_kiface
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
set_target_properties
(
pcb_calculator PROPERTIES
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
()
endif
()
if
(
APPLE
)
if
(
APPLE
)
...
@@ -156,13 +157,6 @@ else()
...
@@ -156,13 +157,6 @@ else()
set_source_files_properties
(
pcb_calculator.cpp PROPERTIES
set_source_files_properties
(
pcb_calculator.cpp PROPERTIES
COMPILE_DEFINITIONS
"COMPILING_DLL"
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
target_link_libraries
(
pcb_calculator
common
common
bitmaps
bitmaps
...
@@ -175,3 +169,10 @@ else()
...
@@ -175,3 +169,10 @@ else()
)
)
endif
()
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 @
2ed804b8
...
@@ -594,18 +594,16 @@ if( USE_KIWAY_DLLS )
...
@@ -594,18 +594,16 @@ if( USE_KIWAY_DLLS )
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
COMPONENT binary
)
)
if
(
APPLE
)
# 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
install
(
TARGETS pcbnew_kiface
DESTINATION
${
KICAD_BIN
}
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
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"
)
endif
()
endif
()
else
()
# milestone A) kills this off:
else
()
# milestone A) kills this off:
...
@@ -768,3 +766,4 @@ if( false ) # haven't been used in years.
...
@@ -768,3 +766,4 @@ if( false ) # haven't been used in years.
)
)
target_link_libraries
(
layer_widget_test common
${
wxWidgets_LIBRARIES
}
)
target_link_libraries
(
layer_widget_test common
${
wxWidgets_LIBRARIES
}
)
endif
()
endif
()
pcbnew/Info.plist
View file @
2ed804b8
...
@@ -5,50 +5,33 @@
...
@@ -5,50 +5,33 @@
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pcbnew_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeIconFile
<
/k
e
y
>
<
string
>
pcbnew_doc.icns
<
/string
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
k
e
y
>
CFBundleTypeExtensions
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
kicad_pcb
<
/string
>
<
string
>
kicad_pcb
<
/string
>
<
string
>
brd
<
/string
>
<
string
>
brd
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pcbnew
board
<
/string
>
<
k
e
y
>
CFBundleTypeName
<
/k
e
y
>
<
string
>
pcbnew
board
<
/string
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
k
e
y
>
LSHandlerRank
<
/k
e
y
>
<
string
>
Owner
<
/string
>
<
string
>
Owner
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pcbnew
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
pcbnew
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
pcbnew.icns
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.kicad-eda.pcbnew
<
/string
>
<
string
>
pcbnew.icns
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
><
/string
>
<
string
>
org.kicad-eda.pcbnew
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
PCBNew
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
><
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
k
e
y
>
CSResourcesFileMapped
<
/k
e
y
>
<
tru
e
/
>
<
string
>
PCBNew
<
/string
>
<
k
e
y
>
LSRequiresCarbon
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
><
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
string
>
True
<
/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
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
pcbnew/basepcbframe.cpp
View file @
2ed804b8
...
@@ -175,10 +175,15 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME()
...
@@ -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
();
// This is a lazy loading function, it loads the project specific table when
FP_LIB_TABLE
*
tbl
=
dynamic_cast
<
FP_LIB_TABLE
*>
(
prj
.
Elem
(
PROJECT
::
FPTBL
)
);
// 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
)
if
(
!
tbl
)
{
{
...
@@ -187,7 +192,18 @@ FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const
...
@@ -187,7 +192,18 @@ FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const
// stack this way, all using the same global fallback table.
// stack this way, all using the same global fallback table.
tbl
=
new
FP_LIB_TABLE
(
&
GFootprintTable
);
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
;
return
tbl
;
...
...
pcbnew/class_track.cpp
View file @
2ed804b8
...
@@ -1231,7 +1231,7 @@ void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList )
...
@@ -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
);
return
TestSegmentHit
(
aPosition
,
m_Start
,
m_End
,
m_Width
/
2
);
}
}
...
...
pcbnew/class_track.h
View file @
2ed804b8
...
@@ -223,7 +223,7 @@ public:
...
@@ -223,7 +223,7 @@ public:
const
KICAD_T
scanTypes
[]
);
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,
/** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect,
* bool aContained = true, int aAccuracy ) const
* bool aContained = true, int aAccuracy ) const
...
...
pcbnew/clean.cpp
View file @
2ed804b8
This diff is collapsed.
Click to expand it.
pcbnew/files.cpp
View file @
2ed804b8
...
@@ -173,7 +173,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
...
@@ -173,7 +173,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
Clear_Pcb
(
true
);
Clear_Pcb
(
true
);
// Clear footprint library table for the new board.
// Clear footprint library table for the new board.
FootprintLibs
()
->
Clear
();
Prj
().
Pcb
FootprintLibs
()
->
Clear
();
wxFileName
fn
;
wxFileName
fn
;
...
@@ -603,7 +603,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
...
@@ -603,7 +603,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
return
false
;
return
false
;
// Save the project specific footprint library table.
// Save the project specific footprint library table.
if
(
!
FootprintLibs
()
->
IsEmpty
(
false
)
)
if
(
!
Prj
().
Pcb
FootprintLibs
()
->
IsEmpty
(
false
)
)
{
{
wxString
fp_lib_tbl
=
Prj
().
FootprintLibTblName
();
wxString
fp_lib_tbl
=
Prj
().
FootprintLibTblName
();
...
@@ -613,7 +613,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
...
@@ -613,7 +613,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
{
{
try
try
{
{
FootprintLibs
()
->
Save
(
fp_lib_tbl
);
Prj
().
Pcb
FootprintLibs
()
->
Save
(
fp_lib_tbl
);
}
}
catch
(
const
IO_ERROR
&
ioe
)
catch
(
const
IO_ERROR
&
ioe
)
{
{
...
...
pcbnew/librairi.cpp
View file @
2ed804b8
...
@@ -469,7 +469,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
...
@@ -469,7 +469,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
{
{
wxString
nickname
=
getLibNickName
();
wxString
nickname
=
getLibNickName
();
if
(
!
FootprintLibs
()
->
IsFootprintLibWritable
(
nickname
)
)
if
(
!
Prj
().
Pcb
FootprintLibs
()
->
IsFootprintLibWritable
(
nickname
)
)
{
{
wxString
msg
=
wxString
::
Format
(
wxString
msg
=
wxString
::
Format
(
_
(
"Library '%s' is read only"
),
_
(
"Library '%s' is read only"
),
...
@@ -481,7 +481,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
...
@@ -481,7 +481,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
}
}
wxString
fpid_txt
=
PCB_BASE_FRAME
::
SelectFootprint
(
this
,
nickname
,
wxString
fpid_txt
=
PCB_BASE_FRAME
::
SelectFootprint
(
this
,
nickname
,
wxEmptyString
,
wxEmptyString
,
FootprintLibs
()
);
wxEmptyString
,
wxEmptyString
,
Prj
().
Pcb
FootprintLibs
()
);
if
(
!
fpid_txt
)
if
(
!
fpid_txt
)
return
false
;
return
false
;
...
@@ -497,7 +497,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
...
@@ -497,7 +497,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary()
try
try
{
{
FootprintLibs
()
->
FootprintDelete
(
nickname
,
fpname
);
Prj
().
Pcb
FootprintLibs
()
->
FootprintDelete
(
nickname
,
fpname
);
}
}
catch
(
const
IO_ERROR
&
ioe
)
catch
(
const
IO_ERROR
&
ioe
)
{
{
...
@@ -545,22 +545,24 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly )
...
@@ -545,22 +545,24 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly )
try
try
{
{
FP_LIB_TABLE
*
tbl
=
Prj
().
PcbFootprintLibs
();
// Delete old library if we're replacing it entirely.
// Delete old library if we're replacing it entirely.
if
(
!
aNewModulesOnly
)
if
(
!
aNewModulesOnly
)
{
{
FootprintLibs
()
->
FootprintLibDelete
(
nickname
);
tbl
->
FootprintLibDelete
(
nickname
);
FootprintLibs
()
->
FootprintLibCreate
(
nickname
);
tbl
->
FootprintLibCreate
(
nickname
);
for
(
MODULE
*
m
=
GetBoard
()
->
m_Modules
;
m
;
m
=
m
->
Next
()
)
for
(
MODULE
*
m
=
GetBoard
()
->
m_Modules
;
m
;
m
=
m
->
Next
()
)
{
{
FootprintLibs
()
->
FootprintSave
(
nickname
,
m
,
true
);
tbl
->
FootprintSave
(
nickname
,
m
,
true
);
}
}
}
}
else
else
{
{
for
(
MODULE
*
m
=
GetBoard
()
->
m_Modules
;
m
;
m
=
m
->
Next
()
)
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)
// Check for request to stop backup (ESCAPE key actuated)
if
(
m_canvas
->
GetAbortRequest
()
)
if
(
m_canvas
->
GetAbortRequest
()
)
...
@@ -627,7 +629,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary,
...
@@ -627,7 +629,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary,
try
try
{
{
MODULE
*
m
=
FootprintLibs
()
->
FootprintLoad
(
aLibrary
,
footprintName
);
FP_LIB_TABLE
*
tbl
=
Prj
().
PcbFootprintLibs
();
MODULE
*
m
=
tbl
->
FootprintLoad
(
aLibrary
,
footprintName
);
if
(
m
)
if
(
m
)
{
{
...
@@ -653,7 +657,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary,
...
@@ -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
// this always overwrites any existing footprint, but should yell on its
// own if the library or footprint is not writable.
// own if the library or footprint is not writable.
FootprintLibs
()
->
FootprintSave
(
aLibrary
,
aModule
);
tbl
->
FootprintSave
(
aLibrary
,
aModule
);
}
}
catch
(
const
IO_ERROR
&
ioe
)
catch
(
const
IO_ERROR
&
ioe
)
{
{
...
@@ -738,7 +742,7 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting )
...
@@ -738,7 +742,7 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting )
headers
.
Add
(
_
(
"Nickname"
)
);
headers
.
Add
(
_
(
"Nickname"
)
);
headers
.
Add
(
_
(
"Description"
)
);
headers
.
Add
(
_
(
"Description"
)
);
FP_LIB_TABLE
*
fptbl
=
FootprintLibs
();
FP_LIB_TABLE
*
fptbl
=
Prj
().
Pcb
FootprintLibs
();
std
::
vector
<
wxArrayString
>
itemsToDisplay
;
std
::
vector
<
wxArrayString
>
itemsToDisplay
;
std
::
vector
<
wxString
>
nicknames
=
fptbl
->
GetLogicalLibs
();
std
::
vector
<
wxString
>
nicknames
=
fptbl
->
GetLogicalLibs
();
...
...
pcbnew/loadcmp.cpp
View file @
2ed804b8
...
@@ -135,7 +135,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser()
...
@@ -135,7 +135,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser()
wxString
fpid
;
wxString
fpid
;
viewer
->
ShowModal
(
&
fpid
);
viewer
->
ShowModal
(
&
fpid
,
this
);
//DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );)
//DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );)
...
@@ -274,7 +274,6 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
...
@@ -274,7 +274,6 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
GetBoard
()
->
m_Status_Pcb
=
0
;
GetBoard
()
->
m_Status_Pcb
=
0
;
// Put it on FRONT layer,
// Put it on FRONT layer,
// (Can be stored flipped if the lib is an archive built from a board)
// (Can be stored flipped if the lib is an archive built from a board)
if
(
module
->
IsFlipped
()
)
if
(
module
->
IsFlipped
()
)
...
@@ -316,7 +315,7 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId )
...
@@ -316,7 +315,7 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId )
MODULE
*
PCB_BASE_FRAME
::
loadFootprint
(
const
FPID
&
aFootprintId
)
MODULE
*
PCB_BASE_FRAME
::
loadFootprint
(
const
FPID
&
aFootprintId
)
throw
(
IO_ERROR
,
PARSE_ERROR
)
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."
)
);
wxCHECK_MSG
(
fptbl
,
NULL
,
wxT
(
"Cannot look up FPID in NULL FP_LIB_TABLE."
)
);
...
...
pcbnew/modedit.cpp
View file @
2ed804b8
...
@@ -491,7 +491,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -491,7 +491,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Clear_Pcb
(
true
);
Clear_Pcb
(
true
);
SetCrossHairPosition
(
wxPoint
(
0
,
0
)
);
SetCrossHairPosition
(
wxPoint
(
0
,
0
)
);
LoadModuleFromLibrary
(
getLibNickName
(),
FootprintLibs
(),
true
);
LoadModuleFromLibrary
(
getLibNickName
(),
Prj
().
Pcb
FootprintLibs
(),
true
);
redraw
=
true
;
redraw
=
true
;
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
...
...
pcbnew/moduleframe.cpp
View file @
2ed804b8
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#include <fctsys.h>
#include <fctsys.h>
#include <pgm_base.h>
#include <pgm_base.h>
//#include <kiface_i
.h>
#include <kiway
.h>
#include <project.h>
#include <project.h>
#include <class_drawpanel.h>
#include <class_drawpanel.h>
#include <confirm.h>
#include <confirm.h>
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
#include <hotkeys.h>
#include <hotkeys.h>
#include <module_editor_frame.h>
#include <module_editor_frame.h>
#include <wildcards_and_files_ext.h>
#include <wildcards_and_files_ext.h>
#include <kiway.h>
static
PCB_SCREEN
*
s_screenModule
;
// the PCB_SCREEN used by the footprint editor
static
PCB_SCREEN
*
s_screenModule
;
// the PCB_SCREEN used by the footprint editor
...
@@ -275,7 +274,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath()
...
@@ -275,7 +274,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath()
{
{
const
wxString
&
nickname
=
getLibNickName
();
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
);
return
row
->
GetFullURI
(
true
);
}
}
...
@@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const
...
@@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const
{
{
// get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD.
// 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
);
wxASSERT
(
parentFrame
);
...
@@ -308,7 +308,8 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
...
@@ -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.
// 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
);
wxASSERT
(
parentFrame
);
...
@@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
...
@@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
{
{
// get the settings from the parent editor, not our BOARD.
// 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
);
wxASSERT
(
parentFrame
);
...
@@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
...
@@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
{
{
// set the settings into parent editor, not our BOARD.
// 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
);
wxASSERT
(
parentFrame
);
...
@@ -478,7 +481,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent
...
@@ -478,7 +481,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent
void
FOOTPRINT_EDIT_FRAME
::
OnUpdateSelectCurrentLib
(
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
()
);
aEvent
.
Enable
(
fptbl
&&
!
fptbl
->
IsEmpty
()
);
}
}
...
@@ -618,7 +621,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
...
@@ -618,7 +621,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
{
{
try
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.
// no exception was thrown, this means libPath is valid, but it may be read only.
title
=
_
(
"Module Editor (active library: "
)
+
nickname
+
wxT
(
")"
);
title
=
_
(
"Module Editor (active library: "
)
+
nickname
+
wxT
(
")"
);
...
...
pcbnew/modview_frame.cpp
View file @
2ed804b8
...
@@ -309,7 +309,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
...
@@ -309,7 +309,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
{
{
m_libList
->
Clear
();
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
++
)
for
(
unsigned
ii
=
0
;
ii
<
nicknames
.
size
();
ii
++
)
m_libList
->
Append
(
nicknames
[
ii
]
);
m_libList
->
Append
(
nicknames
[
ii
]
);
...
@@ -348,7 +348,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList()
...
@@ -348,7 +348,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList()
FOOTPRINT_LIST
fp_info_list
;
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
()
)
if
(
fp_info_list
.
GetErrorCount
()
)
{
{
...
@@ -509,7 +509,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
...
@@ -509,7 +509,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
m_selectedFootprintName
.
Empty
();
m_selectedFootprintName
.
Empty
();
// Ensure we have the right library list:
// 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
()
)
if
(
libNicknames
.
size
()
==
m_libList
->
GetCount
()
)
{
{
...
@@ -742,13 +742,16 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
...
@@ -742,13 +742,16 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
void
FOOTPRINT_VIEWER_FRAME
::
SelectCurrentFootprint
(
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,
// The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent,
// so use Kiway().Player() to fetch.
// so use Kiway().Player() to fetch.
PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true );
PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true );
(void*) parent;
#endif
wxString
libname
=
m_libraryName
+
wxT
(
"."
)
+
LegacyFootprintLibPathExtension
;
wxString
libname
=
m_libraryName
+
wxT
(
"."
)
+
LegacyFootprintLibPathExtension
;
MODULE
*
oldmodule
=
GetBoard
()
->
m_Modules
;
MODULE
*
oldmodule
=
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
LoadModuleFromLibrary
(
libname
,
parent
->
FootprintLibs
(),
false
);
MODULE
*
module
=
LoadModuleFromLibrary
(
libname
,
Prj
().
Pcb
FootprintLibs
(),
false
);
if
(
module
)
if
(
module
)
{
{
...
@@ -808,7 +811,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode )
...
@@ -808,7 +811,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode )
// Delete the current footprint
// Delete the current footprint
GetBoard
()
->
m_Modules
.
DeleteAll
();
GetBoard
()
->
m_Modules
.
DeleteAll
();
MODULE
*
footprint
=
FootprintLibs
()
->
FootprintLoad
(
m_libraryName
,
m_footprintName
);
MODULE
*
footprint
=
Prj
().
Pcb
FootprintLibs
()
->
FootprintLoad
(
m_libraryName
,
m_footprintName
);
if
(
footprint
)
if
(
footprint
)
GetBoard
()
->
Add
(
footprint
,
ADD_APPEND
);
GetBoard
()
->
Add
(
footprint
,
ADD_APPEND
);
...
...
pcbnew/netlist.cpp
View file @
2ed804b8
...
@@ -192,7 +192,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
...
@@ -192,7 +192,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
MODULE
*
module
=
0
;
MODULE
*
module
=
0
;
MODULE
*
fpOnBoard
;
MODULE
*
fpOnBoard
;
if
(
aNetlist
.
IsEmpty
()
||
FootprintLibs
()
->
IsEmpty
()
)
if
(
aNetlist
.
IsEmpty
()
||
Prj
().
Pcb
FootprintLibs
()
->
IsEmpty
()
)
return
;
return
;
aNetlist
.
SortByFPID
();
aNetlist
.
SortByFPID
();
...
...
pcbnew/onleftclick.cpp
View file @
2ed804b8
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <class_board.h>
#include <class_board.h>
#include <class_zone.h>
#include <class_zone.h>
#include <class_pcb_text.h>
#include <class_pcb_text.h>
#include <project.h>
#include <pcbnew.h>
#include <pcbnew.h>
#include <pcbnew_id.h>
#include <pcbnew_id.h>
...
@@ -355,7 +356,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
...
@@ -355,7 +356,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{
{
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
MoveCursorToCrossHair
();
DrawStruct
=
(
BOARD_ITEM
*
)
LoadModuleFromLibrary
(
DrawStruct
=
(
BOARD_ITEM
*
)
LoadModuleFromLibrary
(
wxEmptyString
,
FootprintLibs
(),
true
,
aDC
);
wxEmptyString
,
Prj
().
Pcb
FootprintLibs
(),
true
,
aDC
);
SetCurItem
(
DrawStruct
);
SetCurItem
(
DrawStruct
);
...
...
pcbnew/pcbnew_config.cpp
View file @
2ed804b8
...
@@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
...
@@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
case
ID_PCB_LIB_TABLE_EDIT
:
case
ID_PCB_LIB_TABLE_EDIT
:
{
{
bool
tableChanged
=
false
;
bool
tableChanged
=
false
;
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
FootprintLibs
()
);
int
r
=
InvokePcbLibTableEditor
(
this
,
&
GFootprintTable
,
Prj
().
Pcb
FootprintLibs
()
);
if
(
r
&
1
)
if
(
r
&
1
)
{
{
...
@@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
...
@@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
try
try
{
{
FootprintLibs
()
->
Save
(
tblName
);
Prj
().
Pcb
FootprintLibs
()
->
Save
(
tblName
);
tableChanged
=
true
;
tableChanged
=
true
;
}
}
catch
(
const
IO_ERROR
&
ioe
)
catch
(
const
IO_ERROR
&
ioe
)
...
@@ -259,18 +259,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
...
@@ -259,18 +259,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
SetElementVisibility( RATSNEST_VISIBLE, showRats );
SetElementVisibility( RATSNEST_VISIBLE, showRats );
#endif
#endif
wxString
projectFpLibTableFileName
=
Prj
().
FootprintLibTblName
();
Prj
().
ElemClear
(
PROJECT
::
ELEM_FPTBL
);
// Force it to be reloaded on demand.
FootprintLibs
()
->
Clear
();
try
{
FootprintLibs
()
->
Load
(
projectFpLibTableFileName
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
DisplayError
(
this
,
ioe
.
errorText
);
}
// Load the page layout decr file, from the filename stored in
// Load the page layout decr file, from the filename stored in
// BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
// BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
...
...
pcbnew/tools/drawing_tool.cpp
View file @
2ed804b8
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "common_actions.h"
#include "common_actions.h"
#include <wxPcbStruct.h>
#include <wxPcbStruct.h>
#include <project.h>
#include <id.h>
#include <id.h>
#include <pcbnew_id.h>
#include <pcbnew_id.h>
#include <confirm.h>
#include <confirm.h>
...
@@ -711,7 +712,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
...
@@ -711,7 +712,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
{
{
// Init the new item attributes
// Init the new item attributes
module
=
m_frame
->
LoadModuleFromLibrary
(
wxEmptyString
,
module
=
m_frame
->
LoadModuleFromLibrary
(
wxEmptyString
,
m_frame
->
FootprintLibs
(),
m_frame
->
Prj
().
Pcb
FootprintLibs
(),
true
,
NULL
);
true
,
NULL
);
if
(
module
==
NULL
)
if
(
module
==
NULL
)
continue
;
continue
;
...
...
pcbnew/xchgmod.cpp
View file @
2ed804b8
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <class_board.h>
#include <class_board.h>
#include <class_module.h>
#include <class_module.h>
#include <project.h>
#include <pcbnew.h>
#include <pcbnew.h>
#include <dialog_exchange_modules_base.h>
#include <dialog_exchange_modules_base.h>
...
@@ -492,7 +493,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event )
...
@@ -492,7 +493,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event )
wxString
newname
;
wxString
newname
;
newname
=
m_parent
->
SelectFootprint
(
m_parent
,
wxEmptyString
,
wxEmptyString
,
wxEmptyString
,
newname
=
m_parent
->
SelectFootprint
(
m_parent
,
wxEmptyString
,
wxEmptyString
,
wxEmptyString
,
m_parent
->
FootprintLibs
()
);
Prj
().
Pcb
FootprintLibs
()
);
if
(
newname
!=
wxEmptyString
)
if
(
newname
!=
wxEmptyString
)
m_NewModule
->
SetValue
(
newname
);
m_NewModule
->
SetValue
(
newname
);
...
...
scripts/bom-in-python/round_value_robin.py
View file @
2ed804b8
...
@@ -30,7 +30,7 @@ def checkvalue(self):
...
@@ -30,7 +30,7 @@ def checkvalue(self):
if
v
.
isdigit
():
if
v
.
isdigit
():
i
=
int
(
v
)
i
=
int
(
v
)
if
(
i
>
1000000
):
if
(
i
>
1000000
):
i
=
i
/
100000
i
=
i
/
100000
0
v
=
str
(
i
)
+
"M"
v
=
str
(
i
)
+
"M"
if
(
i
>
1000
):
if
(
i
>
1000
):
i
=
i
/
1000
i
=
i
/
1000
...
...
scripts/kicad-install.sh
View file @
2ed804b8
...
@@ -34,6 +34,17 @@
...
@@ -34,6 +34,17 @@
# Set where the 3 source trees will go, use a full path
# Set where the 3 source trees will go, use a full path
WORKING_TREES
=
~/kicad_sources
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
# CMake Options
#OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF"
#OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF"
...
@@ -45,9 +56,6 @@ WORKING_TREES=~/kicad_sources
...
@@ -45,9 +56,6 @@ WORKING_TREES=~/kicad_sources
# https results in read only access.
# https results in read only access.
REPOS
=
https://code.launchpad.net
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
# This branch is a bzr/launchpad import of the Git repository
# at https://github.com/KiCad/kicad-library.git.
# at https://github.com/KiCad/kicad-library.git.
# It has schematic parts and 3D models in it.
# It has schematic parts and 3D models in it.
...
@@ -212,11 +220,11 @@ install_or_update()
...
@@ -212,11 +220,11 @@ install_or_update()
echo
"step 3) checking out the source code from launchpad repo..."
echo
"step 3) checking out the source code from launchpad repo..."
if
[
!
-d
"
$WORKING_TREES
/kicad.bzr"
]
;
then
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."
echo
" source repo to local working tree."
else
else
cd
kicad.bzr
cd
kicad.bzr
bzr up
bzr up
-r
$REVISION
echo
" local source working tree updated."
echo
" local source working tree updated."
cd
../
cd
../
fi
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