Commit 3be88ac2 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fix minor issue created by recent menubar_pcbframe.cpp change.

parent 527de3e5
...@@ -449,13 +449,13 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* aDC, int aHotkeyCode, EDA_BaseStruct* aIte ...@@ -449,13 +449,13 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* aDC, int aHotkeyCode, EDA_BaseStruct* aIte
break; break;
case HK_ADD_VIA: // Switch to alternate layer and Place a via if a track is in progress case HK_ADD_VIA: // Switch to alternate layer and Place a via if a track is in progress
if( m_ID_current_state != ID_TRACK_BUTT )
return;
if( !itemCurrentlyEdited ) // no track in progress: switch layer only if( !itemCurrentlyEdited ) // no track in progress: switch layer only
{ {
Other_Layer_Route( NULL, aDC ); Other_Layer_Route( NULL, aDC );
break; break;
} }
if( m_ID_current_state != ID_TRACK_BUTT )
return;
if( GetCurItem()->Type() != TYPE_TRACK ) if( GetCurItem()->Type() != TYPE_TRACK )
return; return;
if( (GetCurItem()->m_Flags & IS_NEW) == 0 ) if( (GetCurItem()->m_Flags & IS_NEW) == 0 )
......
...@@ -32,26 +32,24 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -32,26 +32,24 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
menuBar = new wxMenuBar(); menuBar = new wxMenuBar();
/** /** Create File Menu */
* File Menu
*/
wxMenu* filesMenu = new wxMenu; wxMenu* filesMenu = new wxMenu;
/* New */ // New
item = new wxMenuItem( filesMenu, ID_NEW_BOARD, item = new wxMenuItem( filesMenu, ID_NEW_BOARD,
_( "&New" ), _( "&New" ),
_( "Clear current board and initialize a new one" ) ); _( "Clear current board and initialize a new one" ) );
item->SetBitmap( new_xpm ); item->SetBitmap( new_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Open */ // Open
item = new wxMenuItem( filesMenu, ID_LOAD_FILE, item = new wxMenuItem( filesMenu, ID_LOAD_FILE,
_( "&Open\tCtrl+O" ), _( "&Open\tCtrl+O" ),
_( "Delete current board and load new board" ) ); _( "Delete current board and load new board" ) );
item->SetBitmap( open_xpm ); item->SetBitmap( open_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Load Recent submenu */ // Load Recent submenu
wxMenu* openRecentMenu = new wxMenu(); wxMenu* openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu,
...@@ -60,54 +58,50 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -60,54 +58,50 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
open_project_xpm ); open_project_xpm );
/* PCBNew Board */ // PCBNew Board
item = new wxMenuItem( filesMenu, ID_APPEND_FILE, item = new wxMenuItem( filesMenu, ID_APPEND_FILE,
_( "&Append Board" ), _( "&Append Board" ),
_( "Append another PCBNew board to the current loaded board" ) ); _( "Append another PCBNew board to the current loaded board" ) );
item->SetBitmap( import_xpm ); item->SetBitmap( import_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Separator */ // Separator
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
/* Save */ // Save
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD, item = new wxMenuItem( filesMenu, ID_SAVE_BOARD,
_( "&Save\tCtrl+S" ), _( "&Save\tCtrl+S" ),
_( "Save current board" ) ); _( "Save current board" ) );
item->SetBitmap( save_xpm ); item->SetBitmap( save_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Save As */ // Save As
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD_AS, item = new wxMenuItem( filesMenu, ID_SAVE_BOARD_AS,
_( "Save as..." ), _( "Save as..." ),
_( "Save the current board as.." ) ); _( "Save the current board as.." ) );
item->SetBitmap( save_as_xpm ); item->SetBitmap( save_as_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Separator */
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
/* Revert */ // Revert
item = new wxMenuItem( filesMenu, ID_MENU_READ_LAST_SAVED_VERSION_BOARD, item = new wxMenuItem( filesMenu, ID_MENU_READ_LAST_SAVED_VERSION_BOARD,
_( "&Revert" ), _( "&Revert" ),
_( "Clear board and get previous saved version of board" ) ); _( "Clear board and get previous saved version of board" ) );
item->SetBitmap( jigsaw_xpm ); item->SetBitmap( jigsaw_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Rescue */ // Rescue
item = new wxMenuItem( filesMenu, ID_MENU_RECOVER_BOARD, _( "&Rescue" ), item = new wxMenuItem( filesMenu, ID_MENU_RECOVER_BOARD, _( "&Rescue" ),
_( "Clear old board and get last rescue file" ) ); _( "Clear old board and get last rescue file" ) );
item->SetBitmap( hammer_xpm ); item->SetBitmap( hammer_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Separator */
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
/* Fabrication Outputs submenu */ /* Fabrication Outputs submenu */
wxMenu* fabricationOutputsMenu = new wxMenu; wxMenu* fabricationOutputsMenu = new wxMenu;
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE, item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE,
_( "&Modules Position" ), _( "&Modules Position File" ),
_( "Generate modules position file for pick and place" ) ); _( "Generate modules position file for pick and place" ) );
item->SetBitmap( post_compo_xpm ); item->SetBitmap( post_compo_xpm );
fabricationOutputsMenu->Append( item ); fabricationOutputsMenu->Append( item );
...@@ -118,14 +112,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -118,14 +112,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( post_drill_xpm ); item->SetBitmap( post_drill_xpm );
fabricationOutputsMenu->Append( item ); fabricationOutputsMenu->Append( item );
/* Component File */ // Component File
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE, item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE,
_( "&Component File" ), _( "&Component File" ),
_( "(Re)create components file for CvPcb" ) ); _( "(Re)create components file (*.cmp) for CvPcb" ) );
item->SetBitmap( save_cmpstuff_xpm ); item->SetBitmap( save_cmpstuff_xpm );
fabricationOutputsMenu->Append( item ); fabricationOutputsMenu->Append( item );
/* BOM File */ // BOM File
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD, item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD,
_( "&BOM File" ), _( "&BOM File" ),
_( "Create a bill of materials from schematic" ) ); _( "Create a bill of materials from schematic" ) );
...@@ -141,51 +135,41 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -141,51 +135,41 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Import submenu */ /* Import submenu */
wxMenu* submenuImport = new wxMenu(); wxMenu* submenuImport = new wxMenu();
/* Specctra Session */ // Specctra Session
item = new wxMenuItem( submenuImport, ID_GEN_IMPORT_SPECCTRA_SESSION, item = new wxMenuItem( submenuImport, ID_GEN_IMPORT_SPECCTRA_SESSION,
_( "&Specctra Session" ), _( "&Specctra Session" ),
_( "Import a routed \"Specctra Session\" (*.ses) file" ) ); _( "Import a routed \"Specctra Session\" (*.ses) file" ) );
item->SetBitmap( import_xpm ); // @todo need better bitmap item->SetBitmap( import_xpm ); // @todo need better bitmap
submenuImport->Append( item ); submenuImport->Append( item );
/**
* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in
* specctra_import.cpp
* item = new wxMenuItem(submenuImport, ID_GEN_IMPORT_SPECCTRA_DESIGN,
* _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
* item->SetBitmap(export_xpm); // @todo need better bitmap
* submenuImport->Append(item);
*/
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuImport, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuImport,
ID_GEN_IMPORT_FILE, _( "Import" ), ID_GEN_IMPORT_FILE, _( "Import" ),
_( "Import files" ), import_xpm ); _( "Import files" ), import_xpm );
/* Export submenu */ /* Export submenu */
wxMenu* submenuexport = new wxMenu(); wxMenu* submenuexport = new wxMenu();
/* Specctra DSN */ // Specctra DSN
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA, item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA,
_( "&Specctra DSN" ), _( "&Specctra DSN" ),
_( "Export the current board to a \"Specctra DSN\" file" ) ); _( "Export the current board to a \"Specctra DSN\" file" ) );
item->SetBitmap( export_xpm ); item->SetBitmap( export_xpm );
submenuexport->Append( item ); submenuexport->Append( item );
/* GenCAD */ // GenCAD
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT, item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT,
_( "&GenCAD" ), _( "Export GenCAD format" ) ); _( "&GenCAD" ), _( "Export GenCAD format" ) );
item->SetBitmap( export_xpm ); item->SetBitmap( export_xpm );
submenuexport->Append( item ); submenuexport->Append( item );
/* Module Report */ // Module Report
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_MODULE_REPORT, item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_MODULE_REPORT,
_( "&Module Report" ), _( "&Module Report" ),
_( "Create a report of all modules on the current board" ) ); _( "Create a report of all modules on the current board" ) );
item->SetBitmap( tools_xpm ); item->SetBitmap( tools_xpm );
submenuexport->Append( item ); submenuexport->Append( item );
/* VRML */ // VRML
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_VRML, item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_VRML,
_( "&VRML" ), _( "&VRML" ),
_( "Export a VRML board representation" ) ); _( "Export a VRML board representation" ) );
...@@ -196,43 +180,40 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -196,43 +180,40 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
ID_GEN_EXPORT_FILE, _( "&Export" ), ID_GEN_EXPORT_FILE, _( "&Export" ),
_( "Export board" ), export_xpm ); _( "Export board" ), export_xpm );
/* Separator */
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
/* Print */ // Print
item = new wxMenuItem( filesMenu, wxID_PRINT, item = new wxMenuItem( filesMenu, wxID_PRINT,
_( "&Print\tCtrl+P" ), _( "&Print\tCtrl+P" ),
_( "Print board" ) ); _( "Print board" ) );
item->SetBitmap( print_button ); item->SetBitmap( print_button );
filesMenu->Append( item ); filesMenu->Append( item );
/* Print SVG */ // Create SVG file
item = new wxMenuItem( filesMenu, ID_GEN_PLOT_SVG, item = new wxMenuItem( filesMenu, ID_GEN_PLOT_SVG,
_( "Print S&VG" ), _( "Print S&VG" ),
_( "Plot board in Scalable Vector Graphics format" ) ); _( "Plot board in Scalable Vector Graphics format" ) );
item->SetBitmap( print_button ); item->SetBitmap( print_button );
filesMenu->Append( item ); filesMenu->Append( item );
/* Plot */ // Plot
item = new wxMenuItem( filesMenu, ID_GEN_PLOT, item = new wxMenuItem( filesMenu, ID_GEN_PLOT,
_( "&Plot" ), _( "&Plot" ),
_( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ) ); _( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ) );
item->SetBitmap( plot_xpm ); item->SetBitmap( plot_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
filesMenu->AppendSeparator();
/* Archive Footprints Submenu */
filesMenu->AppendSeparator();
wxMenu* submenuarchive = new wxMenu(); wxMenu* submenuarchive = new wxMenu();
/* Add New Footprints */ // Archive New Footprints
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES, item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES,
_( "Add New Footprints" ), _( "Archive New Footprints" ),
_( "Archive new footprints only in a library (keep other footprints in this lib)" ) ); _( "Archive new footprints only in a library (keep other footprints in this lib)" ) );
item->SetBitmap( library_update_xpm ); item->SetBitmap( library_update_xpm );
submenuarchive->Append( item ); submenuarchive->Append( item );
/* Create FootPrint Archive */ // Create FootPrint Archive
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_ALL_MODULES, item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_ALL_MODULES,
_( "Create Footprint Archive" ), _( "Create Footprint Archive" ),
_( "Archive all footprints in a library (old library will be deleted)" ) ); _( "Archive all footprints in a library (old library will be deleted)" ) );
...@@ -255,62 +236,54 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -255,62 +236,54 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
#endif /* !defined( __WXMAC__ ) */ #endif /* !defined( __WXMAC__ ) */
/** Create Edit menu **/
/**
* Edit menu
*/
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
/* Undo */ // Undo
text = AddHotkeyName( _( "Undo" ), s_Pcbnew_Editor_Hokeys_Descr, HK_UNDO ); text = AddHotkeyName( _( "Undo" ), s_Pcbnew_Editor_Hokeys_Descr, HK_UNDO );
item = new wxMenuItem( editMenu, wxID_UNDO, text, item = new wxMenuItem( editMenu, wxID_UNDO, text,
HELP_UNDO, wxITEM_NORMAL ); HELP_UNDO, wxITEM_NORMAL );
item->SetBitmap( undo_xpm ); item->SetBitmap( undo_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Redo */ // Redo
text = AddHotkeyName( _( "Redo" ), s_Pcbnew_Editor_Hokeys_Descr, HK_REDO ); text = AddHotkeyName( _( "Redo" ), s_Pcbnew_Editor_Hokeys_Descr, HK_REDO );
item = new wxMenuItem( editMenu, wxID_REDO, text, item = new wxMenuItem( editMenu, wxID_REDO, text,
HELP_REDO, wxITEM_NORMAL ); HELP_REDO, wxITEM_NORMAL );
item->SetBitmap( redo_xpm ); item->SetBitmap( redo_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Delete */ // Delete
item = new wxMenuItem( editMenu, ID_PCB_DELETE_ITEM_BUTT, item = new wxMenuItem( editMenu, ID_PCB_DELETE_ITEM_BUTT,
_( "Delete" ), _( "Delete" ),
_( "Delete items" ) ); _( "Delete items" ) );
item->SetBitmap( delete_body_xpm ); item->SetBitmap( delete_body_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Separator */
editMenu->AppendSeparator(); editMenu->AppendSeparator();
/* Find */ // Find
text = AddHotkeyName( _( "&Find" ), s_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM ); text = AddHotkeyName( _( "&Find" ), s_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM );
item = new wxMenuItem( editMenu, ID_FIND_ITEMS, item = new wxMenuItem( editMenu, ID_FIND_ITEMS,
text, HELP_FIND ); text, HELP_FIND );
item->SetBitmap( find_xpm ); item->SetBitmap( find_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Separator */
editMenu->AppendSeparator(); editMenu->AppendSeparator();
/* Global Deletions */ // Global Deletions
item = new wxMenuItem( editMenu, ID_PCB_GLOBAL_DELETE, item = new wxMenuItem( editMenu, ID_PCB_GLOBAL_DELETE,
_( "Global &Deletions" ), _( "Global &Deletions" ),
_( "Delete tracks, modules, texts... on board" ) ); _( "Delete tracks, modules, texts... on board" ) );
item->SetBitmap( general_deletions_xpm ); item->SetBitmap( general_deletions_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Cleanup Tracks and Vias */ // Cleanup Tracks and Vias
item = new wxMenuItem( editMenu, ID_MENU_PCB_CLEAN, item = new wxMenuItem( editMenu, ID_MENU_PCB_CLEAN,
_( "&Cleanup Tracks and Vias" ), _( "&Cleanup Tracks and Vias" ),
_( "Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ) ); _( "Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ) );
item->SetBitmap( delete_body_xpm ); item->SetBitmap( delete_body_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Swap Layers */ // Swap Layers
item = new wxMenuItem( editMenu, ID_MENU_PCB_SWAP_LAYERS, item = new wxMenuItem( editMenu, ID_MENU_PCB_SWAP_LAYERS,
_( "&Swap Layers" ), _( "&Swap Layers" ),
_( "Swap tracks on copper layers or drawings on other layers" ) ); _( "Swap tracks on copper layers or drawings on other layers" ) );
...@@ -318,9 +291,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -318,9 +291,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
editMenu->Append( item ); editMenu->Append( item );
/** /** Create View menu **/
* View menu
*/
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar: /* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
...@@ -334,7 +305,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -334,7 +305,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
* in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators * in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus * for Zoom in and Zoom out sub menus
*/ */
/* Zoom In */ // Zoom In
text = AddHotkeyName( _( "Zoom In" ), s_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Zoom In" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_IN, false ); HK_ZOOM_IN, false );
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text,
...@@ -342,7 +313,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -342,7 +313,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( zoom_in_xpm ); item->SetBitmap( zoom_in_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Zoom Out */ // Zoom Out
text = AddHotkeyName( _( "Zoom Out" ), s_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Zoom Out" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_OUT, false ); HK_ZOOM_OUT, false );
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text,
...@@ -351,7 +322,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -351,7 +322,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( zoom_out_xpm ); item->SetBitmap( zoom_out_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Fit on Screen */ // Fit on Screen
text = AddHotkeyName( _( "Fit on Screen" ), s_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Fit on Screen" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_AUTO ); HK_ZOOM_AUTO );
...@@ -362,7 +333,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -362,7 +333,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
/* Redraw */ // Redraw
text = AddHotkeyName( _( "Redraw" ), s_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Redraw" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_REDRAW ); HK_ZOOM_REDRAW );
...@@ -371,18 +342,16 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -371,18 +342,16 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_redraw_xpm ); item->SetBitmap( zoom_redraw_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Separator */
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
/* 3D Display */ // 3D Display
item = new wxMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, item = new wxMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
_( "3D Display" ), _( "3D Display" ),
_( "Show board in 3D viewer" ) ); _( "Show board in 3D viewer" ) );
item->SetBitmap( show_3d_xpm ); item->SetBitmap( show_3d_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* List Nets */ // List Nets
item = new wxMenuItem( viewMenu, ID_MENU_LIST_NETS, item = new wxMenuItem( viewMenu, ID_MENU_LIST_NETS,
_( "&List Nets" ), _( "&List Nets" ),
_( "View a list of nets with names and id's" ) ); _( "View a list of nets with names and id's" ) );
...@@ -391,95 +360,86 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -391,95 +360,86 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/** /** Create Place Menu **/
* Place Menu
*/
wxMenu* placeMenu = new wxMenu; wxMenu* placeMenu = new wxMenu;
/* Module */ // Module
text = AddHotkeyName( _( "Module" ), s_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Module" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ADD_MODULE ); HK_ADD_MODULE, false );
item = new wxMenuItem( placeMenu, ID_COMPONENT_BUTT, text, item = new wxMenuItem( placeMenu, ID_COMPONENT_BUTT, text,
_( "Add modules" ), wxITEM_NORMAL ); _( "Place a module" ), wxITEM_NORMAL );
item->SetBitmap( module_xpm ); item->SetBitmap( module_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Track */ // Track
text = AddHotkeyName( _( "Track" ), s_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Track" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ADD_NEW_TRACK ); HK_ADD_NEW_TRACK, false );
item = new wxMenuItem( placeMenu, ID_TRACK_BUTT, text, item = new wxMenuItem( placeMenu, ID_TRACK_BUTT, text,
_( "Add tracks and vias" ), wxITEM_NORMAL ); _( "Place a track" ), wxITEM_NORMAL );
item->SetBitmap( add_tracks_xpm ); item->SetBitmap( add_tracks_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Zone */ // Zone
item = new wxMenuItem( placeMenu, ID_PCB_ZONES_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_ZONES_BUTT,
_( "Zone" ), _( "Zone" ),
_( "Add filled zones on copper layers or technical layers" )); _( "Place a filled zone" ));
item->SetBitmap( add_zone_xpm ); item->SetBitmap( add_zone_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Text */ // Text
item = new wxMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT,
_( "Text" ), _( "Text" ),
_( "Add text on copper layers or graphic text" ) ); _( "Place text" ) );
item->SetBitmap( add_text_xpm ); item->SetBitmap( add_text_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Graphics submenu */ // Graphic Arc
wxMenu *graphicsSubMenu = new wxMenu; item = new wxMenuItem( placeMenu, ID_PCB_ARC_BUTT,
/* Graphic Arc */
item = new wxMenuItem( graphicsSubMenu, ID_PCB_ARC_BUTT,
_( "Arc" ), _( "Arc" ),
_( "Add graphic arc" ) ); _( "Place a graphic arc" ) );
item->SetBitmap( add_arc_xpm ); item->SetBitmap( add_arc_xpm );
graphicsSubMenu->Append( item ); placeMenu->Append( item );
/* Graphic Circle */ // Graphic Circle
item = new wxMenuItem( graphicsSubMenu, ID_PCB_CIRCLE_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_CIRCLE_BUTT,
_( "Circle" ), _( "Circle" ),
_( "Add graphic circle" )); _( "Place a graphic circle" ));
item->SetBitmap( add_circle_xpm ); item->SetBitmap( add_circle_xpm );
graphicsSubMenu->Append( item ); placeMenu->Append( item );
/* Dimension */
item = new wxMenuItem( graphicsSubMenu, ID_PCB_DIMENSION_BUTT,
_( "Dimension" ),
_( "Add dimension" ) );
item->SetBitmap( add_dimension_xpm );
graphicsSubMenu->Append( item );
/* Line or Polygon */ // Line or Polygon
item = new wxMenuItem( graphicsSubMenu, ID_PCB_ADD_LINE_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_ADD_LINE_BUTT,
_( "Line or Polygon" ), _( "Line or Polygon" ),
_( "Add graphic line or polygon" )); _( "Place a graphic line or polygon" ));
item->SetBitmap( add_dashed_line_xpm ); item->SetBitmap( add_dashed_line_xpm );
graphicsSubMenu->Append( item ); placeMenu->Append( item );
/* Append graphics submenu to placeMenu */
placeMenu->AppendSubMenu(graphicsSubMenu, _( "Graphics" ));
/* Separator */
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
/* Layer alignment target */ // Dimension
item = new wxMenuItem( placeMenu, ID_PCB_DIMENSION_BUTT,
_( "Dimension" ),
_( "Place a dimension" ) );
item->SetBitmap( add_dimension_xpm );
placeMenu->Append( item );
// Layer alignment target
item = new wxMenuItem( placeMenu, ID_PCB_MIRE_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_MIRE_BUTT,
_( "Layer Alignment Target" ), _( "Layer alignment target" ),
_( "Add layer alignment target" )); _( "Place a layer alignment target" ));
item->SetBitmap( add_mires_xpm ); item->SetBitmap( add_mires_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
placeMenu->AppendSeparator();
/* Drill & Place Offset */ // Drill & Place Offset
item = new wxMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT,
_( "Drill and Place Origin" ), _( "Drill and Place Offset" ),
_( "Place the origin point for drill and place files" )); _( "Place the offset adjust for drill and place files" ));
item->SetBitmap( pcb_offset_xpm ); item->SetBitmap( pcb_offset_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Grid Origin */ // Grid Origin
item = new wxMenuItem( placeMenu, ID_PCB_PLACE_GRID_COORD_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_PLACE_GRID_COORD_BUTT,
_( "Grid Origin" ), _( "Grid Origin" ),
_( "Place origin point for the grid" )); _( "Place origin point for the grid" ));
...@@ -488,66 +448,62 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -488,66 +448,62 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/** /** Create Preferences and configuration menu **/
* Preferences and configuration
*/
wxMenu* configmenu = new wxMenu; wxMenu* configmenu = new wxMenu;
/* Library */ // Library
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, item = new wxMenuItem( configmenu, ID_CONFIG_REQ,
_( "&Library" ), _( "&Library" ),
_( "Setting libraries, directories and others..." ) ); _( "Setting libraries, directories and others..." ) );
item->SetBitmap( library_xpm ); item->SetBitmap( library_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Colors and Visibility are handled by the layers manager toolbar // Colors and Visibility are also handled by the layers manager toolbar
* that can be shown or hidden
*/
item = new wxMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, item = new wxMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
_( "Hide &Layers Manager" ), _( "Hide &Layers Manager" ),
HELP_SHOW_HIDE_LAYERMANAGER ); HELP_SHOW_HIDE_LAYERMANAGER );
item->SetBitmap( layers_manager_xpm ); item->SetBitmap( layers_manager_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* General */ // General
item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP, item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP,
_( "&General" ), _( "&General" ),
_( "Select general options for PCBnew" ) ); _( "Select general options for PCBnew" ) );
item->SetBitmap( preference_xpm ); item->SetBitmap( preference_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Display */ //Display
item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP, item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
_( "&Display" ), _( "&Display" ),
_( "Select how items (pads, tracks texts ... ) are displayed" ) ); _( "Select how items (pads, tracks texts ... ) are displayed" ) );
item->SetBitmap( display_options_xpm ); item->SetBitmap( display_options_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Dimensions submenu */ /* Create Dimensions submenu */
wxMenu* dimensionsMenu = new wxMenu; wxMenu* dimensionsMenu = new wxMenu;
/* Grid */ // Grid
item = new wxMenuItem( dimensionsMenu, ID_PCB_USER_GRID_SETUP, item = new wxMenuItem( dimensionsMenu, ID_PCB_USER_GRID_SETUP,
_( "Grid" ), _( "Grid" ),
_( "Adjust user grid dimensions" ) ); _( "Adjust user grid dimensions" ) );
item->SetBitmap( grid_xpm ); item->SetBitmap( grid_xpm );
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
/* Text and Drawings */ // Text and Drawings
item = new wxMenuItem( dimensionsMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP, item = new wxMenuItem( dimensionsMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
_( "Texts and Drawings" ), _( "Texts and Drawings" ),
_( "Adjust dimensions for texts and drawings" ) ); _( "Adjust dimensions for texts and drawings" ) );
item->SetBitmap( options_text_xpm ); item->SetBitmap( options_text_xpm );
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
/* Pads */ // Pads
item = new wxMenuItem( dimensionsMenu, ID_PCB_PAD_SETUP, item = new wxMenuItem( dimensionsMenu, ID_PCB_PAD_SETUP,
_( "Pads" ), _( "Pads" ),
_( "Adjust default pad characteristics" ) ); _( "Adjust default pad characteristics" ) );
item->SetBitmap( pad_xpm ); item->SetBitmap( pad_xpm );
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
/* Pads Mask Clearance */ // Pads Mask Clearance
item = new wxMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE, item = new wxMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE,
_( "Pads Mask Clearance" ), _( "Pads Mask Clearance" ),
_( "Adjust the global clearance between pads and the solder resist mask" ) ); _( "Adjust the global clearance between pads and the solder resist mask" ) );
...@@ -555,7 +511,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -555,7 +511,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
/* Save dimension preferences */ // Save dimension preferences
dimensionsMenu->AppendSeparator(); dimensionsMenu->AppendSeparator();
item = new wxMenuItem( dimensionsMenu, ID_CONFIG_SAVE, item = new wxMenuItem( dimensionsMenu, ID_CONFIG_SAVE,
_( "&Save" ), _( "&Save" ),
...@@ -569,23 +525,21 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -569,23 +525,21 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
_( "Global dimensions preferences" ), _( "Global dimensions preferences" ),
add_dimension_xpm ); add_dimension_xpm );
/* Language submenu */ // Language submenu
wxGetApp().AddMenuLanguageList( configmenu ); wxGetApp().AddMenuLanguageList( configmenu );
/* Hotkey submenu */ // Hotkey submenu
AddHotkeyConfigMenu( configmenu ); AddHotkeyConfigMenu( configmenu );
/* Separator */
configmenu->AppendSeparator(); configmenu->AppendSeparator();
/* Save Preferences */ // Save Preferences
item = new wxMenuItem( configmenu, ID_CONFIG_SAVE, item = new wxMenuItem( configmenu, ID_CONFIG_SAVE,
_( "&Save Preferences" ), _( "&Save Preferences" ),
_( "Save application preferences" ) ); _( "Save application preferences" ) );
item->SetBitmap( save_setup_xpm ); item->SetBitmap( save_setup_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Read Preferences */ // Read Preferences
item = new wxMenuItem( configmenu, ID_CONFIG_READ, item = new wxMenuItem( configmenu, ID_CONFIG_READ,
_( "&Read Preferences" ), _( "&Read Preferences" ),
_( "Read application preferences" ) ); _( "Read application preferences" ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment