* Fix 3D frame issue (3D frame not show) when it is iconized and reactivated by Pcbnew or CvPcb menus (Windows only)

* Add in help menu a direct link to the new doc Getting_Started_in_KiCad.pdf, written by contributors (useful for beginners)
* Fix other very minor issues in CvPcb.
* Update howto doc about translation
This commit is contained in:
jean-pierre charras 2011-08-04 20:03:26 +02:00
commit 0eb4050004
21 changed files with 232 additions and 179 deletions

View File

@ -258,6 +258,30 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
{ {
wxString msg; wxString msg;
/* We have to get document for beginners,
* or the the full specific doc
* if event id is wxID_INDEX, we want the document for beginners.
* else the specific doc file (its name is in wxGetApp().m_HelpFileName)
* The document for beginners is the same for all kicad utilities
*/
if( event.GetId() == wxID_INDEX )
{
// Temporary change the help filename
wxString tmp = wxGetApp().m_HelpFileName;
wxGetApp().m_HelpFileName = "Getting_Started_in_KiCad.pdf";
wxString helpFile = wxGetApp().GetHelpFile();
if( !helpFile )
{
msg.Printf( _( "Help file %s could not be found." ),
GetChars( wxGetApp().m_HelpFileName ) );
DisplayError( this, msg );
}
else
GetAssociatedDocument( this, helpFile );
wxGetApp().m_HelpFileName = tmp;
return;
}
#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML
if( wxGetApp().m_HtmlCtrl == NULL ) if( wxGetApp().m_HtmlCtrl == NULL )

View File

@ -6,7 +6,7 @@
#endif #endif
#ifndef KICAD_BUILD_VERSION #ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-07-19)" #define KICAD_BUILD_VERSION "(2011-aug-04)"
#endif #endif

View File

@ -106,7 +106,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right() ); wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right() );
m_auimgr.AddPane( DrawPanel, m_auimgr.AddPane( DrawPanel,
wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); wxAuiPaneInfo().Name( wxT( "DisplayFrame" ) ).CentrePane() );
m_auimgr.AddPane( MsgPanel, m_auimgr.AddPane( MsgPanel,
wxAuiPaneInfo( horiz ).Name( wxT( "MsgPanel" ) ).Bottom() ); wxAuiPaneInfo( horiz ).Name( wxT( "MsgPanel" ) ).Bottom() );
@ -126,7 +126,7 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
delete GetScreen(); delete GetScreen();
SetScreen( NULL ); SetScreen( NULL );
( (CVPCB_MAINFRAME*) wxGetApp().GetTopWindow() )->DrawFrame = NULL; ( (CVPCB_MAINFRAME*) wxGetApp().GetTopWindow() )->m_DisplayFootprintFrame = NULL;
} }
/* Called when the frame is closed /* Called when the frame is closed
@ -134,12 +134,8 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
*/ */
void DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow( wxCloseEvent& event ) void DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow( wxCloseEvent& event )
{ {
wxPoint pos; if( m_Draw3DFrame )
wxSize size; m_Draw3DFrame->Close(true);
size = GetSize();
pos = GetPosition();
SaveSettings(); SaveSettings();
Destroy(); Destroy();
} }
@ -408,6 +404,10 @@ void DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame( wxCommandEvent& event )
{ {
if( m_Draw3DFrame ) if( m_Draw3DFrame )
{ {
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if( m_Draw3DFrame->IsIconized() )
m_Draw3DFrame->Iconize( false );
m_Draw3DFrame->Raise(); m_Draw3DFrame->Raise();
// Raising the window does not set the focus on Linux. This should work on any platform. // Raising the window does not set the focus on Linux. This should work on any platform.

View File

@ -244,7 +244,7 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event )
Module = GetParent()->m_footprints.GetModuleInfo( FootprintName ); Module = GetParent()->m_footprints.GetModuleInfo( FootprintName );
wxASSERT(Module); wxASSERT(Module);
if( GetParent()->DrawFrame ) if( GetParent()->m_DisplayFootprintFrame )
{ {
GetParent()->CreateScreenCmp(); /* refresh general */ GetParent()->CreateScreenCmp(); /* refresh general */
} }

View File

@ -32,85 +32,69 @@ static const wxString FootprintDocFileEntry( wxT( "footprints_doc_file" ) );
BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME ) BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, CVPCB_MAINFRAME::LoadNetList ) EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, CVPCB_MAINFRAME::LoadNetList )
// Menu events // Menu events
EVT_MENU( ID_LOAD_PROJECT, EVT_MENU( ID_LOAD_PROJECT,
CVPCB_MAINFRAME::LoadNetList ) CVPCB_MAINFRAME::LoadNetList )
EVT_MENU( ID_SAVE_PROJECT, EVT_MENU( ID_SAVE_PROJECT,
CVPCB_MAINFRAME::SaveQuitCvpcb ) CVPCB_MAINFRAME::SaveQuitCvpcb )
EVT_MENU( wxID_EXIT, EVT_MENU( wxID_EXIT,
CVPCB_MAINFRAME::OnQuit ) CVPCB_MAINFRAME::OnQuit )
EVT_MENU( wxID_HELP, EVT_MENU( wxID_HELP,
CVPCB_MAINFRAME::GetKicadHelp ) CVPCB_MAINFRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EVT_MENU( wxID_ABOUT,
CVPCB_MAINFRAME::GetKicadAbout ) CVPCB_MAINFRAME::GetKicadAbout )
EVT_MENU( wxID_PREFERENCES, EVT_MENU( wxID_PREFERENCES,
CVPCB_MAINFRAME::ConfigCvpcb ) CVPCB_MAINFRAME::ConfigCvpcb )
EVT_MENU( ID_CONFIG_SAVE, EVT_MENU( ID_CONFIG_SAVE,
CVPCB_MAINFRAME::Update_Config ) CVPCB_MAINFRAME::Update_Config )
EVT_MENU( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, EVT_MENU( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE,
CVPCB_MAINFRAME::OnKeepOpenOnSave ) CVPCB_MAINFRAME::OnKeepOpenOnSave )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, EVT_MENU_RANGE( ID_LANGUAGE_CHOICE,
ID_LANGUAGE_CHOICE_END, ID_LANGUAGE_CHOICE_END,
CVPCB_MAINFRAME::SetLanguage ) CVPCB_MAINFRAME::SetLanguage )
// Toolbar events // Toolbar events
EVT_TOOL( ID_CVPCB_QUIT, EVT_TOOL( ID_CVPCB_QUIT, CVPCB_MAINFRAME::OnQuit )
CVPCB_MAINFRAME::OnQuit ) EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST, CVPCB_MAINFRAME::LoadNetList )
EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST, EVT_TOOL( ID_CVPCB_SAVEQUITCVPCB, CVPCB_MAINFRAME::SaveQuitCvpcb )
CVPCB_MAINFRAME::LoadNetList ) EVT_TOOL( ID_CVPCB_CREATE_CONFIGWINDOW, CVPCB_MAINFRAME::ConfigCvpcb )
EVT_TOOL( ID_CVPCB_SAVEQUITCVPCB, EVT_TOOL( ID_CVPCB_CREATE_SCREENCMP, CVPCB_MAINFRAME::DisplayModule )
CVPCB_MAINFRAME::SaveQuitCvpcb ) EVT_TOOL( ID_CVPCB_GOTO_FIRSTNA, CVPCB_MAINFRAME::ToFirstNA )
EVT_TOOL( ID_CVPCB_CREATE_CONFIGWINDOW, EVT_TOOL( ID_CVPCB_GOTO_PREVIOUSNA, CVPCB_MAINFRAME::ToPreviousNA )
CVPCB_MAINFRAME::ConfigCvpcb ) EVT_TOOL( ID_CVPCB_DEL_ASSOCIATIONS, CVPCB_MAINFRAME::DelAssociations )
EVT_TOOL( ID_CVPCB_CREATE_SCREENCMP, EVT_TOOL( ID_CVPCB_AUTO_ASSOCIE, CVPCB_MAINFRAME::AssocieModule )
CVPCB_MAINFRAME::DisplayModule ) EVT_TOOL( ID_CVPCB_CREATE_STUFF_FILE, CVPCB_MAINFRAME::WriteStuffList )
EVT_TOOL( ID_CVPCB_GOTO_FIRSTNA, EVT_TOOL( ID_PCB_DISPLAY_FOOTPRINT_DOC, CVPCB_MAINFRAME::DisplayDocFile )
CVPCB_MAINFRAME::ToFirstNA ) EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
EVT_TOOL( ID_CVPCB_GOTO_PREVIOUSNA, CVPCB_MAINFRAME::OnSelectFilteringFootprint )
CVPCB_MAINFRAME::ToPreviousNA ) EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
EVT_TOOL( ID_CVPCB_DEL_ASSOCIATIONS, CVPCB_MAINFRAME::OnSelectFilteringFootprint )
CVPCB_MAINFRAME::DelAssociations )
EVT_TOOL( ID_CVPCB_AUTO_ASSOCIE,
CVPCB_MAINFRAME::AssocieModule )
EVT_TOOL( ID_CVPCB_CREATE_STUFF_FILE,
CVPCB_MAINFRAME::WriteStuffList )
EVT_TOOL( ID_PCB_DISPLAY_FOOTPRINT_DOC,
CVPCB_MAINFRAME::DisplayDocFile )
EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
CVPCB_MAINFRAME::OnSelectFilteringFootprint )
EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
CVPCB_MAINFRAME::OnSelectFilteringFootprint )
// Frame events // Frame events
EVT_CHAR( CVPCB_MAINFRAME::OnChar ) EVT_CHAR( CVPCB_MAINFRAME::OnChar )
EVT_CLOSE( CVPCB_MAINFRAME::OnCloseWindow ) EVT_CLOSE( CVPCB_MAINFRAME::OnCloseWindow )
EVT_SIZE( CVPCB_MAINFRAME::OnSize ) EVT_SIZE( CVPCB_MAINFRAME::OnSize )
// List item events // List item events
EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST, EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftClick )
CVPCB_MAINFRAME::OnLeftClick ) EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftDClick )
EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST, EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST, CVPCB_MAINFRAME::OnSelectComponent )
CVPCB_MAINFRAME::OnLeftDClick )
EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST,
CVPCB_MAINFRAME::OnSelectComponent )
EVT_UPDATE_UI( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, EVT_UPDATE_UI( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE,
CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave ) CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave )
END_EVENT_TABLE() END_EVENT_TABLE() CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) :
CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) :
EDA_BASE_FRAME( NULL, CVPCB_FRAME, title, wxDefaultPosition, wxDefaultSize, style ) EDA_BASE_FRAME( NULL, CVPCB_FRAME, title, wxDefaultPosition, wxDefaultSize, style )
{ {
m_FrameName = wxT( "CvpcbFrame" ); m_FrameName = wxT( "CvpcbFrame" );
m_ListCmp = NULL; m_ListCmp = NULL;
m_FootprintList = NULL; m_FootprintList = NULL;
DrawFrame = NULL; m_DisplayFootprintFrame = NULL;
m_HToolBar = NULL; m_HToolBar = NULL;
m_modified = false; m_modified = false;
m_isEESchemaNetlist = false; m_isEESchemaNetlist = false;
m_KeepCvpcbOpen = false; m_KeepCvpcbOpen = false;
m_undefinedComponentCnt = 0; m_undefinedComponentCnt = 0;
@ -129,7 +113,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) :
SetIcon( wxICON( icon_cvpcb ) ); SetIcon( wxICON( icon_cvpcb ) );
#endif #endif
SetAutoLayout( TRUE ); SetAutoLayout( true );
LoadSettings(); LoadSettings();
if( m_FrameSize.x < FRAME_MIN_SIZE_X ) if( m_FrameSize.x < FRAME_MIN_SIZE_X )
@ -170,16 +154,16 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) :
if( m_HToolBar ) if( m_HToolBar )
m_auimgr.AddPane( m_HToolBar, m_auimgr.AddPane( m_HToolBar,
wxAuiPaneInfo( horiz ).Name( wxT( "m_HToolBar" ) ).Top() ); wxAuiPaneInfo( horiz ).Name( wxT( "m_HToolBar" ) ).Top() );
if( m_ListCmp ) if( m_ListCmp )
m_auimgr.AddPane( m_ListCmp, m_auimgr.AddPane( m_ListCmp,
wxAuiPaneInfo(horiz).Name( wxT( "m_ListCmp" ) ).CentrePane() ); wxAuiPaneInfo( horiz ).Name( wxT( "m_ListCmp" ) ).CentrePane() );
if( m_FootprintList ) if( m_FootprintList )
m_auimgr.AddPane( m_FootprintList, m_auimgr.AddPane( m_FootprintList,
wxAuiPaneInfo( horiz ).Name( wxT( "m_FootprintList" ) ). wxAuiPaneInfo( horiz ).Name( wxT( "m_FootprintList" ) ).
Right().BestSize( (int) ( m_FrameSize.x * 0.36 ), m_FrameSize.y ) ); Right().BestSize( (int) ( m_FrameSize.x * 0.36 ), m_FrameSize.y ) );
m_auimgr.Update(); m_auimgr.Update();
} }
@ -245,7 +229,7 @@ void CVPCB_MAINFRAME::OnSize( wxSizeEvent& event )
void CVPCB_MAINFRAME::OnQuit( wxCommandEvent& event ) void CVPCB_MAINFRAME::OnQuit( wxCommandEvent& event )
{ {
Close( TRUE ); Close( true );
} }
@ -293,9 +277,9 @@ void CVPCB_MAINFRAME::OnCloseWindow( wxCloseEvent& Event )
// Close the help frame // Close the help frame
if( wxGetApp().m_HtmlCtrl ) if( wxGetApp().m_HtmlCtrl )
{ {
if( wxGetApp().m_HtmlCtrl->GetFrame() ) // returns NULL if no help if( wxGetApp().m_HtmlCtrl->GetFrame() ) // returns NULL if no help
// frame active // frame active
wxGetApp().m_HtmlCtrl->GetFrame()->Close( TRUE ); wxGetApp().m_HtmlCtrl->GetFrame()->Close( true );
} }
if( m_NetlistFileName.IsOk() ) if( m_NetlistFileName.IsOk() )
@ -303,6 +287,9 @@ void CVPCB_MAINFRAME::OnCloseWindow( wxCloseEvent& Event )
UpdateFileHistory( m_NetlistFileName.GetFullPath() ); UpdateFileHistory( m_NetlistFileName.GetFullPath() );
} }
// Close module display frame
if( m_DisplayFootprintFrame )
m_DisplayFootprintFrame->Close( true );
m_modified = false; m_modified = false;
SaveSettings(); SaveSettings();
Destroy(); Destroy();
@ -344,8 +331,7 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event )
if( selection < 0 ) if( selection < 0 )
selection = 0; selection = 0;
BOOST_FOREACH( COMPONENT & component, m_components ) BOOST_FOREACH( COMPONENT & component, m_components ) {
{
if( component.m_Module.IsEmpty() && ii > selection ) if( component.m_Module.IsEmpty() && ii > selection )
{ {
m_ListCmp->SetSelection( ii ); m_ListCmp->SetSelection( ii );
@ -372,8 +358,7 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event )
if( selection < 0 ) if( selection < 0 )
selection = m_ListCmp->GetCount() - 1; selection = m_ListCmp->GetCount() - 1;
BOOST_REVERSE_FOREACH( COMPONENT & component, m_components ) BOOST_REVERSE_FOREACH( COMPONENT & component, m_components ) {
{
if( component.m_Module.IsEmpty() && ii < selection ) if( component.m_Module.IsEmpty() && ii < selection )
{ {
m_ListCmp->SetSelection( ii ); m_ListCmp->SetSelection( ii );
@ -391,7 +376,7 @@ void CVPCB_MAINFRAME::SaveQuitCvpcb( wxCommandEvent& event )
{ {
m_modified = false; m_modified = false;
if( !m_KeepCvpcbOpen ) if( !m_KeepCvpcbOpen )
Close( TRUE ); Close( true );
} }
} }
@ -407,8 +392,7 @@ void CVPCB_MAINFRAME::DelAssociations( wxCommandEvent& event )
{ {
m_ListCmp->SetSelection( 0 ); m_ListCmp->SetSelection( 0 );
BOOST_FOREACH( COMPONENT & component, m_components ) BOOST_FOREACH( COMPONENT & component, m_components ) {
{
component.m_Module.Empty(); component.m_Module.Empty();
SetNewPkg( wxEmptyString ); SetNewPkg( wxEmptyString );
} }
@ -462,7 +446,7 @@ void CVPCB_MAINFRAME::LoadNetList( wxCommandEvent& event )
if( ReadNetList() ) if( ReadNetList() )
{ {
SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() +
wxT( " " ) + m_NetlistFileName.GetFullPath() ); wxT( " " ) + m_NetlistFileName.GetFullPath() );
} }
else else
{ {
@ -488,7 +472,7 @@ void CVPCB_MAINFRAME::OnKeepOpenOnSave( wxCommandEvent& event )
void CVPCB_MAINFRAME::DisplayModule( wxCommandEvent& event ) void CVPCB_MAINFRAME::DisplayModule( wxCommandEvent& event )
{ {
CreateScreenCmp(); CreateScreenCmp();
DrawFrame->RedrawScreen( wxPoint( 0, 0 ), false ); m_DisplayFootprintFrame->RedrawScreen( wxPoint( 0, 0 ), false );
} }
@ -504,7 +488,7 @@ void CVPCB_MAINFRAME::SetLanguage( wxCommandEvent& event )
void CVPCB_MAINFRAME::DisplayDocFile( wxCommandEvent& event ) void CVPCB_MAINFRAME::DisplayDocFile( wxCommandEvent& event )
{ {
GetAssociatedDocument( this, m_DocModulesFileName, GetAssociatedDocument( this, m_DocModulesFileName,
&wxGetApp().GetLibraryPathList() ); &wxGetApp().GetLibraryPathList() );
} }
@ -526,20 +510,20 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
if( !m_HToolBar->GetToolState( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) ) if( !m_HToolBar->GetToolState( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) )
{ {
m_FootprintList->SetActiveFootprintList( TRUE, TRUE ); m_FootprintList->SetActiveFootprintList( true, true );
return; return;
} }
selection = m_ListCmp->GetSelection(); selection = m_ListCmp->GetSelection();
if( selection < 0 ) if( selection < 0 )
{ {
m_FootprintList->SetActiveFootprintList( TRUE, TRUE ); m_FootprintList->SetActiveFootprintList( true, true );
return; return;
} }
if( &m_components[ selection ] == NULL ) if( &m_components[ selection ] == NULL )
{ {
m_FootprintList->SetActiveFootprintList( TRUE, TRUE ); m_FootprintList->SetActiveFootprintList( true, true );
return; return;
} }
@ -553,17 +537,20 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
*/ */
void CVPCB_MAINFRAME::OnSelectFilteringFootprint( wxCommandEvent& event ) void CVPCB_MAINFRAME::OnSelectFilteringFootprint( wxCommandEvent& event )
{ {
switch (event.GetId() ) switch( event.GetId() )
{ {
case ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST: case ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST:
m_HToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false ); m_HToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
break; break;
case ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST:
m_HToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false ); case ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST:
break; m_HToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
default: break;
default:
break; break;
} }
wxListEvent l_event; wxListEvent l_event;
OnSelectComponent( l_event ); OnSelectComponent( l_event );
@ -582,8 +569,9 @@ void CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave( wxUpdateUIEvent& event )
void CVPCB_MAINFRAME::DisplayStatus() void CVPCB_MAINFRAME::DisplayStatus()
{ {
wxString msg; wxString msg;
msg.Printf( _( "Components: %d (free: %d)" ), msg.Printf( _( "Components: %d (free: %d)" ),
m_components.size(), m_undefinedComponentCnt ); m_components.size(), m_undefinedComponentCnt );
SetStatusText( msg, 0 ); SetStatusText( msg, 0 );
SetStatusText( wxEmptyString, 1 ); SetStatusText( wxEmptyString, 1 );
@ -602,6 +590,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
SetStatusText( msg, 2 ); SetStatusText( msg, 2 );
} }
/* /*
* Read the list of libraries (*.mod files) and populates m_footprints * Read the list of libraries (*.mod files) and populates m_footprints
* ( list of availaible modules in libs ). * ( list of availaible modules in libs ).
@ -610,7 +599,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
* documentation string * documentation string
* associated keywords * associated keywords
*/ */
bool CVPCB_MAINFRAME::LoadFootprintFiles( ) bool CVPCB_MAINFRAME::LoadFootprintFiles()
{ {
/* Check if there are footprint libraries in project file */ /* Check if there are footprint libraries in project file */
if( m_ModuleLibNames.GetCount() == 0 ) if( m_ModuleLibNames.GetCount() == 0 )
@ -620,24 +609,24 @@ bool CVPCB_MAINFRAME::LoadFootprintFiles( )
return false; return false;
} }
m_footprints.ReadFootprintFiles(m_ModuleLibNames); m_footprints.ReadFootprintFiles( m_ModuleLibNames );
/* Display error messages, if any */ /* Display error messages, if any */
if( !m_footprints.m_filesNotFound.IsEmpty() || !m_footprints.m_filesInvalid.IsEmpty() ) if( !m_footprints.m_filesNotFound.IsEmpty() || !m_footprints.m_filesInvalid.IsEmpty() )
{ {
DIALOG_LOAD_ERROR dialog(NULL); DIALOG_LOAD_ERROR dialog( NULL );
if( !m_footprints.m_filesNotFound.IsEmpty() ) if( !m_footprints.m_filesNotFound.IsEmpty() )
{ {
wxString message = _("Some files could not be found!"); wxString message = _( "Some files could not be found!" );
dialog.MessageSet(message); dialog.MessageSet( message );
dialog.ListSet(m_footprints.m_filesNotFound); dialog.ListSet( m_footprints.m_filesNotFound );
} }
/* Display if there are invalid files */ /* Display if there are invalid files */
if( !m_footprints.m_filesInvalid.IsEmpty() ) if( !m_footprints.m_filesInvalid.IsEmpty() )
{ {
dialog.MessageSet( _("Some files are invalid!")); dialog.MessageSet( _( "Some files are invalid!" ) );
dialog.ListSet(m_footprints.m_filesInvalid); dialog.ListSet( m_footprints.m_filesInvalid );
} }
dialog.ShowModal(); dialog.ShowModal();
} }

View File

@ -17,7 +17,6 @@ class COMPONENTS_LISTBOX;
class DISPLAY_FOOTPRINTS_FRAME; class DISPLAY_FOOTPRINTS_FRAME;
/** /**
* The CVPcb application main window. * The CVPcb application main window.
*/ */
@ -26,18 +25,18 @@ class CVPCB_MAINFRAME : public EDA_BASE_FRAME
public: public:
bool m_KeepCvpcbOpen; bool m_KeepCvpcbOpen;
FOOTPRINTS_LISTBOX* m_FootprintList; FOOTPRINTS_LISTBOX* m_FootprintList;
COMPONENTS_LISTBOX* m_ListCmp; COMPONENTS_LISTBOX* m_ListCmp;
DISPLAY_FOOTPRINTS_FRAME* DrawFrame; DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame;
EDA_TOOLBAR* m_HToolBar; EDA_TOOLBAR* m_HToolBar;
wxFileName m_NetlistFileName; wxFileName m_NetlistFileName;
wxArrayString m_ModuleLibNames; wxArrayString m_ModuleLibNames;
wxArrayString m_AliasLibNames; wxArrayString m_AliasLibNames;
wxString m_UserLibraryPath; wxString m_UserLibraryPath;
wxString m_NetlistFileExtension; wxString m_NetlistFileExtension;
wxString m_DocModulesFileName; wxString m_DocModulesFileName;
FOOTPRINT_LIST m_footprints; FOOTPRINT_LIST m_footprints;
COMPONENT_LIST m_components; COMPONENT_LIST m_components;
protected: protected:
int m_undefinedComponentCnt; int m_undefinedComponentCnt;
@ -45,9 +44,8 @@ protected:
bool m_isEESchemaNetlist; bool m_isEESchemaNetlist;
PARAM_CFG_ARRAY m_projectFileParams; PARAM_CFG_ARRAY m_projectFileParams;
public: public: CVPCB_MAINFRAME( const wxString& title,
CVPCB_MAINFRAME( const wxString& title, long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
~CVPCB_MAINFRAME(); ~CVPCB_MAINFRAME();
void OnLeftClick( wxListEvent& event ); void OnLeftClick( wxListEvent& event );
@ -108,21 +106,21 @@ public:
* fills m_footprints * fills m_footprints
* @return true if libraries are found, false otherwise. * @return true if libraries are found, false otherwise.
*/ */
bool LoadFootprintFiles( ); bool LoadFootprintFiles();
/** /**
* function GenNetlistPcbnew * function GenNetlistPcbnew
* writes the output netlist file * writes the output netlist file
* *
*/ */
int GenNetlistPcbnew( FILE* f, bool isEESchemaNetlist = true ); int GenNetlistPcbnew( FILE* f, bool isEESchemaNetlist = true );
/** /**
* Function LoadComponentFile * Function LoadComponentFile
* Loads the .cmp file that stores the component/footprint association. * Loads the .cmp file that stores the component/footprint association.
* @param aCmpFileName = the full filename of .cmp file to load * @param aCmpFileName = the full filename of .cmp file to load
*/ */
bool LoadComponentFile( const wxString& aCmpFileName ); bool LoadComponentFile( const wxString& aCmpFileName );
PARAM_CFG_ARRAY& GetProjectFileParameters( void ); PARAM_CFG_ARRAY& GetProjectFileParameters( void );

View File

@ -31,28 +31,32 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
FootprintName = m_FootprintList->GetSelectedFootprint(); FootprintName = m_FootprintList->GetSelectedFootprint();
if( DrawFrame == NULL ) if( m_DisplayFootprintFrame == NULL )
{ {
DrawFrame = new DISPLAY_FOOTPRINTS_FRAME( this, _( "Module" ), m_DisplayFootprintFrame = new DISPLAY_FOOTPRINTS_FRAME( this, _( "Module" ),
wxPoint( 0, 0 ), wxPoint( 0, 0 ),
wxSize( 600, 400 ), wxSize( 600, 400 ),
KICAD_DEFAULT_DRAWFRAME_STYLE ); KICAD_DEFAULT_DRAWFRAME_STYLE );
IsNew = true; IsNew = true;
DrawFrame->Show( true ); m_DisplayFootprintFrame->Show( true );
} }
else else
{ {
DrawFrame->Raise(); // Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if( m_DisplayFootprintFrame->IsIconized() )
m_DisplayFootprintFrame->Iconize( false );
m_DisplayFootprintFrame->Raise();
// Raising the window does not set the focus on Linux. This should work on any platform. // Raising the window does not set the focus on Linux. This should work on any platform.
if( wxWindow::FindFocus() != DrawFrame ) if( wxWindow::FindFocus() != m_DisplayFootprintFrame )
DrawFrame->SetFocus(); m_DisplayFootprintFrame->SetFocus();
} }
if( !FootprintName.IsEmpty() ) if( !FootprintName.IsEmpty() )
{ {
msg = _( "Footprint: " ) + FootprintName; msg = _( "Footprint: " ) + FootprintName;
DrawFrame->SetTitle( msg ); m_DisplayFootprintFrame->SetTitle( msg );
FOOTPRINT_INFO* Module = m_footprints.GetModuleInfo( FootprintName ); FOOTPRINT_INFO* Module = m_footprints.GetModuleInfo( FootprintName );
msg = _( "Lib: " ); msg = _( "Lib: " );
@ -61,32 +65,32 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
else else
msg += wxT( "???" ); msg += wxT( "???" );
DrawFrame->SetStatusText( msg, 0 ); m_DisplayFootprintFrame->SetStatusText( msg, 0 );
if( DrawFrame->GetBoard()->m_Modules.GetCount() ) if( m_DisplayFootprintFrame->GetBoard()->m_Modules.GetCount() )
{ {
// there is only one module in the list // there is only one module in the list
DrawFrame->GetBoard()->m_Modules.DeleteAll(); m_DisplayFootprintFrame->GetBoard()->m_Modules.DeleteAll();
} }
MODULE* mod = DrawFrame->Get_Module( FootprintName ); MODULE* mod = m_DisplayFootprintFrame->Get_Module( FootprintName );
if( mod ) if( mod )
DrawFrame->GetBoard()->m_Modules.PushBack( mod ); m_DisplayFootprintFrame->GetBoard()->m_Modules.PushBack( mod );
DrawFrame->Zoom_Automatique( false ); m_DisplayFootprintFrame->Zoom_Automatique( false );
DrawFrame->DrawPanel->Refresh(); m_DisplayFootprintFrame->DrawPanel->Refresh();
DrawFrame->UpdateStatusBar(); /* Display new cursor coordinates and zoom value */ m_DisplayFootprintFrame->UpdateStatusBar(); /* Display new cursor coordinates and zoom value */
if( DrawFrame->m_Draw3DFrame ) if( m_DisplayFootprintFrame->m_Draw3DFrame )
DrawFrame->m_Draw3DFrame->NewDisplay(); m_DisplayFootprintFrame->m_Draw3DFrame->NewDisplay();
} }
else if( !IsNew ) else if( !IsNew )
{ {
DrawFrame->Refresh(); m_DisplayFootprintFrame->Refresh();
if( DrawFrame->m_Draw3DFrame ) if( m_DisplayFootprintFrame->m_Draw3DFrame )
DrawFrame->m_Draw3DFrame->NewDisplay(); m_DisplayFootprintFrame->m_Draw3DFrame->NewDisplay();
} }
} }

View File

@ -115,6 +115,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig ) EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig )

View File

@ -496,8 +496,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_( "&Contents" ), _( "&Contents" ),
_( "Open the Eeschema handbook" ), _( "Open the Eeschema handbook" ),
online_help_xpm ); online_help_xpm );
ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_INDEX,
_( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
help_xpm );
// About EESchema // About EESchema
helpMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( helpMenu, ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_ABOUT, wxID_ABOUT,
_( "&About EESchema" ), _( "&About EESchema" ),

View File

@ -244,8 +244,14 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
_( "&Contents" ), _( "&Contents" ),
_( "Open the eeschema manual" ), _( "Open the eeschema manual" ),
online_help_xpm ); online_help_xpm );
ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_INDEX,
_( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
help_xpm );
// About EESchema // About EESchema
helpMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( helpMenu, ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_ABOUT, wxID_ABOUT,
_( "&About EESchema" ), _( "&About EESchema" ),

View File

@ -103,6 +103,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL( ID_POPUP_SCH_MOVE_ITEM, SCH_EDIT_FRAME::OnMoveItem ) EVT_TOOL( ID_POPUP_SCH_MOVE_ITEM, SCH_EDIT_FRAME::OnMoveItem )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Tools and buttons for vertical toolbar. // Tools and buttons for vertical toolbar.

View File

@ -37,6 +37,7 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
EVT_MENU( ID_READ_ZIP_ARCHIVE, KICAD_MANAGER_FRAME::OnUnarchiveFiles ) EVT_MENU( ID_READ_ZIP_ARCHIVE, KICAD_MANAGER_FRAME::OnUnarchiveFiles )
EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh ) EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh )
EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout )
/* Range menu events */ /* Range menu events */
@ -227,6 +228,11 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
_( "&Contents" ), _( "&Contents" ),
_( "Open the Kicad handbook" ), _( "Open the Kicad handbook" ),
online_help_xpm ); online_help_xpm );
ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_INDEX,
_( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
help_xpm );
// Separator // Separator
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();

View File

@ -17,7 +17,7 @@
; General Product Description Definitions ; General Product Description Definitions
!define PRODUCT_NAME "KiCad" !define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.07.19" !define PRODUCT_VERSION "2011.08.04"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/" !define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/" !define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME "" !define COMPANY_NAME ""

View File

@ -168,6 +168,8 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
} }
else else
{ {
if( m_ModuleEditFrame->IsIconized() )
m_ModuleEditFrame->Iconize( false );
m_ModuleEditFrame->Raise(); m_ModuleEditFrame->Raise();
// Raising the window does not set the focus on Linux. This should work on // Raising the window does not set the focus on Linux. This should work on

View File

@ -303,20 +303,23 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu ); AddHelpVersionInfoMenuEntry( helpMenu );
// Contents // Contents
item = new wxMenuItem( helpMenu, ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_HELP, wxID_HELP,
_( "&Contents" ), _( "&Contents" ),
_( "Open the PCBNew handbook" ) ); _( "Open the PCBNew handbook" ),
SET_BITMAP( online_help_xpm ); online_help_xpm );
helpMenu->Append( item ); ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_INDEX,
_( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
help_xpm );
// About PCBNew // About PCBNew
item = new wxMenuItem( helpMenu, helpMenu->AppendSeparator();
wxID_ABOUT, ADD_MENUITEM_WITH_HELP( helpMenu, wxID_ABOUT,
_( "&About PCBNew" ), _( "&About PCBNew" ),
_( "About PCBNew PCB designer" ) ); _( "About PCBNew PCB designer" ),
SET_BITMAP( info_xpm ); info_xpm );
helpMenu->Append( item );
// Append menus to the menubar // Append menus to the menubar
menuBar->Append( fileMenu, _( "&File" ) ); menuBar->Append( fileMenu, _( "&File" ) );

View File

@ -644,19 +644,23 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu ); AddHelpVersionInfoMenuEntry( helpMenu );
// Contents // Contents
item = new wxMenuItem( helpMenu, wxID_HELP, ADD_MENUITEM_WITH_HELP( helpMenu,
_( "&Contents" ), wxID_HELP,
_( "Open the PCBNew handbook" ) ); _( "&Contents" ),
SET_BITMAP( online_help_xpm ); _( "Open the PCBNew handbook" ),
helpMenu->Append( item ); online_help_xpm );
ADD_MENUITEM_WITH_HELP( helpMenu,
wxID_INDEX,
_( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
help_xpm );
// About // About
item = new wxMenuItem( helpMenu, wxID_ABOUT, helpMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( helpMenu, wxID_ABOUT,
_( "&About PCBNew" ), _( "&About PCBNew" ),
_( "About PCBnew printed circuit board designer" )); _( "About PCBnew printed circuit board designer" ),
SET_BITMAP( info_xpm ); info_xpm );
helpMenu->Append( item );
/** /**
* Append all menus to the menuBar * Append all menus to the menuBar

View File

@ -325,6 +325,10 @@ void WinEDA_ModuleEditFrame::Show3D_Frame( wxCommandEvent& event )
{ {
if( m_Draw3DFrame ) if( m_Draw3DFrame )
{ {
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if( m_Draw3DFrame->IsIconized() )
m_Draw3DFrame->Iconize( false );
m_Draw3DFrame->Raise(); m_Draw3DFrame->Raise();
// Raising the window does not set the focus on Linux. This should work on any platform. // Raising the window does not set the focus on Linux. This should work on any platform.

View File

@ -140,6 +140,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
// Menu Help // Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Menu 3D Frame // Menu 3D Frame
@ -483,6 +484,10 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event )
{ {
if( m_Draw3DFrame ) if( m_Draw3DFrame )
{ {
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if( m_Draw3DFrame->IsIconized() )
m_Draw3DFrame->Iconize( false );
m_Draw3DFrame->Raise(); m_Draw3DFrame->Raise();
// Raising the window does not set the focus on Linux. This should work on any platform. // Raising the window does not set the focus on Linux. This should work on any platform.

View File

@ -1,4 +1,4 @@
release version: release version:
2011 jul 19 2011 aug 04
files (.zip,.tgz): files (.zip,.tgz):
kicad-2011-07-19 kicad-2011-08-04