Commit c6345965 authored by Wayne Stambaugh's avatar Wayne Stambaugh

CvPcb: fix broken event ID for configuration button on toolbar.

* Remap configuration button on toolbar to launch footprint library table
  editor.
* Remove legacy footprint library path dialog from CVPCB_MAINFRAME.
* Remove unused event ID ID_CVPCB_CREATE_CONFIGWINDOW.
* Minor coding policy fixes.
parent c8d69f19
...@@ -68,17 +68,14 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME ) ...@@ -68,17 +68,14 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME )
EVT_MENU( wxID_EXIT, CVPCB_MAINFRAME::OnQuit ) EVT_MENU( wxID_EXIT, CVPCB_MAINFRAME::OnQuit )
EVT_MENU( wxID_HELP, CVPCB_MAINFRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, CVPCB_MAINFRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, CVPCB_MAINFRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, CVPCB_MAINFRAME::GetKicadAbout )
EVT_MENU( wxID_PREFERENCES, CVPCB_MAINFRAME::ConfigCvpcb )
EVT_MENU( ID_SAVE_PROJECT, CVPCB_MAINFRAME::SaveProjectFile ) EVT_MENU( ID_SAVE_PROJECT, CVPCB_MAINFRAME::SaveProjectFile )
EVT_MENU( ID_SAVE_PROJECT_AS, CVPCB_MAINFRAME::SaveProjectFile ) EVT_MENU( ID_SAVE_PROJECT_AS, CVPCB_MAINFRAME::SaveProjectFile )
EVT_MENU( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnKeepOpenOnSave ) EVT_MENU( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnKeepOpenOnSave )
EVT_MENU( ID_CVPCB_LIB_TABLE_EDIT, CVPCB_MAINFRAME::OnEditFootprintLibraryTable )
// Toolbar events // Toolbar events
EVT_TOOL( ID_CVPCB_QUIT, CVPCB_MAINFRAME::OnQuit ) EVT_TOOL( ID_CVPCB_QUIT, CVPCB_MAINFRAME::OnQuit )
EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST, CVPCB_MAINFRAME::LoadNetList ) EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST, CVPCB_MAINFRAME::LoadNetList )
EVT_TOOL( ID_CVPCB_CREATE_CONFIGWINDOW, CVPCB_MAINFRAME::ConfigCvpcb ) EVT_TOOL( ID_CVPCB_LIB_TABLE_EDIT, CVPCB_MAINFRAME::OnEditFootprintLibraryTable )
EVT_TOOL( ID_CVPCB_CREATE_SCREENCMP, CVPCB_MAINFRAME::DisplayModule ) EVT_TOOL( ID_CVPCB_CREATE_SCREENCMP, CVPCB_MAINFRAME::DisplayModule )
EVT_TOOL( ID_CVPCB_GOTO_FIRSTNA, CVPCB_MAINFRAME::ToFirstNA ) EVT_TOOL( ID_CVPCB_GOTO_FIRSTNA, CVPCB_MAINFRAME::ToFirstNA )
EVT_TOOL( ID_CVPCB_GOTO_PREVIOUSNA, CVPCB_MAINFRAME::ToPreviousNA ) EVT_TOOL( ID_CVPCB_GOTO_PREVIOUSNA, CVPCB_MAINFRAME::ToPreviousNA )
...@@ -144,7 +141,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : ...@@ -144,7 +141,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
// Set minimal frame width and height // Set minimal frame width and height
SetSizeHints( FRAME_MIN_SIZE_X, FRAME_MIN_SIZE_Y, -1, -1, -1, -1 ); SetSizeHints( FRAME_MIN_SIZE_X, FRAME_MIN_SIZE_Y, -1, -1, -1, -1 );
// Framesize and position // Frame size and position
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
// create the status bar // create the status bar
...@@ -459,18 +456,6 @@ bool CVPCB_MAINFRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, i ...@@ -459,18 +456,6 @@ bool CVPCB_MAINFRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, i
} }
void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event )
{
/* This is showing FOOTPRINT search paths, which are obsoleted.
I am removing this for the time being, since cvpcb will soon be part of pcbnew.
DIALOG_CVPCB_CONFIG dlg( this );
dlg.ShowModal();
*/
}
void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
{ {
bool tableChanged = false; bool tableChanged = false;
...@@ -487,8 +472,8 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) ...@@ -487,8 +472,8 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxString msg = wxString::Format( _( wxString msg = wxString::Format(
"Error occurred saving the global footprint library table:\n'%s'\n%s" ), _( "Error occurred saving the global footprint library table:\n'%s'\n%s" ),
GetChars( fileName ), GetChars( fileName ),
GetChars( ioe.errorText ) GetChars( ioe.errorText )
); );
...@@ -507,8 +492,8 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) ...@@ -507,8 +492,8 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent )
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxString msg = wxString::Format( _( wxString msg = wxString::Format(
"Error occurred saving the project footprint library table:\n'%s'\n%s" ), _( "Error occurred saving the project footprint library table:\n'%s'\n%s" ),
GetChars( fileName ), GetChars( fileName ),
GetChars( ioe.errorText ) GetChars( ioe.errorText )
); );
......
...@@ -18,7 +18,6 @@ enum id_cvpcb_frm ...@@ -18,7 +18,6 @@ enum id_cvpcb_frm
ID_CVPCB_QUIT = ID_END_LIST, ID_CVPCB_QUIT = ID_END_LIST,
ID_CVPCB_READ_INPUT_NETLIST, ID_CVPCB_READ_INPUT_NETLIST,
ID_CVPCB_SAVEQUITCVPCB, ID_CVPCB_SAVEQUITCVPCB,
ID_CVPCB_CREATE_CONFIGWINDOW,
ID_CVPCB_CREATE_SCREENCMP, ID_CVPCB_CREATE_SCREENCMP,
ID_CVPCB_GOTO_FIRSTNA, ID_CVPCB_GOTO_FIRSTNA,
ID_CVPCB_GOTO_PREVIOUSNA, ID_CVPCB_GOTO_PREVIOUSNA,
......
...@@ -135,8 +135,6 @@ public: ...@@ -135,8 +135,6 @@ public:
*/ */
void LoadNetList( wxCommandEvent& event ); void LoadNetList( wxCommandEvent& event );
void ConfigCvpcb( wxCommandEvent& event );
/** /**
* Function OnEditLibraryTable * Function OnEditLibraryTable
* envokes the footpirnt library table edit dialog. * envokes the footpirnt library table edit dialog.
......
...@@ -52,13 +52,12 @@ void CVPCB_MAINFRAME::ReCreateHToolbar() ...@@ -52,13 +52,12 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
m_mainToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString, m_mainToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString,
KiBitmap( open_document_xpm ), LOAD_FILE_HELP ); KiBitmap( open_document_xpm ), LOAD_FILE_HELP );
m_mainToolBar->AddTool( wxID_SAVE, wxEmptyString, KiBitmap( save_xpm ), m_mainToolBar->AddTool( wxID_SAVE, wxEmptyString, KiBitmap( save_xpm ), SAVE_HLP_MSG );
SAVE_HLP_MSG );
m_mainToolBar->AddSeparator(); m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxEmptyString, m_mainToolBar->AddTool( ID_CVPCB_LIB_TABLE_EDIT, wxEmptyString,
KiBitmap( config_xpm ), KiBitmap( config_xpm ),
_( "Set CvPcb config (paths and equ files)" ) ); _( "Edit footprint library table" ) );
m_mainToolBar->AddSeparator(); m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString, m_mainToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString,
......
...@@ -40,17 +40,17 @@ wxString DRC_ITEM::GetErrorText() const ...@@ -40,17 +40,17 @@ wxString DRC_ITEM::GetErrorText() const
switch( m_ErrorCode ) switch( m_ErrorCode )
{ {
case DRCE_UNCONNECTED_PADS: case DRCE_UNCONNECTED_PADS:
return wxString( _("Unconnected pads") ); return wxString( _( "Unconnected pads" ) );
case DRCE_TRACK_NEAR_THROUGH_HOLE: case DRCE_TRACK_NEAR_THROUGH_HOLE:
return wxString( _("Track near thru-hole") ); return wxString( _( "Track near thru-hole" ) );
case DRCE_TRACK_NEAR_PAD: case DRCE_TRACK_NEAR_PAD:
return wxString( _("Track near pad") ); return wxString( _( "Track near pad" ) );
case DRCE_TRACK_NEAR_VIA: case DRCE_TRACK_NEAR_VIA:
return wxString( _("Track near via") ); return wxString( _( "Track near via" ) );
case DRCE_VIA_NEAR_VIA: case DRCE_VIA_NEAR_VIA:
return wxString( _("Via near via") ); return wxString( _( "Via near via" ) );
case DRCE_VIA_NEAR_TRACK: case DRCE_VIA_NEAR_TRACK:
return wxString( _("Via near track") ); return wxString( _( "Via near track" ) );
case DRCE_TRACK_ENDS1: case DRCE_TRACK_ENDS1:
case DRCE_TRACK_ENDS2: case DRCE_TRACK_ENDS2:
case DRCE_TRACK_ENDS3: case DRCE_TRACK_ENDS3:
...@@ -60,72 +60,68 @@ wxString DRC_ITEM::GetErrorText() const ...@@ -60,72 +60,68 @@ wxString DRC_ITEM::GetErrorText() const
case DRCE_ENDS_PROBLEM3: case DRCE_ENDS_PROBLEM3:
case DRCE_ENDS_PROBLEM4: case DRCE_ENDS_PROBLEM4:
case DRCE_ENDS_PROBLEM5: case DRCE_ENDS_PROBLEM5:
return wxString( _("Two track ends too close") ); return wxString( _( "Two track ends too close" ) );
case DRCE_TRACK_SEGMENTS_TOO_CLOSE: case DRCE_TRACK_SEGMENTS_TOO_CLOSE:
return wxString( _("Two parallel track segments too close") ); return wxString( _( "Two parallel track segments too close" ) );
case DRCE_TRACKS_CROSSING: case DRCE_TRACKS_CROSSING:
return wxString( _("Tracks crossing") ); return wxString( _( "Tracks crossing" ) );
case DRCE_PAD_NEAR_PAD1: case DRCE_PAD_NEAR_PAD1:
return wxString( _("Pad near pad") ); return wxString( _( "Pad near pad" ) );
case DRCE_VIA_HOLE_BIGGER: case DRCE_VIA_HOLE_BIGGER:
return wxString( _("Via hole > diameter")); return wxString( _( "Via hole > diameter" ) );
case DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR: case DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR:
return wxString( _("Micro Via: incorrect layer pairs (not adjacent)")); return wxString( _( "Micro Via: incorrect layer pairs (not adjacent)" ) );
case COPPERAREA_INSIDE_COPPERAREA: case COPPERAREA_INSIDE_COPPERAREA:
return wxString( _("Copper area inside copper area")); return wxString( _( "Copper area inside copper area" ) );
case COPPERAREA_CLOSE_TO_COPPERAREA: case COPPERAREA_CLOSE_TO_COPPERAREA:
return wxString( _("Copper areas intersect or are too close")); return wxString( _( "Copper areas intersect or are too close" ) );
case DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE: case DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE:
return wxString( _("Copper area has a nonexistent net name")); return wxString( _( "Copper area has a nonexistent net name" ) );
case DRCE_HOLE_NEAR_PAD: case DRCE_HOLE_NEAR_PAD:
return wxString( _("Hole near pad")); return wxString( _( "Hole near pad" ) );
case DRCE_HOLE_NEAR_TRACK: case DRCE_HOLE_NEAR_TRACK:
return wxString( _("Hole near track")); return wxString( _( "Hole near track" ) );
case DRCE_TOO_SMALL_TRACK_WIDTH: case DRCE_TOO_SMALL_TRACK_WIDTH:
return wxString( _("Too small track width")); return wxString( _( "Too small track width" ) );
case DRCE_TOO_SMALL_VIA: case DRCE_TOO_SMALL_VIA:
return wxString( _("Too small via size")); return wxString( _( "Too small via size" ) );
case DRCE_TOO_SMALL_MICROVIA: case DRCE_TOO_SMALL_MICROVIA:
return wxString( _("Too small micro via size")); return wxString( _( "Too small micro via size" ) );
// use &lt; since this is text ultimately embedded in HTML // use &lt; since this is text ultimately embedded in HTML
case DRCE_NETCLASS_TRACKWIDTH: case DRCE_NETCLASS_TRACKWIDTH:
return wxString( _("NetClass Track Width &lt; global limit")); return wxString( _( "NetClass Track Width &lt; global limit" ) );
case DRCE_NETCLASS_CLEARANCE: case DRCE_NETCLASS_CLEARANCE:
return wxString( _("NetClass Clearance &lt; global limit")); return wxString( _( "NetClass Clearance &lt; global limit" ) );
case DRCE_NETCLASS_VIASIZE: case DRCE_NETCLASS_VIASIZE:
return wxString( _("NetClass Via Dia &lt; global limit")); return wxString( _( "NetClass Via Dia &lt; global limit" ) );
case DRCE_NETCLASS_VIADRILLSIZE: case DRCE_NETCLASS_VIADRILLSIZE:
return wxString( _("NetClass Via Drill &lt; global limit")); return wxString( _( "NetClass Via Drill &lt; global limit" ) );
case DRCE_NETCLASS_uVIASIZE: case DRCE_NETCLASS_uVIASIZE:
return wxString( _("NetClass uVia Dia &lt; global limit")); return wxString( _( "NetClass uVia Dia &lt; global limit" ) );
case DRCE_NETCLASS_uVIADRILLSIZE: case DRCE_NETCLASS_uVIADRILLSIZE:
return wxString( _("NetClass uVia Drill &lt; global limit")); return wxString( _( "NetClass uVia Drill &lt; global limit" ) );
case DRCE_VIA_INSIDE_KEEPOUT: case DRCE_VIA_INSIDE_KEEPOUT:
return wxString( _("Via inside a keepout area")); return wxString( _( "Via inside a keepout area" ) );
case DRCE_TRACK_INSIDE_KEEPOUT: case DRCE_TRACK_INSIDE_KEEPOUT:
return wxString( _("Track inside a keepout area")); return wxString( _( "Track inside a keepout area" ) );
case DRCE_PAD_INSIDE_KEEPOUT: case DRCE_PAD_INSIDE_KEEPOUT:
return wxString( _("Pad inside a keepout area")); return wxString( _( "Pad inside a keepout area" ) );
case DRCE_VIA_INSIDE_TEXT: case DRCE_VIA_INSIDE_TEXT:
return wxString( _("Via inside a text")); return wxString( _( "Via inside a text" ) );
case DRCE_TRACK_INSIDE_TEXT: case DRCE_TRACK_INSIDE_TEXT:
return wxString( _("Track inside a text")); return wxString( _( "Track inside a text" ) );
case DRCE_PAD_INSIDE_TEXT: case DRCE_PAD_INSIDE_TEXT:
return wxString( _("Pad inside a text")); return wxString( _( "Pad inside a text" ) );
default: default:
{ return wxString::Format( wxT( "Unknown DRC error code %d" ), m_ErrorCode );
wxString msg;
msg.Printf( wxT( "Unknown DRC error code %d" ), m_ErrorCode );
return ( msg );
}
} }
} }
...@@ -137,4 +133,3 @@ wxString DRC_ITEM::ShowCoord( const wxPoint& aPos ) ...@@ -137,4 +133,3 @@ wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
ret << aPos; ret << aPos;
return ret; return ret;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment