diff --git a/bitmaps/CMakeLists.txt b/bitmaps/CMakeLists.txt index 8fe5b221af..a893e8a261 100644 --- a/bitmaps/CMakeLists.txt +++ b/bitmaps/CMakeLists.txt @@ -139,6 +139,7 @@ set(BITMAP_SRCS gbr_select_mode1.xpm gbr_select_mode2.xpm gerber_file.xpm + gerber_recent_files.xpm gerbview_drill_file.xpm gerbview_clear_layers.xpm gerber_open_dcode_file.xpm diff --git a/bitmaps/gerber_recent_files.xpm b/bitmaps/gerber_recent_files.xpm new file mode 100644 index 0000000000..d4091ef5ec --- /dev/null +++ b/bitmaps/gerber_recent_files.xpm @@ -0,0 +1,38 @@ +/* XPM */ +char *gerber_recent_files_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 16 1", +"$ c #969997", +"X c #B4B4B3", +"% c #686A67", +"O c #A4A6A4", +"+ c #7F817D", +"; c #8C8D8C", +". c #BEBEBD", +"@ c #D5D5D3", +" c None", +": c #929294", +"& c #2C2D2F", +"= c #5C5E5A", +"- c #505352", +"o c #E4E6E4", +"# c #747674", +"* c #434644", +/* pixels */ +" ..... .X. ", +" ooO++.X. . @", +" @.#OO.$#OX X@", +" @ X$$...%&#X.@", +" X@$&*X=-$;$ X@", +" $; @ $X X=; ", +" $O%-=;O+%%%#%O", +" .:O$#-&**-%#+#", +" O;;:;++%##%-", +" .$$$$:;;;;++#--", +"#-=%%#%==--*-%-%", +"%%#+;:;+#%%#%;=#", +"###+;:;+#%=%=#*O", +"#=-=%#%-****-#O ", +"%-+;;:$$OX. ", +"= " +}; diff --git a/bitmaps/sources/gerber_recent_files.svg b/bitmaps/sources/gerber_recent_files.svg new file mode 100644 index 0000000000..500b57fbec --- /dev/null +++ b/bitmaps/sources/gerber_recent_files.svg @@ -0,0 +1,2463 @@ + + + + + + + + + + + + unsorted + + + + + Open Clip Art Library, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors + + + + + + + + + + + + + + image/svg+xml + + + en + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 5ada86c6f3..a66ca9a524 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -30,7 +30,6 @@ set(CVPCB_SRCS class_footprints_listbox.cpp cvframe.cpp cvpcb.cpp - dummy_functions.cpp genequiv.cpp init.cpp listboxes.cpp diff --git a/cvpcb/dummy_functions.cpp b/cvpcb/dummy_functions.cpp deleted file mode 100644 index 1876ca1cce..0000000000 --- a/cvpcb/dummy_functions.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* dummy_functions.cpp - * - * There are functions used in some classes. - * they are useful in pcbnew, but have no meaning or are never used - * in cvpcb or gerbview. - * but they must exist because they appear in some classes, and here, no nothing. - */ -#include "fctsys.h" - -#include "common.h" -#include "pcbnew.h" - - -TRACK* Marque_Une_Piste( BOARD* aPcb, - TRACK* aStartSegm, - int* aSegmCount, - int* aTrackLen, - bool aReorder ) -{ - return NULL; -} diff --git a/cvpcb/setvisu.cpp b/cvpcb/setvisu.cpp index 5bea06fa5b..d9dd77b7eb 100644 --- a/cvpcb/setvisu.cpp +++ b/cvpcb/setvisu.cpp @@ -113,3 +113,20 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin m_Modules->Draw( aPanel, aDC, GR_COPY ); } } + +/* dummy_functions: + * + * These functions are used in some classes. + * they are useful in pcbnew, but have no meaning or are never used + * in cvpcb or gerbview. + * but they must exist because they appear in some classes. + * Do nothing in CvPcb. + */ +TRACK* Marque_Une_Piste( BOARD* aPcb, + TRACK* aStartSegm, + int* aSegmCount, + int* aTrackLen, + bool aReorder ) +{ + return NULL; +} diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index b6327d94d1..7958063b7a 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -353,7 +353,7 @@ void PCB_SCREEN::ClearUndoORRedoList( UNDO_REDO_CONTAINER&, int ) /* dummy_functions * - * There are functions used in some classes. + * These functions are used in some classes. * they are useful in pcbnew, but have no meaning or are never used * in cvpcb or gerbview. * but they must exist because they appear in some classes, and here, no nothing. diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index 82c1f3a388..9a07b23208 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -50,7 +50,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void ) ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentGbrMenu, wxID_ANY, _( "Open &Recent Gerber File" ), _( "Open a recent opened Gerber file" ), - open_project_xpm ); + gerber_recent_files_xpm ); wxMenu* openRecentDrlMenu = new wxMenu(); m_drillFileHistory.AddFilesToMenu( openRecentDrlMenu ); diff --git a/include/bitmaps.h b/include/bitmaps.h index 563dc58516..be759ffe0a 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -134,6 +134,7 @@ extern const char* gbr_select_mode1_xpm[]; extern const char* gbr_select_mode2_xpm[]; extern const char* gerbview_drill_file_xpm[]; extern const char* gerber_file_xpm[]; +extern const char* gerber_recent_files_xpm[]; extern const char* gerbview_clear_layers_xpm[]; extern const char* gerber_open_dcode_file_xpm[]; extern const char* general_deletions_xpm[]; diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index ade98f8c22..5ec6e13462 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -102,8 +102,6 @@ static void LoadListeModules( PCB_EDIT_FRAME* aPcbFrame ); static int s_NbNewModules; static MODULEtoLOAD* s_ModuleToLoad_List; -#define BUFFER_CHAR_SIZE 2048 - /** * Function OpenNetlistFile * used to open a netlist file diff --git a/pcbnew/protos.h b/pcbnew/protos.h index 34036b2491..ec5fa470dc 100644 --- a/pcbnew/protos.h +++ b/pcbnew/protos.h @@ -245,12 +245,8 @@ TRACK* Marque_Une_Piste( BOARD* aPcb, */ int ReturnEndsTrack( TRACK* RefTrack, int NbSegm, TRACK** StartTrack, TRACK** EndTrack ); -/* Update the state of a list of structures. */ -void ListSetState( EDA_ITEM* Start, int Nbitem, int State, int onoff ); - /***************/ -/* DUPLTRAC.CPP */ /***************/ /* Routine to find the point "attachment" at the end of a trace. diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index 557915f028..0c4e7b39dc 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -10,6 +10,11 @@ #include "protos.h" +static void ListSetState( EDA_ITEM* Start, int NbItem, int State, int onoff ); +extern int ReturnEndsTrack( TRACK* RefTrack, int NbSegm, + TRACK** StartTrack, TRACK** EndTrack ); + + /** * Function EraseRedundantTrack * Called after creating a track @@ -273,3 +278,19 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, return 0; } + + + +/* Set the bits of .m_State member to onoff value, using bit mask State + * of a list of EDA_ITEM + */ +static void ListSetState( EDA_ITEM* Start, int NbItem, int State, int onoff ) +{ + if( Start == NULL ) + return; + + for( ; (Start != NULL ) && ( NbItem > 0 ); NbItem--, Start = Start->Next() ) + { + Start->SetState( State, onoff ); + } +} diff --git a/pcbnew/track.cpp b/pcbnew/track.cpp index de41265914..354b465b76 100644 --- a/pcbnew/track.cpp +++ b/pcbnew/track.cpp @@ -530,16 +530,3 @@ int ReturnEndsTrack( TRACK* RefTrack, int NbSegm, return ok; } - -/* Set to onoff the .m_State member, bit mask State of a list of items - */ -void ListSetState( EDA_ITEM* Start, int NbItem, int State, int onoff ) -{ - if( Start == NULL ) - return; - - for( ; (Start != NULL ) && ( NbItem > 0 ); NbItem--, Start = Start->Next() ) - { - Start->SetState( State, onoff ); - } -} diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 9a731c73b5..56a8bd648c 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -34,7 +34,7 @@ private: void BrowseAndSelectFootprint( wxCommandEvent& event ); void Init(); - void Change_Module(); + void Change_Current_Module(); void Change_ModuleId( bool aUseValue ); void Change_ModuleAll(); int Maj_ListeCmp( const wxString& reference, const wxString& old_name, @@ -93,7 +93,7 @@ void DIALOG_EXCHANGE_MODULE::OnOkClick( wxCommandEvent& event ) switch( m_Selection->GetSelection() ) { case 0: - Change_Module(); + Change_Current_Module(); break; case 1: @@ -147,12 +147,12 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, FILE* FichCmp, * NewFile; char Line[1024]; wxString msg; - char* result; // quiet compiler + char* result; // quiet compiler if( old_name == new_name ) - return 0; /* no change of name */ + return 0; - /* Calculation CMP file name by changing the extension name NetList */ + /* Build CMP file name by changing the extension of NetList filename */ fn = m_Parent->GetScreen()->GetFileName(); fn.SetExt( NetCmpExtBuffer ); @@ -232,7 +232,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, * - Same text value and ref * - Same NetNames for pads same name */ -void DIALOG_EXCHANGE_MODULE::Change_Module() +void DIALOG_EXCHANGE_MODULE::Change_Current_Module() { wxString newmodulename = m_NewModule->GetValue();