diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index 62d58f6fff..21daf44a12 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -24,7 +24,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" @@ -39,7 +38,6 @@ #include "bitmap2component.xpm" -#include "bitmaps.h" #include "colors_selection.h" #include "build_version.h" @@ -89,6 +87,7 @@ private: void ExportFile( FILE* aOutfile, int aFormat ); }; + BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) { m_Config = new wxConfig(); @@ -116,6 +115,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) Centre(); } + BM2CMP_FRAME::~BM2CMP_FRAME() { if( ( m_Config == NULL ) || IsIconized() ) @@ -133,7 +133,7 @@ BM2CMP_FRAME::~BM2CMP_FRAME() delete m_Config; - /* This needed for OSX: avoids furter OnDraw processing after this + /* This needed for OSX: avoids further OnDraw processing after this * destructor and before the native window is destroyed */ this->Freeze( ); @@ -156,7 +156,7 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event ) m_InitialPicturePanel->PrepareDC( pict_dc ); m_GreyscalePicturePanel->PrepareDC( greyscale_dc ); m_BNPicturePanel->PrepareDC( nb_dc ); - + // OSX crashes with empty bitmaps (on initial refreshes) if(m_Pict_Bitmap.IsOk() && m_Greyscale_Bitmap.IsOk() && m_BN_Bitmap.IsOk()) { @@ -166,12 +166,14 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event ) } } + /* Called to load a bitmap file */ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) { wxFileName fn(m_BitmapFileName); wxString path = fn.GetPath(); + if( path.IsEmpty() || !wxDirExists(path) ) path = wxGetCwd(); @@ -182,7 +184,9 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) if( diag != wxID_OK ) return; + wxString fullFilename = FileDlg.GetPath(); + if( ! LoadFile( fullFilename ) ) return; @@ -192,6 +196,7 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) Refresh(); } + bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) { m_BitmapFileName = aFullFileName; @@ -232,6 +237,7 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) return true; } + void BM2CMP_FRAME::Binarize( double aThreshold ) { unsigned int pixin; @@ -244,10 +250,12 @@ void BM2CMP_FRAME::Binarize( double aThreshold ) for( int x = 1; x < w; x++ ) { pixin = m_Greyscale_Image.GetGreen( x, y ); + if( pixin < threshold ) pixout = 0; else pixout = 255; + m_NB_Image.SetRGB( x, y, pixout, pixout, pixout ); } @@ -289,8 +297,10 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) { wxFileName fn(m_ConvertedFileName); wxString path = fn.GetPath(); + if( path.IsEmpty() || !wxDirExists(path) ) path = ::wxGetCwd(); + wxString msg = _( "Schematic lib file (*.lib)|*.lib" ); wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString, msg, @@ -299,10 +309,12 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) if( diag != wxID_OK ) return; + m_ConvertedFileName = FileDlg.GetPath(); FILE* outfile; outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); + if( outfile == NULL ) { wxString msg; @@ -320,8 +332,10 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event ) { wxFileName fn(m_ConvertedFileName); wxString path = fn.GetPath(); + if( path.IsEmpty() || !wxDirExists(path) ) path = ::wxGetCwd(); + wxString msg = _( "Footprint file (*.mod)|*.mod" ); wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ), path, wxEmptyString, @@ -331,10 +345,13 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event ) if( diag != wxID_OK ) return; + m_ConvertedFileName = FileDlg.GetPath(); + FILE* outfile; outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); + if( outfile == NULL ) { wxString msg; @@ -353,6 +370,7 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) int h = m_NB_Image.GetHeight(); int w = m_NB_Image.GetWidth(); potrace_bitmap_t* potrace_bitmap = bm_new( w, h ); + if( !potrace_bitmap ) { wxString msg; @@ -377,18 +395,18 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) // BM_TO_CMP_APP -void WinEDA_App::MacOpenFile(const wxString &fileName) +void EDA_APP::MacOpenFile(const wxString &fileName) { } -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) ///----------------------------------------------------------------------------- // BM_TO_CMP_APP // main program //----------------------------------------------------------------------------- -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { wxInitAllImageHandlers(); diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index 6d30e651e2..037d7d6421 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -16,7 +16,7 @@ /* Read from Common config the Pdf browser choice */ -void WinEDA_App::ReadPdfBrowserInfos() +void EDA_APP::ReadPdfBrowserInfos() { wxASSERT( m_EDA_CommonConfig != NULL ); @@ -32,7 +32,7 @@ void WinEDA_App::ReadPdfBrowserInfos() /* Write into Common config the Pdf browser choice */ -void WinEDA_App::WritePdfBrowserInfos() +void EDA_APP::WritePdfBrowserInfos() { wxASSERT( m_EDA_CommonConfig != NULL ); diff --git a/common/edaappl.cpp b/common/edaappl.cpp index f423eda434..e2c1fd784c 100644 --- a/common/edaappl.cpp +++ b/common/edaappl.cpp @@ -237,7 +237,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = }; -WinEDA_App::WinEDA_App() +EDA_APP::EDA_APP() { m_Checker = NULL; m_HtmlCtrl = NULL; @@ -251,7 +251,7 @@ WinEDA_App::WinEDA_App() } -WinEDA_App::~WinEDA_App() +EDA_APP::~EDA_APP() { SaveSettings(); @@ -271,7 +271,7 @@ WinEDA_App::~WinEDA_App() } -void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId ) +void EDA_APP::InitEDA_Appl( const wxString& aName, EDA_APP_T aId ) { wxString EnvLang; @@ -349,7 +349,7 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId ) } -void WinEDA_App::InitOnLineHelp() +void EDA_APP::InitOnLineHelp() { wxString fullfilename = FindKicadHelpPath(); @@ -376,7 +376,7 @@ void WinEDA_App::InitOnLineHelp() } -bool WinEDA_App::SetBinDir() +bool EDA_APP::SetBinDir() { /* Apple MacOSx */ #ifdef __APPLE__ @@ -460,7 +460,7 @@ bool WinEDA_App::SetBinDir() } -void WinEDA_App::SetDefaultSearchPaths( void ) +void EDA_APP::SetDefaultSearchPaths( void ) { size_t i; wxString path = m_BinDir; @@ -554,7 +554,7 @@ void WinEDA_App::SetDefaultSearchPaths( void ) /* Add schematic library file path to search path list. * we must add /library and /library/doc */ - if( m_Id == APP_TYPE_EESCHEMA ) + if( m_Id == APP_EESCHEMA_T ) { fn.AppendDir( wxT( "library" ) ); @@ -576,7 +576,7 @@ void WinEDA_App::SetDefaultSearchPaths( void ) } /* Add PCB library file path to search path list. */ - if( ( m_Id == APP_TYPE_PCBNEW ) || ( m_Id == APP_TYPE_CVPCB ) ) + if( ( m_Id == APP_PCBNEW_T ) || ( m_Id == APP_CVPCB_T ) ) { fn.AppendDir( wxT( "modules" ) ); @@ -611,7 +611,7 @@ void WinEDA_App::SetDefaultSearchPaths( void ) } -void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory ) +void EDA_APP::GetSettings( bool aReopenLastUsedDirectory ) { wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL ); @@ -669,7 +669,7 @@ void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory ) } -void WinEDA_App::SaveSettings() +void EDA_APP::SaveSettings() { wxASSERT( m_EDA_Config != NULL ); m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits ); @@ -681,7 +681,7 @@ void WinEDA_App::SaveSettings() } -bool WinEDA_App::SetLanguage( bool first_time ) +bool EDA_APP::SetLanguage( bool first_time ) { bool retv = true; @@ -757,7 +757,7 @@ bool WinEDA_App::SetLanguage( bool first_time ) } -void WinEDA_App::SetLanguageIdentifier( int menu_id ) +void EDA_APP::SetLanguageIdentifier( int menu_id ) { wxLogDebug( wxT( "Select language ID %d from %d possible languages." ), menu_id, LANGUAGE_DESCR_COUNT ); @@ -773,7 +773,7 @@ void WinEDA_App::SetLanguageIdentifier( int menu_id ) } -void WinEDA_App::SetLanguagePath( void ) +void EDA_APP::SetLanguagePath( void ) { size_t i; @@ -811,7 +811,7 @@ void WinEDA_App::SetLanguagePath( void ) } -void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu ) +void EDA_APP::AddMenuLanguageList( wxMenu* MasterMenu ) { wxMenu* menu = NULL; wxMenuItem* item; @@ -858,7 +858,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu ) } -wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename, +wxString EDA_APP::FindFileInSearchPaths( const wxString& filename, const wxArrayString* subdirs ) { size_t i, j; @@ -885,7 +885,7 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename, } -wxString WinEDA_App::GetHelpFile( void ) +wxString EDA_APP::GetHelpFile( void ) { wxString fn; wxArrayString subdirs, altsubdirs; @@ -963,7 +963,7 @@ wxString WinEDA_App::GetHelpFile( void ) } -wxString WinEDA_App::GetLibraryFile( const wxString& filename ) +wxString EDA_APP::GetLibraryFile( const wxString& filename ) { wxArrayString subdirs; @@ -978,7 +978,7 @@ wxString WinEDA_App::GetLibraryFile( const wxString& filename ) } -wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch ) +wxString EDA_APP::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch ) { if( !m_LastVisitedLibPath.IsEmpty() ) return m_LastVisitedLibPath; @@ -1021,13 +1021,13 @@ wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSea } -void WinEDA_App::SaveLastVisitedLibraryPath( const wxString& aPath ) +void EDA_APP::SaveLastVisitedLibraryPath( const wxString& aPath ) { m_LastVisitedLibPath = aPath; } -wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename ) +wxString EDA_APP::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename ) { /* If the library path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -1065,7 +1065,7 @@ wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aF } -wxString WinEDA_App::FindLibraryPath( const wxString& aFileName ) +wxString EDA_APP::FindLibraryPath( const wxString& aFileName ) { if( wxFileName::FileExists( aFileName ) ) return aFileName; @@ -1074,7 +1074,7 @@ wxString WinEDA_App::FindLibraryPath( const wxString& aFileName ) } -void WinEDA_App::RemoveLibraryPath( const wxString& aPaths ) +void EDA_APP::RemoveLibraryPath( const wxString& aPaths ) { wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) ); @@ -1090,7 +1090,7 @@ void WinEDA_App::RemoveLibraryPath( const wxString& aPaths ) } -void WinEDA_App::InsertLibraryPath( const wxString& aPaths, size_t aIndex ) +void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex ) { wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) ); diff --git a/common/gestfich.cpp b/common/gestfich.cpp index e66f162f41..fd84120fed 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -520,20 +520,20 @@ wxString ReturnKicadDatasPath() if( PathFound ) { data_path.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); + if( data_path.Last() != '/' ) data_path += UNIX_STRING_DIR_SEP; } else + { data_path.Empty(); + } return data_path; } -/* - * Return the preferred editor name - */ -wxString& WinEDA_App::GetEditorName() +wxString& EDA_APP::GetEditorName() { wxString editorname = m_EditorName; diff --git a/common/projet_config.cpp b/common/projet_config.cpp index 37a044435b..4545b4abae 100644 --- a/common/projet_config.cpp +++ b/common/projet_config.cpp @@ -22,19 +22,9 @@ #define FORCE_LOCAL_CONFIG true -/** - * Creates or recreates the kicad project file. (filename.pro) - * Initialize: - * G_Prj_Config - * G_Prj_Config_LocalFilename - * G_Prj_Default_Config_FullFilename - * Return: - * True if local config - * False if default config - */ -bool WinEDA_App::ReCreatePrjConfig( const wxString& fileName, - const wxString& GroupName, - bool ForceUseLocalConfig ) +bool EDA_APP::ReCreatePrjConfig( const wxString& fileName, + const wxString& GroupName, + bool ForceUseLocalConfig ) { wxFileName fn = fileName; wxString defaultFileName; @@ -89,7 +79,9 @@ bool WinEDA_App::ReCreatePrjConfig( const wxString& fileName, m_ProjectConfig->SetPath( wxCONFIG_PATH_SEPARATOR ); if( version > 0 ) + { return true; + } else { delete m_ProjectConfig; // Version incorrect @@ -118,15 +110,9 @@ bool WinEDA_App::ReCreatePrjConfig( const wxString& fileName, } -/** - * Function WriteProjectConfig - * Save the current "projet" parameters - * saved parameters are parameters that have the .m_Setup member set to false - * saving file is the .pro file project - */ -void WinEDA_App::WriteProjectConfig( const wxString& fileName, - const wxString& GroupName, - PARAM_CFG_BASE** List ) +void EDA_APP::WriteProjectConfig( const wxString& fileName, + const wxString& GroupName, + PARAM_CFG_BASE** List ) { PARAM_CFG_BASE* pt_cfg; wxString msg; @@ -155,6 +141,7 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName, for( ; List != NULL && *List != NULL; List++ ) { pt_cfg = *List; + if( pt_cfg->m_Group ) m_ProjectConfig->SetPath( pt_cfg->m_Group ); else @@ -169,7 +156,9 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName, m_ProjectConfig->DeleteGroup( pt_cfg->m_Ident ); } else + { pt_cfg->SaveParam( m_ProjectConfig ); + } } m_ProjectConfig->SetPath( UNIX_STRING_DIR_SEP ); @@ -178,9 +167,9 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName, } -void WinEDA_App::WriteProjectConfig( const wxString& fileName, - const wxString& GroupName, - PARAM_CFG_ARRAY& params ) +void EDA_APP::WriteProjectConfig( const wxString& fileName, + const wxString& GroupName, + PARAM_CFG_ARRAY& params ) { ReCreatePrjConfig( fileName, GroupName, FORCE_LOCAL_CONFIG ); @@ -216,7 +205,9 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName, m_ProjectConfig->DeleteGroup( param.m_Ident ); } else + { param.SaveParam( m_ProjectConfig ); + } } m_ProjectConfig->SetPath( UNIX_STRING_DIR_SEP ); @@ -231,7 +222,7 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName, * saved parameters are parameters that have the .m_Setup member set to true * @param aList = array of PARAM_CFG_BASE pointers */ -void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_BASE** aList ) +void EDA_APP::SaveCurrentSetupValues( PARAM_CFG_BASE** aList ) { PARAM_CFG_BASE* pt_cfg; @@ -250,12 +241,14 @@ void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_BASE** aList ) m_EDA_Config->DeleteGroup( pt_cfg->m_Ident ); } else + { pt_cfg->SaveParam( m_EDA_Config ); + } } } -void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_ARRAY& List ) +void EDA_APP::SaveCurrentSetupValues( PARAM_CFG_ARRAY& List ) { if( m_EDA_Config == NULL ) return; @@ -276,24 +269,10 @@ void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_ARRAY& List ) } -/** - * Function ReadProjectConfig - * Read the current "projet" parameters - * Parameters are parameters that have the .m_Setup member set to false - * read file is the .pro file project - * - * if Load_Only_if_New == true, this file is read only if it differs from - * the current config (different dates ) - * - * @return true if read. - * Also set: - * wxGetApp().m_CurrentOptionFileDateAndTime - * wxGetApp().m_CurrentOptionFile - */ -bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - PARAM_CFG_BASE** List, - bool Load_Only_if_New ) +bool EDA_APP::ReadProjectConfig( const wxString& local_config_filename, + const wxString& GroupName, + PARAM_CFG_BASE** List, + bool Load_Only_if_New ) { PARAM_CFG_BASE* pt_cfg; wxString timestamp; @@ -302,6 +281,7 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, m_ProjectConfig->SetPath( wxCONFIG_PATH_SEPARATOR ); timestamp = m_ProjectConfig->Read( wxT( "update" ) ); + if( Load_Only_if_New && ( !timestamp.IsEmpty() ) && (timestamp == m_CurrentOptionFileDateAndTime) ) { @@ -311,12 +291,13 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, m_CurrentOptionFileDateAndTime = timestamp; if( !g_Prj_Default_Config_FullFilename.IsEmpty() ) + { m_CurrentOptionFile = g_Prj_Default_Config_FullFilename; + } else { if( wxPathOnly( g_Prj_Config_LocalFilename ).IsEmpty() ) - m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP + - g_Prj_Config_LocalFilename; + m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP + g_Prj_Config_LocalFilename; else m_CurrentOptionFile = g_Prj_Config_LocalFilename; } @@ -324,6 +305,7 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, for( ; List != NULL && *List != NULL; List++ ) { pt_cfg = *List; + if( pt_cfg->m_Group ) m_ProjectConfig->SetPath( pt_cfg->m_Group ); else @@ -342,10 +324,10 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, } -bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - PARAM_CFG_ARRAY& params, - bool Load_Only_if_New ) +bool EDA_APP::ReadProjectConfig( const wxString& local_config_filename, + const wxString& GroupName, + PARAM_CFG_ARRAY& params, + bool Load_Only_if_New ) { wxString timestamp; @@ -353,6 +335,7 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, m_ProjectConfig->SetPath( wxCONFIG_PATH_SEPARATOR ); timestamp = m_ProjectConfig->Read( wxT( "update" ) ); + if( Load_Only_if_New && ( !timestamp.IsEmpty() ) && (timestamp == m_CurrentOptionFileDateAndTime) ) { @@ -362,12 +345,13 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, m_CurrentOptionFileDateAndTime = timestamp; if( !g_Prj_Default_Config_FullFilename.IsEmpty() ) + { m_CurrentOptionFile = g_Prj_Default_Config_FullFilename; + } else { if( wxPathOnly( g_Prj_Config_LocalFilename ).IsEmpty() ) - m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP + - g_Prj_Config_LocalFilename; + m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP + g_Prj_Config_LocalFilename; else m_CurrentOptionFile = g_Prj_Config_LocalFilename; } @@ -392,19 +376,14 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, } -/** - * Function ReadCurrentSetupValues - * Raed the current setup values previously saved, from m_EDA_Config - * saved parameters are parameters that have the .m_Setup member set to true - * @param aList = array of PARAM_CFG_BASE pointers - */ -void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_BASE** aList ) +void EDA_APP::ReadCurrentSetupValues( PARAM_CFG_BASE** aList ) { PARAM_CFG_BASE* pt_cfg; for( ; *aList != NULL; aList++ ) { pt_cfg = *aList; + if( pt_cfg->m_Setup == false ) continue; @@ -413,7 +392,7 @@ void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_BASE** aList ) } -void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_ARRAY& List ) +void EDA_APP::ReadCurrentSetupValues( PARAM_CFG_ARRAY& List ) { BOOST_FOREACH( PARAM_CFG_BASE& param, List ) { @@ -468,6 +447,7 @@ void PARAM_CFG_INT::ReadParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + int itmp = aConfig->Read( m_Ident, m_Default ); if( (itmp < m_Min) || (itmp > m_Max) ) @@ -485,6 +465,7 @@ void PARAM_CFG_INT::SaveParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + aConfig->Write( m_Ident, *m_Pt_param ); } @@ -536,6 +517,7 @@ void PARAM_CFG_SETCOLOR::SaveParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + aConfig->Write( m_Ident, *m_Pt_param ); } @@ -577,18 +559,23 @@ void PARAM_CFG_DOUBLE::ReadParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + double ftmp = 0; wxString msg; msg = aConfig->Read( m_Ident, wxT( "" ) ); if( msg.IsEmpty() ) + { ftmp = m_Default; + } else { msg.ToDouble( &ftmp ); + if( (ftmp < m_Min) || (ftmp > m_Max) ) ftmp = m_Default; } + *m_Pt_param = ftmp; } @@ -601,6 +588,7 @@ void PARAM_CFG_DOUBLE::SaveParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + aConfig->Write( m_Ident, *m_Pt_param ); } @@ -635,6 +623,7 @@ void PARAM_CFG_BOOL::ReadParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + int itmp = aConfig->Read( m_Ident, (int) m_Default ); *m_Pt_param = itmp ? true : false; @@ -649,6 +638,7 @@ void PARAM_CFG_BOOL::SaveParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + aConfig->Write( m_Ident, *m_Pt_param ); } @@ -694,6 +684,7 @@ void PARAM_CFG_WXSTRING::SaveParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + aConfig->Write( m_Ident, *m_Pt_param ); } @@ -735,6 +726,7 @@ void PARAM_CFG_FILENAME::SaveParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + wxString prm = *m_Pt_param; // filenames are stored using Unix notation prm.Replace(wxT("\\"), wxT("/") ); @@ -759,10 +751,12 @@ void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig ) { if( m_Pt_param == NULL || aConfig == NULL ) return; + int indexlib = 1; // We start indexlib to 1 because first // lib name is LibName1 wxString libname, id_lib; wxArrayString* libname_list = m_Pt_param; + while( 1 ) { id_lib = m_Ident; @@ -795,6 +789,7 @@ void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig ) unsigned indexlib = 0; wxString configkey; wxString libname; + for( ; indexlib < libname_list->GetCount(); indexlib++ ) { configkey = m_Ident; diff --git a/cvpcb/class_components_listbox.cpp b/cvpcb/class_components_listbox.cpp index b5bfd940f6..be44ee8020 100644 --- a/cvpcb/class_components_listbox.cpp +++ b/cvpcb/class_components_listbox.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "cvpcb.h" #include "cvpcb_mainframe.h" diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 003ac83081..6b1d10e24b 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "cvpcb.h" #include "cvpcb_mainframe.h" diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 6221d850bc..435db2a6ea 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -5,13 +5,11 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "cvpcb.h" #include "zones.h" -#include "bitmaps.h" #include "cvpcb_mainframe.h" #include "colors_selection.h" #include "cvpcb_id.h" @@ -39,7 +37,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) ); * MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics */ -void WinEDA_App::MacOpenFile(const wxString &fileName) +void EDA_APP::MacOpenFile(const wxString &fileName) { wxFileName filename = fileName; wxString oldPath; @@ -62,20 +60,20 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) } // Create a new application object -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) /************************************/ /* Called to initialize the program */ /************************************/ -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { wxFileName filename; wxString message; CVPCB_MAINFRAME* frame = NULL; - InitEDA_Appl( wxT( "CvPcb" ), APP_TYPE_CVPCB ); + InitEDA_Appl( wxT( "CvPcb" ), APP_CVPCB_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { diff --git a/cvpcb/genequiv.cpp b/cvpcb/genequiv.cpp index f4f6d7866b..e07cffee12 100644 --- a/cvpcb/genequiv.cpp +++ b/cvpcb/genequiv.cpp @@ -6,7 +6,6 @@ #include "wxstruct.h" #include "confirm.h" #include "gestfich.h" -#include "macros.h" #include "cvpcb.h" #include "cvpcb_mainframe.h" diff --git a/cvpcb/listboxes.cpp b/cvpcb/listboxes.cpp index 5769011574..0535b93808 100644 --- a/cvpcb/listboxes.cpp +++ b/cvpcb/listboxes.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "cvpcb.h" #include "cvpcb_mainframe.h" diff --git a/cvpcb/loadcmp.cpp b/cvpcb/loadcmp.cpp index 0f8a7857dd..b9a1dd2a80 100644 --- a/cvpcb/loadcmp.cpp +++ b/cvpcb/loadcmp.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/cvpcb/readschematicnetlist.cpp b/cvpcb/readschematicnetlist.cpp index a37ee38993..ef152d451a 100644 --- a/cvpcb/readschematicnetlist.cpp +++ b/cvpcb/readschematicnetlist.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "macros.h" diff --git a/cvpcb/savecmp.cpp b/cvpcb/savecmp.cpp index 3bf6f1646e..29ae2219cb 100644 --- a/cvpcb/savecmp.cpp +++ b/cvpcb/savecmp.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/eeschema/annotate.cpp b/eeschema/annotate.cpp index eec3a46122..b28b523443 100644 --- a/eeschema/annotate.cpp +++ b/eeschema/annotate.cpp @@ -6,7 +6,6 @@ #include #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "wxstruct.h" diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index d71c649e6b..3c78e3523b 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -4,7 +4,6 @@ ****************************************************************/ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/eeschema/block.cpp b/eeschema/block.cpp index b23e99729c..84763e9e36 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index 9c41c4df33..3d7cc0ef5e 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "block_commande.h" diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index cb572b7ae1..564fdc2395 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -8,7 +8,6 @@ #include #include "fctsys.h" -#include "common.h" #include "class_sch_screen.h" #include "kicad_string.h" diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 7a3a34aa6f..487e90f492 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/busentry.cpp b/eeschema/busentry.cpp index 77afe18e9f..1aea9cdac1 100644 --- a/eeschema/busentry.cpp +++ b/eeschema/busentry.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "eeschema_id.h" #include "confirm.h" diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index 8ccc067972..ba64a6aaf7 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -3,7 +3,6 @@ /*************************/ #include "fctsys.h" -#include "common.h" #include "macros.h" #include "kicad_string.h" #include "class_drawpanel.h" diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index c1854ac6ff..d1531bcecb 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "kicad_string.h" #include "confirm.h" diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 5e17d223d1..2f58ed5245 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" -#include "common.h" #include "macros.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/component_references_lister.cpp b/eeschema/component_references_lister.cpp index 0cb35c9307..c18d40df55 100644 --- a/eeschema/component_references_lister.cpp +++ b/eeschema/component_references_lister.cpp @@ -33,10 +33,8 @@ #include #include "fctsys.h" -#include "common.h" #include "kicad_string.h" #include "wxEeschemaStruct.h" -#include "wxstruct.h" #include "netlist.h" #include "class_sch_screen.h" #include "sch_component.h" diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index d4db4ac71e..b2573c0215 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "macros.h" #include "eda_dde.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/database.cpp b/eeschema/database.cpp index 1d4e42cc3c..387bc8a62b 100644 --- a/eeschema/database.cpp +++ b/eeschema/database.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "confirm.h" #include "eda_doc.h" diff --git a/eeschema/dialogs/annotate_dialog.cpp b/eeschema/dialogs/annotate_dialog.cpp index ce915e69d6..2e4a6e1bd2 100644 --- a/eeschema/dialogs/annotate_dialog.cpp +++ b/eeschema/dialogs/annotate_dialog.cpp @@ -33,8 +33,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "bitmaps.h" -#include "common.h" #include "wxEeschemaStruct.h" #include "class_drawpanel.h" diff --git a/eeschema/dialogs/dialog_SVG_print.cpp b/eeschema/dialogs/dialog_SVG_print.cpp index 6bf3090bc5..73ca5d7c62 100644 --- a/eeschema/dialogs/dialog_SVG_print.cpp +++ b/eeschema/dialogs/dialog_SVG_print.cpp @@ -8,7 +8,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" diff --git a/eeschema/dialogs/dialog_build_BOM.cpp b/eeschema/dialogs/dialog_build_BOM.cpp index cd3db4811f..6b23f356d6 100644 --- a/eeschema/dialogs/dialog_build_BOM.cpp +++ b/eeschema/dialogs/dialog_build_BOM.cpp @@ -8,7 +8,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "kicad_string.h" diff --git a/eeschema/dialogs/dialog_color_config.cpp b/eeschema/dialogs/dialog_color_config.cpp index 8838bd48c8..9117d94584 100644 --- a/eeschema/dialogs/dialog_color_config.cpp +++ b/eeschema/dialogs/dialog_color_config.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "wxstruct.h" #include "class_drawpanel.h" diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index f0dc86ff95..9820abb536 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "class_sch_screen.h" diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index 0a932292af..a845245ba5 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -10,7 +10,6 @@ #include "wx/valgen.h" #include "wxEeschemaStruct.h" -#include "common.h" #include "class_drawpanel.h" #include "general.h" #include "drawtxt.h" diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 06dc190733..ad3fa3eca7 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -6,7 +6,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "class_drawpanel.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp index 81390892b2..56ee35447e 100644 --- a/eeschema/dialogs/dialog_eeschema_config.cpp +++ b/eeschema/dialogs/dialog_eeschema_config.cpp @@ -9,7 +9,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 0d93b0caa4..524e8b3876 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -7,11 +7,9 @@ // License: GPL ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "kicad_string.h" #include "gestfich.h" -#include "bitmaps.h" #include "appl_wxstruct.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/dialogs/dialog_libedit_dimensions.cpp b/eeschema/dialogs/dialog_libedit_dimensions.cpp index 5020a70f5a..4ceddb06bb 100644 --- a/eeschema/dialogs/dialog_libedit_dimensions.cpp +++ b/eeschema/dialogs/dialog_libedit_dimensions.cpp @@ -3,7 +3,6 @@ * Handles the dialog so set current texts and pins sizes in LibEdit */ #include "fctsys.h" -#include "common.h" #include "wxEeschemaStruct.h" #include "general.h" diff --git a/eeschema/dialogs/dialog_plot_schematic_DXF.cpp b/eeschema/dialogs/dialog_plot_schematic_DXF.cpp index d15b5c68d4..e611f46d5f 100644 --- a/eeschema/dialogs/dialog_plot_schematic_DXF.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_DXF.cpp @@ -27,7 +27,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "plot_common.h" #include "confirm.h" diff --git a/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp b/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp index da8fbe662e..c9cb6edc4e 100644 --- a/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp @@ -27,7 +27,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "confirm.h" #include "plot_common.h" #include "worksheet.h" diff --git a/eeschema/dialogs/dialog_plot_schematic_PS.cpp b/eeschema/dialogs/dialog_plot_schematic_PS.cpp index c0c94515d5..89e480644e 100644 --- a/eeschema/dialogs/dialog_plot_schematic_PS.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_PS.cpp @@ -27,7 +27,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "confirm.h" #include "worksheet.h" #include "plot_common.h" diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index 7bb79ba898..630899caa7 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "class_sch_screen.h" diff --git a/eeschema/edit_bitmap.cpp b/eeschema/edit_bitmap.cpp index 3088d8a0fe..2c122e9a0d 100644 --- a/eeschema/edit_bitmap.cpp +++ b/eeschema/edit_bitmap.cpp @@ -31,7 +31,6 @@ #include "macros.h" #include "class_drawpanel.h" #include "trigo.h" -#include "common.h" #include "richio.h" #include "plot_common.h" diff --git a/eeschema/edit_component_in_schematic.cpp b/eeschema/edit_component_in_schematic.cpp index c3e8f5c7dd..d2024e00e2 100644 --- a/eeschema/edit_component_in_schematic.cpp +++ b/eeschema/edit_component_in_schematic.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "class_sch_screen.h" diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index 1de5405814..1d1738b675 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "base_struct.h" #include "drawtxt.h" #include "class_drawpanel.h" diff --git a/eeschema/eeredraw.cpp b/eeschema/eeredraw.cpp index 044bf28642..058a62f330 100644 --- a/eeschema/eeredraw.cpp +++ b/eeschema/eeredraw.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "appl_wxstruct.h" #include "class_sch_screen.h" diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index feb274793b..ce147bf6f4 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -4,11 +4,9 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" -#include "bitmaps.h" #include "eda_dde.h" #include "id.h" #include "class_sch_screen.h" @@ -80,12 +78,12 @@ TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 ); // static object for many reasons) and also declares the accessor function // wxGetApp() which will return the reference of the right type (i.e. MyApp and // not wxApp) -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) /* MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics */ -void WinEDA_App::MacOpenFile( const wxString &fileName ) +void EDA_APP::MacOpenFile( const wxString &fileName ) { wxFileName filename = fileName; SCH_EDIT_FRAME* frame = ((SCH_EDIT_FRAME*) GetTopWindow()); @@ -100,12 +98,12 @@ void WinEDA_App::MacOpenFile( const wxString &fileName ) } -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { wxFileName filename; SCH_EDIT_FRAME* frame = NULL; - InitEDA_Appl( wxT( "EESchema" ), APP_TYPE_EESCHEMA ); + InitEDA_Appl( wxT( "EESchema" ), APP_EESCHEMA_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 19256ed39c..6dc90c70fd 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index 77cff1dd32..9d004665db 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -3,10 +3,8 @@ /**************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "kicad_string.h" -#include "bitmaps.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/events_called_functions_for_edit.cpp b/eeschema/events_called_functions_for_edit.cpp index bb220e1393..ba9ce21cd5 100644 --- a/eeschema/events_called_functions_for_edit.cpp +++ b/eeschema/events_called_functions_for_edit.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "general.h" #include "kicad_device_context.h" diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 4c4145b07f..35cb1cb2e7 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -3,7 +3,6 @@ /****************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" diff --git a/eeschema/find.cpp b/eeschema/find.cpp index 11edc02c94..b0d7828076 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -9,7 +9,6 @@ */ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index bf7ccd9748..07e9be0855 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "class_sch_screen.h" diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 1e3cade248..7dfb384c7d 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -3,10 +3,8 @@ /******************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" -#include "bitmaps.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 6f3712b230..29c7f0a509 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -3,7 +3,6 @@ /***************/ #include "fctsys.h" -#include "common.h" #include "eeschema_id.h" #include "hotkeys.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index 685f369a66..a906b7a3e9 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "plot_common.h" diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index 4f27a9c368..6f35b59f75 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "plot_common.h" diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index e15f84493a..aaafa164e9 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "plot_common.h" diff --git a/eeschema/lib_export.cpp b/eeschema/lib_export.cpp index 9eab8faae7..de2848fe90 100644 --- a/eeschema/lib_export.cpp +++ b/eeschema/lib_export.cpp @@ -9,7 +9,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 8c5faf867a..ee330bdf38 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "base_struct.h" #include "drawtxt.h" diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 987338ff78..be52de47a3 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -11,7 +11,6 @@ #include "drawtxt.h" #include "plot_common.h" #include "wxEeschemaStruct.h" -#include "bitmaps.h" #include "general.h" #include "protos.h" diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 0dcb99db1f..fde94b08b9 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -4,7 +4,7 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" + #include "macros.h" #include "class_drawpanel.h" #include "plot_common.h" diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 79a63d96d4..a6d5b43489 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "plot_common.h" diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index af0722bc8a..c21ff6e3b2 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -9,7 +9,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "plot_common.h" diff --git a/eeschema/libarch.cpp b/eeschema/libarch.cpp index 0120f1bd4e..6622d8a9db 100644 --- a/eeschema/libarch.cpp +++ b/eeschema/libarch.cpp @@ -3,7 +3,6 @@ /* Module for generation of component archive files. */ /*****************************************************/ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "class_sch_screen.h" #include "wxstruct.h" diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 30b967588c..59dd71cea0 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "appl_wxstruct.h" #include "class_drawpanel.h" diff --git a/eeschema/libedit_onleftclick.cpp b/eeschema/libedit_onleftclick.cpp index 28364ab3dc..ea343eb5d2 100644 --- a/eeschema/libedit_onleftclick.cpp +++ b/eeschema/libedit_onleftclick.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "eeschema_id.h" diff --git a/eeschema/libedit_plot_component.cpp b/eeschema/libedit_plot_component.cpp index 2a1354c6a6..356f1f7453 100644 --- a/eeschema/libedit_plot_component.cpp +++ b/eeschema/libedit_plot_component.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "appl_wxstruct.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/eeschema/libedit_undo_redo.cpp b/eeschema/libedit_undo_redo.cpp index dfb7af9d9c..b59907ff12 100644 --- a/eeschema/libedit_undo_redo.cpp +++ b/eeschema/libedit_undo_redo.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "class_drawpanel.h" -#include "common.h" #include "general.h" #include "protos.h" #include "libeditframe.h" diff --git a/eeschema/libfield.cpp b/eeschema/libfield.cpp index 26c640192b..d9a9878a6b 100644 --- a/eeschema/libfield.cpp +++ b/eeschema/libfield.cpp @@ -4,13 +4,11 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "class_sch_screen.h" #include "general.h" -//#include "protos.h" #include "sch_component.h" #include "libeditframe.h" #include "class_library.h" diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 14169bad8a..9743f8fa2f 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -31,7 +31,6 @@ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index 3ce4e348da..09e7a8e6e7 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -3,7 +3,6 @@ /*****************/ #include "fctsys.h" -#include "common.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp index bd220b1fbd..d685eb74aa 100644 --- a/eeschema/netlist_control.cpp +++ b/eeschema/netlist_control.cpp @@ -14,7 +14,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/onleftclick.cpp b/eeschema/onleftclick.cpp index 62570f584a..10ace3dcc5 100644 --- a/eeschema/onleftclick.cpp +++ b/eeschema/onleftclick.cpp @@ -3,7 +3,6 @@ /*******************/ #include "fctsys.h" -#include "common.h" #include "eeschema_id.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp index 55e0688071..41c0765451 100644 --- a/eeschema/operations_on_items_lists.cpp +++ b/eeschema/operations_on_items_lists.cpp @@ -6,7 +6,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 0f3772e55b..8595088a06 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -3,7 +3,6 @@ /***************************/ #include "fctsys.h" -#include "common.h" #include "gr_basic.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp index 233bfd4921..a671308bf6 100644 --- a/eeschema/sch_bitmap.cpp +++ b/eeschema/sch_bitmap.cpp @@ -31,7 +31,6 @@ #include "macros.h" #include "class_drawpanel.h" #include "trigo.h" -#include "common.h" #include "richio.h" #include "plot_common.h" diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index ac0171b637..e11eae846d 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -6,7 +6,6 @@ #include "appl_wxstruct.h" #include "class_drawpanel.h" #include "gr_basic.h" -#include "common.h" #include "trigo.h" #include "kicad_string.h" #include "richio.h" diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 8f4b918347..b7cac00754 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -11,7 +11,6 @@ */ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "base_struct.h" #include "gr_basic.h" diff --git a/eeschema/sch_marker.cpp b/eeschema/sch_marker.cpp index 3c0f5cab6f..8f5683dd0e 100644 --- a/eeschema/sch_marker.cpp +++ b/eeschema/sch_marker.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "wxstruct.h" #include "class_drawpanel.h" -#include "common.h" #include "trigo.h" #include "general.h" diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 205de2ab21..6034fc04e0 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1,7 +1,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "kicad_string.h" #include "eeschema_id.h" #include "appl_wxstruct.h" diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index b1cc78179f..908c53b76d 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -12,7 +12,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "drawtxt.h" diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index 5b445d23f2..946e61e889 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -9,7 +9,6 @@ #include "fctsys.h" -#include "common.h" #include "general.h" #include "dlist.h" #include "class_sch_screen.h" diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp index e7105588df..c425ee0e56 100644 --- a/eeschema/sch_sheet_pin.cpp +++ b/eeschema/sch_sheet_pin.cpp @@ -12,7 +12,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "drawtxt.h" #include "plot_common.h" diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index ee040316c8..82d3f1663d 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "trigo.h" #include "eeschema_id.h" diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index ddc6704463..d942c3991c 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "eda_doc.h" diff --git a/eeschema/schematic_undo_redo.cpp b/eeschema/schematic_undo_redo.cpp index 676779a807..d2b7fda7ae 100644 --- a/eeschema/schematic_undo_redo.cpp +++ b/eeschema/schematic_undo_redo.cpp @@ -3,7 +3,6 @@ /************************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 6ddfed1d8b..a61ef8f094 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -8,11 +8,9 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "gr_basic.h" #include "class_drawpanel.h" #include "gestfich.h" -#include "bitmaps.h" #include "general.h" #include "protos.h" diff --git a/eeschema/selpart.cpp b/eeschema/selpart.cpp index 2928ce5686..4c9741848c 100644 --- a/eeschema/selpart.cpp +++ b/eeschema/selpart.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "confirm.h" #include "wxstruct.h" diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index e8b2bca465..9af2668559 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -11,7 +11,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/sheetlab.cpp b/eeschema/sheetlab.cpp index 0877b9edff..cc76b41d7e 100644 --- a/eeschema/sheetlab.cpp +++ b/eeschema/sheetlab.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp index e39a04318d..0d28644ccc 100644 --- a/eeschema/symbedit.cpp +++ b/eeschema/symbedit.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/eeschema/tool_lib.cpp b/eeschema/tool_lib.cpp index d808ca9fe1..3bea465d57 100644 --- a/eeschema/tool_lib.cpp +++ b/eeschema/tool_lib.cpp @@ -3,9 +3,7 @@ /******************/ #include "fctsys.h" -#include "common.h" #include "hotkeys.h" -#include "bitmaps.h" #include "eeschema_id.h" #include "general.h" diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index d464794592..3cce9fdc01 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -3,14 +3,10 @@ /******************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" -//#include "confirm.h" -#include "bitmaps.h" #include "wxEeschemaStruct.h" #include "general.h" -//#include "protos.h" #include "hotkeys.h" #include "eeschema_id.h" diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index 18ce2055cf..5e66926dd8 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -3,11 +3,8 @@ /****************************************************************/ #include "fctsys.h" -#include "common.h" -#include "bitmaps.h" #include "macros.h" #include "eeschema_id.h" -#include "wxstruct.h" #include "general.h" #include "protos.h" diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 360334d3d8..6c5abd615e 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -4,10 +4,8 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "eeschema_id.h" #include "class_drawpanel.h" -#include "bitmaps.h" #include "class_sch_screen.h" #include "wxEeschemaStruct.h" diff --git a/eeschema/viewlibs.cpp b/eeschema/viewlibs.cpp index cd68336aa8..5399d2a822 100644 --- a/eeschema/viewlibs.cpp +++ b/eeschema/viewlibs.cpp @@ -4,12 +4,10 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "appl_wxstruct.h" #include "class_drawpanel.h" #include "confirm.h" #include "eda_doc.h" -#include "wxstruct.h" #include "class_sch_screen.h" #include "general.h" diff --git a/gerbview/class_DCodeSelectionbox.cpp b/gerbview/class_DCodeSelectionbox.cpp index c538f93cf4..116e3de921 100644 --- a/gerbview/class_DCodeSelectionbox.cpp +++ b/gerbview/class_DCodeSelectionbox.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "gerbview.h" diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index 151a35ac96..98be784d14 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -3,7 +3,6 @@ /************************************************/ #include "fctsys.h" -#include "common.h" #include "appl_wxstruct.h" #include "class_drawpanel.h" #include "confirm.h" @@ -12,7 +11,6 @@ #include "gerbview.h" #include "gerbview_id.h" #include "pcbplot.h" -#include "bitmaps.h" #include "zones.h" #include "class_board_design_settings.h" #include "colors_selection.h" @@ -42,12 +40,12 @@ Ki_PageDescr* g_GerberPageSizeList[] = }; -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) /* MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics */ -void WinEDA_App::MacOpenFile(const wxString &fileName) +void EDA_APP::MacOpenFile(const wxString &fileName) { wxFileName filename = fileName; GERBVIEW_FRAME * frame = ((GERBVIEW_FRAME*)GetTopWindow()); @@ -59,18 +57,19 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) } -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { wxFileName fn; GERBVIEW_FRAME* frame = NULL; - InitEDA_Appl( wxT( "GerbView" ), APP_TYPE_GERBVIEW ); + InitEDA_Appl( wxT( "GerbView" ), APP_GERBVIEW_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { if( !IsOK( NULL, _( "GerbView is already running. Continue?" ) ) ) return false; } + ScreenPcb = new PCB_SCREEN(); ScreenPcb->m_CurrentSheetDesc = &g_Sheet_GERBER; @@ -85,9 +84,7 @@ bool WinEDA_App::OnInit() * display the real hotkeys in menus or tool tips */ ReadHotkeyConfig( wxT("GerberFrame"), s_Gerbview_Hokeys_Descr ); - frame = new GERBVIEW_FRAME( NULL, wxT( "GerbView" ), - wxPoint( 0, 0 ), - wxSize( 600, 400 ) ); + frame = new GERBVIEW_FRAME( NULL, wxT( "GerbView" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) ); /* Gerbview mainframe title */ frame->SetTitle( GetTitle() + wxT( " " ) + GetBuildVersion() ); @@ -116,6 +113,7 @@ bool WinEDA_App::OnInit() // Load all files specified on the command line. int jj = 0; + for( int ii = 1; ii < argc && ii <= LAYER_COUNT; ++ii ) { fn = wxFileName( argv[ii] ); diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index eca5ab8684..b9fc48de6e 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -5,13 +5,11 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "gerbview.h" #include "class_gerber_draw_item.h" #include "pcbplot.h" -#include "bitmaps.h" #include "gerbview_id.h" #include "hotkeys.h" #include "class_GERBER.h" @@ -31,10 +29,10 @@ const wxString GerbviewShowDCodes( wxT( "ShowDCodesOpt" ) ); GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* father, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style ) : + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style ) : PCB_BASE_FRAME( father, GERBER_FRAME, title, pos, size, style ) { m_FrameName = wxT( "GerberFrame" ); diff --git a/include/appl_wxstruct.h b/include/appl_wxstruct.h index 620e7d233f..8f8ebdd0c8 100644 --- a/include/appl_wxstruct.h +++ b/include/appl_wxstruct.h @@ -1,7 +1,7 @@ -/******************************************/ -/* appl_wxstruct.h */ -/* Base application class implementation. */ -/******************************************/ +/** + * @file appl_wxstruct.h + * @brief Base class implementation for all Kicad applications. + */ #ifndef APPL_WXSTRUCT_H #define APPL_WXSTRUCT_H @@ -13,13 +13,13 @@ #include "param_config.h" -enum id_app_type { - APP_TYPE_UNKOWN, - APP_TYPE_EESCHEMA, - APP_TYPE_PCBNEW, - APP_TYPE_CVPCB, - APP_TYPE_GERBVIEW, - APP_TYPE_KICAD +enum EDA_APP_T { + APP_UNKNOWN_T, + APP_EESCHEMA_T, + APP_PCBNEW_T, + APP_CVPCB_T, + APP_GERBVIEW_T, + APP_KICAD_T }; class wxConfigBase; @@ -28,18 +28,15 @@ class wxSingleInstanceChecker; class wxHtmlHelpController; -/**********************************************/ -/* Class representing the entire Application */ -/**********************************************/ - -class WinEDA_App : public wxApp +/** + * Class EDA_APP + * is the base class representing all of Kicad applications. + */ +class EDA_APP : public wxApp { public: - id_app_type m_Id; /* Used mainly to handle - * default paths libs - * m_Id = APP_TYPE_EESCHEMA, - * APP_TYPE_PCBNEW ... - */ + EDA_APP_T m_Id; /* Used mainly to handle default paths libs + * m_Id = APP_EESCHEMA_T, APP_PCBNEW_T ... */ wxString m_Project; wxSingleInstanceChecker* m_Checker; @@ -56,8 +53,7 @@ public: wxString m_BinDir; /* Kicad executable path.*/ wxString m_KicadEnv; /* environment variable KICAD */ - bool m_Env_Defined; // TRUE if environment KICAD is - // defined. + bool m_Env_Defined; // TRUE if environment KICAD is defined. wxLocale* m_Locale; // The current locale. int m_LanguageId; // The current language setting. @@ -74,29 +70,29 @@ protected: wxFileName m_projectFileName; wxString m_LastVisitedLibPath; -public: WinEDA_App(); - ~WinEDA_App(); +public: EDA_APP(); + ~EDA_APP(); /** * Function OnInit * this is the first executed function (like main() ) * @return true if the application can be started. */ - bool OnInit(); + bool OnInit(); /** * Function SetBinDir - * finds the path to the executable and store it in WinEDA_App::m_BinDir + * finds the path to the executable and store it in EDA_APP::m_BinDir * * @return TODO */ - bool SetBinDir(); + bool SetBinDir(); /** * Function SetDefaultSearchPaths * sets search paths for libraries, modules, internationalization files, etc. */ - void SetDefaultSearchPaths( void ); + void SetDefaultSearchPaths( void ); /** * Function MacOpenFile @@ -116,8 +112,7 @@ public: WinEDA_App(); * @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW * used to choose what default library path must be used */ - void InitEDA_Appl( const wxString& aName, - id_app_type aId = APP_TYPE_UNKOWN ); + void InitEDA_Appl( const wxString& aName, EDA_APP_T aId = APP_UNKNOWN_T ); /** * Function SetLanguage @@ -129,7 +124,7 @@ public: WinEDA_App(); * called, false otherwise * @return true if the language can be set (i.e. if the locale is available) */ - bool SetLanguage( bool first_time = false ); + bool SetLanguage( bool first_time = false ); /** * Function AddMenuLanguageList @@ -138,7 +133,7 @@ public: WinEDA_App(); * @param MasterMenu The main menu. The sub menu list will be accessible from the menu * item with id ID_LANGUAGE_CHOICE */ - void AddMenuLanguageList( wxMenu* MasterMenu ); + void AddMenuLanguageList( wxMenu* MasterMenu ); /** * Function SetLanguageIdentifier @@ -148,15 +143,15 @@ public: WinEDA_App(); * @param menu_id The kicad menuitem id (returned by Menu Event, when * clicking on a menu item) */ - void SetLanguageIdentifier( int menu_id ); + void SetLanguageIdentifier( int menu_id ); - void SetLanguagePath( void ); + void SetLanguagePath( void ); /** * Function InitOnLineHelp * initializes Kicad's online help. */ - void InitOnLineHelp(); + void InitOnLineHelp(); /** * Function GetSettings @@ -164,20 +159,26 @@ public: WinEDA_App(); * @param aReopenLastUsedDirectory True to switch to last opened directory, false * to use current CWD */ - void GetSettings( bool aReopenLastUsedDirectory ); + void GetSettings( bool aReopenLastUsedDirectory ); /** * Function SaveSettings * saves the application settings. */ - void SaveSettings(); + void SaveSettings(); - void WriteProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - PARAM_CFG_BASE** List ); - void WriteProjectConfig( const wxString& fileName, - const wxString& GroupName, - PARAM_CFG_ARRAY& params ); + /** + * Function WriteProjectConfig + * Save the current "projet" parameters + * saved parameters are parameters that have the .m_Setup member set to false + * saving file is the .pro file project + */ + void WriteProjectConfig( const wxString& local_config_filename, + const wxString& GroupName, + PARAM_CFG_BASE** List ); + void WriteProjectConfig( const wxString& fileName, + const wxString& GroupName, + PARAM_CFG_ARRAY& params ); /** * Function SaveCurrentSetupValues @@ -186,8 +187,8 @@ public: WinEDA_App(); * true * @param aList = array of PARAM_CFG_BASE pointers */ - void SaveCurrentSetupValues( PARAM_CFG_BASE** aList ); - void SaveCurrentSetupValues( PARAM_CFG_ARRAY& List ); + void SaveCurrentSetupValues( PARAM_CFG_BASE** aList ); + void SaveCurrentSetupValues( PARAM_CFG_ARRAY& List ); /** * Function ReadCurrentSetupValues @@ -196,30 +197,55 @@ public: WinEDA_App(); * true * @param aList = array of PARAM_CFG_BASE pointers */ - void ReadCurrentSetupValues( PARAM_CFG_BASE** aList ); - void ReadCurrentSetupValues( PARAM_CFG_ARRAY& List ); + void ReadCurrentSetupValues( PARAM_CFG_BASE** aList ); + void ReadCurrentSetupValues( PARAM_CFG_ARRAY& List ); - bool ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - PARAM_CFG_BASE** List, - bool Load_Only_if_New ); - bool ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - PARAM_CFG_ARRAY& List, - bool Load_Only_if_New ); - bool ReCreatePrjConfig( const wxString& local_config_filename, - const wxString& GroupName, - bool ForceUseLocalConfig ); + /** + * Function ReadProjectConfig + * Read the current "projet" parameters + * Parameters are parameters that have the .m_Setup member set to false + * read file is the .pro file project + * + * if Load_Only_if_New == true, this file is read only if it differs from + * the current config (different dates ) + * + * @return true if read. + * Also set: + * wxGetApp().m_CurrentOptionFileDateAndTime + * wxGetApp().m_CurrentOptionFile + */ + bool ReadProjectConfig( const wxString& local_config_filename, + const wxString& GroupName, + PARAM_CFG_BASE** List, + bool Load_Only_if_New ); + bool ReadProjectConfig( const wxString& local_config_filename, + const wxString& GroupName, + PARAM_CFG_ARRAY& List, + bool Load_Only_if_New ); - void ReadPdfBrowserInfos(); - void WritePdfBrowserInfos(); + /** + * Creates or recreates the kicad project file. (filename.pro) + * Initialize: + * G_Prj_Config + * G_Prj_Config_LocalFilename + * G_Prj_Default_Config_FullFilename + * Return: + * True if local config + * False if default config + */ + bool ReCreatePrjConfig( const wxString& local_config_filename, + const wxString& GroupName, + bool ForceUseLocalConfig ); + + void ReadPdfBrowserInfos(); + void WritePdfBrowserInfos(); /** * Function FindFileInSearchPaths * looks in search paths for \a filename. */ - wxString FindFileInSearchPaths( const wxString& filename, - const wxArrayString* subdirs = NULL ); + wxString FindFileInSearchPaths( const wxString& filename, + const wxArrayString* subdirs = NULL ); /** * Function GetHelpFile @@ -238,9 +264,13 @@ public: WinEDA_App(); * help/en *

*/ - wxString GetHelpFile( void ); + wxString GetHelpFile( void ); - wxString GetLibraryFile( const wxString& filename ); + wxString GetLibraryFile( const wxString& filename ); + + /** + * Return the preferred editor name. + */ wxString& GetEditorName(); const wxString& GetTitle() { return m_Title; } @@ -273,7 +303,7 @@ public: WinEDA_App(); */ wxString ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch = wxEmptyString ); - void SaveLastVisitedLibraryPath( const wxString& aPath ); + void SaveLastVisitedLibraryPath( const wxString& aPath ); /** * Function ReturnFilenameWithRelativePathInLibPath @@ -289,7 +319,7 @@ public: WinEDA_App(); * @param aPaths = path or path list to remove. paths must be separated by * ";" */ - void RemoveLibraryPath( const wxString& aPaths ); + void RemoveLibraryPath( const wxString& aPaths ); /** * Function InsertLibraryPath @@ -297,14 +327,14 @@ public: WinEDA_App(); * @param aPaths = path or path list to add. paths must be separated by ";" * @param aIndex = insertion point */ - void InsertLibraryPath( const wxString& aPaths, size_t aIndex ); + void InsertLibraryPath( const wxString& aPaths, size_t aIndex ); }; /* - * Use wxGetApp() to access WinEDA_App. It is not necessary to keep copies + * Use wxGetApp() to access EDA_APP. It is not necessary to keep copies * of the application pointer all over the place or worse yet in a global * variable. */ -DECLARE_APP( WinEDA_App ) +DECLARE_APP( EDA_APP ) #endif /* APPL_WXSTRUCT_H */ diff --git a/kicad/class_treeproject_item.cpp b/kicad/class_treeproject_item.cpp index ee00428e0c..29100b70f7 100644 --- a/kicad/class_treeproject_item.cpp +++ b/kicad/class_treeproject_item.cpp @@ -6,7 +6,6 @@ */ #include "fctsys.h" -#include "common.h" #include "gestfich.h" #include "kicad.h" diff --git a/kicad/class_treeprojectfiles.cpp b/kicad/class_treeprojectfiles.cpp index 1500dcf5a8..2431ea4798 100644 --- a/kicad/class_treeprojectfiles.cpp +++ b/kicad/class_treeprojectfiles.cpp @@ -4,8 +4,6 @@ */ #include "fctsys.h" -#include "common.h" -#include "bitmaps.h" #include "kicad.h" #include "tree_project_frame.h" diff --git a/kicad/commandframe.cpp b/kicad/commandframe.cpp index 050054655e..525d43b169 100644 --- a/kicad/commandframe.cpp +++ b/kicad/commandframe.cpp @@ -3,8 +3,6 @@ /*****************************************************/ #include "fctsys.h" -#include "common.h" -#include "bitmaps.h" #include "macros.h" #include "kicad.h" diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index 9155c40683..8b158e8672 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -14,8 +14,6 @@ #include #include -#include "common.h" -#include "bitmaps.h" #include "confirm.h" #include "gestfich.h" #include "macros.h" diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 60690d6af2..13ef1dab59 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -5,9 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" -#include "bitmaps.h" -#include "colors.h" #ifdef USE_SPLASH_IMAGE #define SPLASH_IMAGE logo_kicad.png @@ -17,7 +14,6 @@ #include "kicad.h" #include "tree_project_frame.h" -#include "macros.h" #include "build_version.h" @@ -34,12 +30,12 @@ void ShowLogo( char* FonteFileName ); /************************************/ // Create a new application object -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) /* MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics */ -void WinEDA_App::MacOpenFile( const wxString &fileName ) +void EDA_APP::MacOpenFile( const wxString &fileName ) { KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) GetTopWindow(); wxFileName fn = fileName; @@ -62,7 +58,7 @@ void WinEDA_App::MacOpenFile( const wxString &fileName ) } wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + frame->m_ProjectFileName.GetFullPath(); + wxT( " " ) + frame->m_ProjectFileName.GetFullPath(); if( !fn.IsDirWritable() ) title += _( " [Read Only]" ); @@ -77,11 +73,11 @@ void WinEDA_App::MacOpenFile( const wxString &fileName ) } -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { KICAD_MANAGER_FRAME* frame; - InitEDA_Appl( wxT( "KiCad" ), APP_TYPE_KICAD ); + InitEDA_Appl( wxT( "KiCad" ), APP_KICAD_T ); // read current setup and reopen last directory if no filename to open in command line bool reopenLastUsedDirectory = argc == 1; @@ -120,7 +116,7 @@ bool WinEDA_App::OnInit() } wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + frame->m_ProjectFileName.GetFullPath(); + wxT( " " ) + frame->m_ProjectFileName.GetFullPath(); if( !namelessProject.IsDirWritable() ) title += _( " [Read Only]" ); @@ -136,7 +132,7 @@ bool WinEDA_App::OnInit() #ifdef USE_SPLASH_IMAGE wxBitmap bmp; wxString binDir = GetTraits()->GetStandardPaths().GetExecutablePath() + - wxFileName::GetPathSeparator(); + wxFileName::GetPathSeparator(); if( bmp.LoadFile( binDir + _T( "logokicad.png" ), wxBITMAP_TYPE_PNG ) ) { diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 89820cfd26..7f762fe255 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -8,10 +8,8 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" -#include "bitmaps.h" #include "macros.h" #include "kicad.h" diff --git a/kicad/preferences.cpp b/kicad/preferences.cpp index 56c6d84cf4..fd09182ec7 100644 --- a/kicad/preferences.cpp +++ b/kicad/preferences.cpp @@ -8,10 +8,8 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" -#include "bitmaps.h" #include "kicad.h" diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index a4d281356f..68a5d14c26 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "prjconfig.h" diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 41397a9bad..07b394f1d0 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -5,11 +5,9 @@ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "appl_wxstruct.h" -#include "bitmaps.h" #include "kicad.h" #include "tree_project_frame.h" diff --git a/pcb_calculator/pcb_calculator.cpp b/pcb_calculator/pcb_calculator.cpp index ad6db87cd6..3595d5fac6 100644 --- a/pcb_calculator/pcb_calculator.cpp +++ b/pcb_calculator/pcb_calculator.cpp @@ -24,7 +24,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" @@ -40,18 +39,18 @@ // PCB_CALCULATOR_APP -void WinEDA_App::MacOpenFile(const wxString &fileName) +void EDA_APP::MacOpenFile(const wxString &fileName) { } -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) ///----------------------------------------------------------------------------- // PCB_CALCULATOR_APP // main program //----------------------------------------------------------------------------- -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { InitEDA_Appl( wxT( "PCBcalc" ) ); diff --git a/pcbnew/attribut.cpp b/pcbnew/attribut.cpp index 5ec824e015..5afd30c459 100644 --- a/pcbnew/attribut.cpp +++ b/pcbnew/attribut.cpp @@ -3,7 +3,6 @@ /******************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/automove.cpp b/pcbnew/automove.cpp index 407839b52f..cda447d3ad 100644 --- a/pcbnew/automove.cpp +++ b/pcbnew/automove.cpp @@ -5,7 +5,6 @@ #include #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/autoplac.cpp b/pcbnew/autoplac.cpp index 8a65421826..05e306362d 100644 --- a/pcbnew/autoplac.cpp +++ b/pcbnew/autoplac.cpp @@ -3,7 +3,6 @@ /*******************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/autorout.cpp b/pcbnew/autorout.cpp index 598b05cb63..48a2fafbc4 100644 --- a/pcbnew/autorout.cpp +++ b/pcbnew/autorout.cpp @@ -3,7 +3,6 @@ /***************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 00914b5b98..cb517f4260 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -8,14 +8,12 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "confirm.h" #include "appl_wxstruct.h" #include "dialog_helpers.h" #include "kicad_device_context.h" #include "pcbnew.h" -#include "bitmaps.h" #include "pcbnew_id.h" #include "class_board_design_settings.h" diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 0102ae247a..361ba69e9a 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "block_commande.h" diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index a4f4efce02..76712c0575 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -6,7 +6,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "block_commande.h" diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index eaacba97fb..83d57a3946 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -8,7 +8,6 @@ #include #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "trigo.h" diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 74235fa451..5604cf9ef4 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -3,7 +3,6 @@ /*************************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index de46aa7ab8..f5210f78b9 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -2,7 +2,6 @@ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 627747af53..4d48346f73 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "pcbnew.h" #include "trigo.h" #include "wxstruct.h" diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 91b0c3e421..8d98652228 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -6,7 +6,6 @@ #include "wxstruct.h" #include "gr_basic.h" #include "bezier_curves.h" -#include "common.h" #include "class_drawpanel.h" #include "kicad_string.h" #include "colors_selection.h" diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 127a28e237..aeed51852b 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" #include "wxstruct.h" -#include "common.h" #include "trigo.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index c574ab070a..0b227f9654 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" #include "wxstruct.h" -#include "common.h" #include "plot_common.h" #include "class_drawpanel.h" #include "trigo.h" diff --git a/pcbnew/class_module_transform_functions.cpp b/pcbnew/class_module_transform_functions.cpp index b2f99ff2b8..29adafeaa9 100644 --- a/pcbnew/class_module_transform_functions.cpp +++ b/pcbnew/class_module_transform_functions.cpp @@ -6,7 +6,6 @@ #include "fctsys.h" #include "wxstruct.h" -#include "common.h" #include "trigo.h" #include "pcbcommon.h" diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 6d8b92cb96..bab4595b4a 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -30,14 +30,12 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "pcbstruct.h" // enum PCB_VISIBLE #include "collectors.h" -#include "bitmaps.h" #include "pcbnew_id.h" #include "layer_widget.h" #include "class_pcb_layer_widget.h" diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index e35c83e884..d658ecf160 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -6,7 +6,6 @@ #include "wxstruct.h" #include "gr_basic.h" #include "base_struct.h" -#include "common.h" #include "drawtxt.h" #include "kicad_string.h" diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index be3678d64d..e6da8b0584 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" #include "wxstruct.h" -#include "common.h" #include "pcbnew.h" #include "trigo.h" #include "class_drawpanel.h" diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 69e137de99..c78b168308 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "wxstruct.h" #include "gr_basic.h" -#include "common.h" #include "trigo.h" #include "class_drawpanel.h" #include "kicad_string.h" diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 6e98fc9e5c..8cee96172d 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index be0634edec..9f1b91516c 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -13,7 +13,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "eda_dde.h" diff --git a/pcbnew/debug_kbool_key_file_fct.cpp b/pcbnew/debug_kbool_key_file_fct.cpp index 81bb9eb48c..84cb1d8171 100644 --- a/pcbnew/debug_kbool_key_file_fct.cpp +++ b/pcbnew/debug_kbool_key_file_fct.cpp @@ -3,7 +3,6 @@ #include #include "fctsys.h" -#include "common.h" #include "kicad_string.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 2bbe6ba1a0..ae3dc70700 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -4,7 +4,6 @@ /******************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index c57de649a9..736c5af076 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -10,7 +10,6 @@ #include #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "PolyLine.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index 68417a891e..214a555a52 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -31,7 +31,6 @@ /* functions relatives to the design rules editor */ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index a957710384..70a3379ca4 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -6,7 +6,6 @@ Prefernces/display */ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 1b1c08878f..dfe0749871 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -7,9 +7,7 @@ #include "fctsys.h" -#include "wxstruct.h" #include "dialog_drc.h" -#include "common.h" #include "wxPcbStruct.h" #include "class_board_design_settings.h" diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index 6353565729..9502bffc3d 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -3,11 +3,9 @@ ******************************************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "bitmaps.h" #include "appl_wxstruct.h" #include "gestfich.h" #include "3d_struct.h" diff --git a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp index 9443ae2682..5d214ff2f9 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp @@ -3,11 +3,9 @@ /*******************************************************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "bitmaps.h" #include "appl_wxstruct.h" #include "gestfich.h" #include "3d_struct.h" diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index 272aea38ec..f0b2463974 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 5b41508008..8a1428e328 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -8,7 +8,6 @@ * Preferences/display */ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 05a91e3669..14613e83cd 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index fda08ee743..6e93e027b3 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -7,7 +7,6 @@ ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index 6cd2b9c577..4117eb6e1f 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -12,7 +12,6 @@ */ #include "fctsys.h" #include "macros.h" -#include "common.h" #include "confirm.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_graphic_items_options.cpp b/pcbnew/dialogs/dialog_graphic_items_options.cpp index 4cc15e6a22..537c76858d 100644 --- a/pcbnew/dialogs/dialog_graphic_items_options.cpp +++ b/pcbnew/dialogs/dialog_graphic_items_options.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "module_editor_frame.h" diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index 4335d8fd6c..829973014e 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -25,7 +25,6 @@ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/dialogs/dialog_mask_clearance.cpp b/pcbnew/dialogs/dialog_mask_clearance.cpp index 22db1ae505..beb4294850 100644 --- a/pcbnew/dialogs/dialog_mask_clearance.cpp +++ b/pcbnew/dialogs/dialog_mask_clearance.cpp @@ -8,7 +8,6 @@ ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 0ed10dc067..9c20c7cd7e 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -6,7 +6,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp index 9101b55456..9af78bce1d 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp @@ -29,7 +29,6 @@ #include "dialog_pcb_text_properties.h" #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp b/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp index 89dfd76942..b910a7cf88 100644 --- a/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp +++ b/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp @@ -11,10 +11,10 @@ #include "fctsys.h" #include #include "appl_wxstruct.h" -#include "common.h" #include "confirm.h" #include "gestfich.h" #include "pcbnew.h" + #include "wxPcbStruct.h" #include "dialog_pcbnew_config_libs_and_paths.h" diff --git a/pcbnew/dialogs/dialog_print_for_modedit.cpp b/pcbnew/dialogs/dialog_print_for_modedit.cpp index a90df151ef..19c8ccc099 100644 --- a/pcbnew/dialogs/dialog_print_for_modedit.cpp +++ b/pcbnew/dialogs/dialog_print_for_modedit.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/dialogs/dialog_print_using_printer.cpp b/pcbnew/dialogs/dialog_print_using_printer.cpp index 74b032e397..5c1425da98 100644 --- a/pcbnew/dialogs/dialog_print_using_printer.cpp +++ b/pcbnew/dialogs/dialog_print_using_printer.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index e4dd3b19c1..e845ea70b7 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -3,7 +3,6 @@ /*****************************************/ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index a3b5f6e07f..bb257c0fbb 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -29,7 +29,6 @@ /****************************/ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "trigo.h" diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index aeaea856b1..28b527f3d7 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -32,7 +32,6 @@ /****************************/ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "trigo.h" diff --git a/pcbnew/drc_marker_functions.cpp b/pcbnew/drc_marker_functions.cpp index 1ebe84dafc..0006691135 100644 --- a/pcbnew/drc_marker_functions.cpp +++ b/pcbnew/drc_marker_functions.cpp @@ -33,9 +33,7 @@ #include "fctsys.h" #include "common.h" -//#include "class_drawpanel.h" #include "pcbnew.h" -//#include "wxPcbStruct.h" #include "class_board_design_settings.h" #include "drc_stuff.h" diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 8f08dfdea2..ab81379c9a 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -10,7 +10,6 @@ #include "fctsys.h" #include "trigo.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index 27928c1793..c944637272 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index f211a867be..1d1f648b7d 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -4,7 +4,6 @@ ***************************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index 8dec74f493..0cf6382ac4 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -3,7 +3,6 @@ /***********************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index a19573c413..386a3a81d3 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -4,7 +4,6 @@ /************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index 625a09cecf..f3c815a208 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -3,7 +3,6 @@ /*******************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 721543a74f..293b0d1162 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -3,7 +3,6 @@ /****************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/event_handlers_tracks_vias_sizes.cpp b/pcbnew/event_handlers_tracks_vias_sizes.cpp index 74e143f028..5db5df31cd 100644 --- a/pcbnew/event_handlers_tracks_vias_sizes.cpp +++ b/pcbnew/event_handlers_tracks_vias_sizes.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" -//#include "appl_wxstruct.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew_id.h" diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index 297cc9116e..1430db6174 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -3,7 +3,6 @@ /************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" diff --git a/pcbnew/export_vrml.cpp b/pcbnew/export_vrml.cpp index f583f697fa..630f5dec9c 100644 --- a/pcbnew/export_vrml.cpp +++ b/pcbnew/export_vrml.cpp @@ -1,5 +1,4 @@ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 08ea86ed87..ab785718c2 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -3,7 +3,6 @@ /***************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/find.cpp b/pcbnew/find.cpp index 4b9b81c971..51813cce0a 100644 --- a/pcbnew/find.cpp +++ b/pcbnew/find.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/gen_modules_placefile.cpp b/pcbnew/gen_modules_placefile.cpp index 6c831b8fd9..901e8aea7f 100644 --- a/pcbnew/gen_modules_placefile.cpp +++ b/pcbnew/gen_modules_placefile.cpp @@ -7,7 +7,6 @@ * 2 - create a module report (pos and module descr) (ascii file) */ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" #include "gestfich.h" diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index 6acd986b49..2b6af674f9 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -39,7 +39,6 @@ #include -#include "common.h" #include "plot_common.h" #include "trigo.h" #include "confirm.h" diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 1bb5635854..d5401e15ee 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -3,10 +3,8 @@ /***************/ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" -//#include "pcbnew_id.h" #include "hotkeys.h" diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index f10311b29a..3ef11de870 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -3,7 +3,6 @@ /***************/ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "pcbnew_id.h" diff --git a/pcbnew/hotkeys_module_editor.cpp b/pcbnew/hotkeys_module_editor.cpp index 198b7348b4..5e2221ff2e 100644 --- a/pcbnew/hotkeys_module_editor.cpp +++ b/pcbnew/hotkeys_module_editor.cpp @@ -3,7 +3,6 @@ /*****************************/ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "module_editor_frame.h" diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index 86094501c0..888b2e174f 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/ioascii.cpp b/pcbnew/ioascii.cpp index 5f029b77e3..31d47e82a5 100644 --- a/pcbnew/ioascii.cpp +++ b/pcbnew/ioascii.cpp @@ -4,7 +4,6 @@ /****************************************************/ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 525684c233..58330bafd3 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 9fcc31dfbf..f6f0066fcd 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -3,7 +3,6 @@ /**********************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "eda_doc.h" diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 69261e0974..8008c3a237 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -9,7 +9,6 @@ */ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "class_board_design_settings.h" diff --git a/pcbnew/mirepcb.cpp b/pcbnew/mirepcb.cpp index 2c6cd61b3d..309f1de316 100644 --- a/pcbnew/mirepcb.cpp +++ b/pcbnew/mirepcb.cpp @@ -3,7 +3,6 @@ /********************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 2383e51f32..b4bf6ffc70 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "class_drawpanel.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "module_editor_frame.h" diff --git a/pcbnew/modeditoptions.cpp b/pcbnew/modeditoptions.cpp index e53e80fbdf..ad69c413c4 100644 --- a/pcbnew/modeditoptions.cpp +++ b/pcbnew/modeditoptions.cpp @@ -3,7 +3,6 @@ /***********************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index cbb29585c3..f61582a2f1 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -4,13 +4,11 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "module_editor_frame.h" -#include "bitmaps.h" #include "protos.h" #include "pcbnew_id.h" #include "hotkeys.h" diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index f824d35d68..bf962b7781 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 9a3eceb40a..c0b52665d9 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -4,7 +4,6 @@ /****************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 0e5bb7edd4..cc1f8cad80 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -3,7 +3,6 @@ /*******************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "trigo.h" diff --git a/pcbnew/muwave_command.cpp b/pcbnew/muwave_command.cpp index 3d5e0e4492..a85220ca98 100644 --- a/pcbnew/muwave_command.cpp +++ b/pcbnew/muwave_command.cpp @@ -3,7 +3,6 @@ /*****************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index c50f33dc39..698cf40fb2 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -30,7 +30,6 @@ #include "algorithm" #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index d788d0897c..7449ebfeef 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -5,7 +5,6 @@ /**************************************************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 45aef0c5ef..4c09d787e2 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -30,14 +30,12 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "pcbstruct.h" // enum PCB_VISIBLE #include "collectors.h" -#include "bitmaps.h" #include "build_version.h" #include "protos.h" #include "pcbnew_id.h" diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index dc3c57b93b..c7ee016622 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -9,7 +9,6 @@ #include #include -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "plot_common.h" @@ -70,12 +69,12 @@ const wxString g_FootprintLibFileWildcard( wxT( "Kicad footprint library file (* */ wxString g_DocModulesFileName = wxT( "footprints_doc/footprints.pdf" ); -IMPLEMENT_APP( WinEDA_App ) +IMPLEMENT_APP( EDA_APP ) /* MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics */ -void WinEDA_App::MacOpenFile( const wxString& fileName ) +void EDA_APP::MacOpenFile( const wxString& fileName ) { wxFileName filename = fileName; PCB_EDIT_FRAME* frame = ( (PCB_EDIT_FRAME*) GetTopWindow() ); @@ -87,12 +86,12 @@ void WinEDA_App::MacOpenFile( const wxString& fileName ) } -bool WinEDA_App::OnInit() +bool EDA_APP::OnInit() { wxFileName fn; PCB_EDIT_FRAME* frame = NULL; - InitEDA_Appl( wxT( "PCBnew" ), APP_TYPE_PCBNEW ); + InitEDA_Appl( wxT( "PCBnew" ), APP_PCBNEW_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { @@ -149,7 +148,9 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) ); * So we load settings only */ if( fn.FileExists() ) + { frame->LoadOnePcbFile( fn.GetFullPath() ); + } else { // File does not exists: prepare an empty board wxSetWorkingDirectory( fn.GetPath() ); diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 15e15da301..35000da4fd 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 7040e859c1..298ff56dc7 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "plot_common.h" #include "confirm.h" #include "gestfich.h" diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index a94739028c..6aa10bdbf5 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/solve.cpp b/pcbnew/solve.cpp index c0f1c083c9..f5e3800a63 100644 --- a/pcbnew/solve.cpp +++ b/pcbnew/solve.cpp @@ -3,7 +3,6 @@ /*************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index a45f70312d..c7ae2acea8 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -33,7 +33,6 @@ #include "specctra.h" -#include "common.h" // IsOK() & EDA_FileSelector() #include "class_drawpanel.h" // DrawPanel #include "confirm.h" // DisplayError() #include "gestfich.h" // EDA_FileSelector() diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index e4e4e2cca9..324278490a 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -7,7 +7,6 @@ */ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index 73e4fc9243..90fae97228 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -4,12 +4,10 @@ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "module_editor_frame.h" #include "dialog_helpers.h" -#include "bitmaps.h" #include "pcbnew_id.h" #include "hotkeys.h" diff --git a/pcbnew/tool_onrightclick.cpp b/pcbnew/tool_onrightclick.cpp index d91ece54ca..024fe266eb 100644 --- a/pcbnew/tool_onrightclick.cpp +++ b/pcbnew/tool_onrightclick.cpp @@ -3,7 +3,6 @@ /*************************/ #include "fctsys.h" -#include "common.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 55a66d85bd..fbd1375a91 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -5,13 +5,11 @@ #include "fctsys.h" #include "wx/wupdlock.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "class_board_design_settings.h" #include "colors_selection.h" #include "dialog_helpers.h" -#include "bitmaps.h" #include "pcbnew_id.h" #ifdef __UNIX__ diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index ea75869218..6b0ddd79d4 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -8,11 +8,9 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" #include "wxPcbStruct.h" -#include "bitmaps.h" #include "pcbnew_id.h" #include "drc_stuff.h" #include "3d_viewer.h" diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index 7413421d45..62227c5aba 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -4,7 +4,6 @@ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index c927a110a0..2abb3d1fdf 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -10,7 +10,6 @@ #include "fctsys.h" #include "gr_basic.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 00f987a61f..9e9eb6b2f6 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -3,7 +3,6 @@ /*******************************/ #include "fctsys.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "kicad_string.h" diff --git a/pcbnew/zone_filling_algorithm.cpp b/pcbnew/zone_filling_algorithm.cpp index 0861e475a4..b534f6d2fa 100644 --- a/pcbnew/zone_filling_algorithm.cpp +++ b/pcbnew/zone_filling_algorithm.cpp @@ -7,7 +7,6 @@ #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "zones.h" diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index bc976944e1..17bef9087b 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -5,7 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index b3f02ffbdc..8e42e28bbb 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -28,7 +28,6 @@ #include #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 3e4d4817a6..8fbbdc3bf8 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -26,7 +26,6 @@ #include "fctsys.h" #include "polygons_defs.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "trigo.h" diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp index 901844ba29..33e4104a71 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp @@ -23,7 +23,6 @@ #include #include "fctsys.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "trigo.h" diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index 011db3bbb8..a8ebc00d3d 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -9,7 +9,6 @@ #include "fctsys.h" #include "polygons_defs.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "trigo.h" diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 0b822d15d0..e331c2fe0f 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -45,7 +45,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -#include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" #include "wxPcbStruct.h" diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index 2d3fd3d73f..6c6470447c 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -3,7 +3,6 @@ #include "appl_wxstruct.h" #include "gr_basic.h" #include "confirm.h" -#include "common.h" #include "pcbnew.h" #include "wxPcbStruct.h"