Minor menu bar fixes.

* Fixed bug on Windows that prevented the menu short cuts from working
  properly.
* Fix duplicate menu short cut keys in KiCad, Pcbnew, and Eeschema.
* Add menu short cuts for all possible menu entries.
This commit is contained in:
Wayne Stambaugh 2011-10-18 15:59:19 -04:00
parent 1fde4ca807
commit 1bd7fc8a4e
8 changed files with 592 additions and 415 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2007-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -1161,8 +1161,8 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
GetParent()->GeneralControl( &DC, pos, localkey ); GetParent()->GeneralControl( &DC, pos, localkey );
#if 0 #ifdef __WINDOWS__
event.Skip(); // Allow menu shortcut processing event.Skip(); // Allow menu shortcut processing on Windows.
#endif #endif
} }

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2010-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file hotkeys_basic.cpp * @file hotkeys_basic.cpp
* @brief Some functions to handle hotkeys in KiCad * @brief Some functions to handle hotkeys in KiCad
@ -708,13 +733,13 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
/* List existing hotkey menu*/ /* List existing hotkey menu*/
AddMenuItem( HotkeySubmenu, AddMenuItem( HotkeySubmenu,
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
_( "List Current Keys" ), _( "&List Current Keys" ),
_( "Displays the current hotkeys list and corresponding commands" ), _( "Displays the current hotkeys list and corresponding commands" ),
KiBitmap( info_xpm ) ); KiBitmap( info_xpm ) );
/* Call hotkeys editor*/ /* Call hotkeys editor*/
AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_EDITOR, AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_EDITOR,
_( "Edit Hotkeys" ), _( "&Edit Hotkeys" ),
_( "Call the hotkeys editor" ), _( "Call the hotkeys editor" ),
KiBitmap( editor_xpm ) ); KiBitmap( editor_xpm ) );
@ -722,19 +747,19 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
/* create hotkey file to export current hotkeys config */ /* create hotkey file to export current hotkeys config */
AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG, AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG,
_( "Export Hotkeys Config" ), _( "E&xport Hotkeys" ),
_( "Create a hotkey configuration file to export the current hotkey config" ), _( "Create a hotkey configuration file to export the current hotkeys" ),
KiBitmap( save_setup_xpm ) ); KiBitmap( save_setup_xpm ) );
/* Reload hotkey file */ /* Reload hotkey file */
AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_IMPORT_CONFIG, AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_IMPORT_CONFIG,
_( "Import Hotkeys Config" ), _( "&Import Hotkeys" ),
_( "Load an existing hotkey configuration file" ), _( "Load an existing hotkey configuration file" ),
KiBitmap( reload_xpm ) ); KiBitmap( reload_xpm ) );
/* Append HotkeySubmenu to menu */ /* Append HotkeySubmenu to menu */
AddMenuItem( aMenu, HotkeySubmenu, AddMenuItem( aMenu, HotkeySubmenu,
ID_PREFERENCES_HOTKEY_SUBMENU, _( "Hotkeys" ), ID_PREFERENCES_HOTKEY_SUBMENU, _( "&Hotkeys" ),
_( "Hotkeys configuration and preferences" ), _( "Hotkeys configuration and preferences" ),
KiBitmap( hotkeys_xpm ) ); KiBitmap( hotkeys_xpm ) );
} }

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file eeschema/menubar.cpp * @file eeschema/menubar.cpp
* @brief (Re)Create the main menubar for the schematic frame * @brief (Re)Create the main menubar for the schematic frame
@ -32,6 +57,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Delete all existing menus so they can be rebuilt. // Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly. // This allows language changes of the menu text on the fly.
menuBar->Freeze(); menuBar->Freeze();
while( menuBar->GetMenuCount() ) while( menuBar->GetMenuCount() )
delete menuBar->Remove( 0 ); delete menuBar->Remove( 0 );
@ -42,17 +68,17 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// New // New
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_NEW_PROJECT, ID_NEW_PROJECT,
_( "&New\tCtrl+N" ), _( "&New\tCtrl+N" ),
_( "New schematic project" ), _( "New schematic project" ),
KiBitmap( new_xpm ) ); KiBitmap( new_xpm ) );
// Open // Open
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_LOAD_PROJECT, ID_LOAD_PROJECT,
_( "&Open\tCtrl+O" ), _( "&Open\tCtrl+O" ),
_( "Open an existing schematic project" ), _( "Open an existing schematic project" ),
KiBitmap( open_document_xpm ) ); KiBitmap( open_document_xpm ) );
// Open Recent submenu // Open Recent submenu
static wxMenu* openRecentMenu; static wxMenu* openRecentMenu;
@ -66,125 +92,125 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
wxGetApp().m_fileHistory.UseMenu( openRecentMenu ); wxGetApp().m_fileHistory.UseMenu( openRecentMenu );
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
AddMenuItem( fileMenu, openRecentMenu, AddMenuItem( fileMenu, openRecentMenu,
wxID_ANY, _( "Open &Recent" ), wxID_ANY, _( "Open &Recent" ),
_( "Open a recent opened schematic project" ), _( "Open a recent opened schematic project" ),
KiBitmap( open_project_xpm ) ); KiBitmap( open_project_xpm ) );
// Separator // Separator
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// Save schematic project // Save schematic project
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_SAVE_PROJECT, ID_SAVE_PROJECT,
_( "&Save Whole Schematic Project\tCtrl+S" ), _( "&Save Whole Schematic Project\tCtrl+S" ),
_( "Save all sheets in the schematic project" ), _( "Save all sheets in the schematic project" ),
KiBitmap( save_project_xpm ) ); KiBitmap( save_project_xpm ) );
// Save current sheet // Save current sheet
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_SAVE_ONE_SHEET, ID_SAVE_ONE_SHEET,
_( "Save &Current Sheet Only" ), _( "Save &Current Sheet Only" ),
_( "Save only current schematic sheet" ), _( "Save only current schematic sheet" ),
KiBitmap( save_xpm ) ); KiBitmap( save_xpm ) );
// Save current sheet as // Save current sheet as
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_SAVE_ONE_SHEET_AS, ID_SAVE_ONE_SHEET_AS,
_( "Save Current Sheet &as" ), _( "Save Current Sheet &As" ),
_( "Save current schematic sheet as..." ), _( "Save current schematic sheet as..." ),
KiBitmap( save_as_xpm ) ); KiBitmap( save_as_xpm ) );
// Separator // Separator
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// Page settings // Page settings
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_SHEET_SET, ID_SHEET_SET,
_( "P&age Settings" ), _( "Pa&ge Settings" ),
_( "Settigns for page size and information" ), _( "Settigns for page size and information" ),
KiBitmap( sheetset_xpm ) ); KiBitmap( sheetset_xpm ) );
// Print // Print
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
wxID_PRINT, wxID_PRINT,
_( "P&rint" ), _( "Pri&nt" ),
_( "Print schematic" ), _( "Print schematic" ),
KiBitmap( print_button_xpm ) ); KiBitmap( print_button_xpm ) );
// Plot submenu // Plot submenu
wxMenu* choice_plot_fmt = new wxMenu; wxMenu* choice_plot_fmt = new wxMenu;
// Plot PostScript // Plot PostScript
AddMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS, AddMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS,
_( "Plot PostScript" ), _( "Plot &PostScript" ),
_( "Plot schematic sheet in PostScript format" ), _( "Plot schematic sheet in PostScript format" ),
KiBitmap( plot_ps_xpm ) ); KiBitmap( plot_ps_xpm ) );
// Plot HPGL // Plot HPGL
AddMenuItem( choice_plot_fmt, AddMenuItem( choice_plot_fmt,
ID_GEN_PLOT_HPGL, ID_GEN_PLOT_HPGL,
_( "Plot HPGL" ), _( "Plot &HPGL" ),
_( "Plot schematic sheet in HPGL format" ), _( "Plot schematic sheet in HPGL format" ),
KiBitmap( plot_hpg_xpm ) ); KiBitmap( plot_hpg_xpm ) );
// Plot SVG // Plot SVG
AddMenuItem( choice_plot_fmt, AddMenuItem( choice_plot_fmt,
ID_GEN_PLOT_SVG, ID_GEN_PLOT_SVG,
_( "Plot SVG" ), _( "Plot &SVG" ),
_( "Plot schematic sheet in SVG format" ), _( "Plot schematic sheet in SVG format" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
// Plot DXF // Plot DXF
AddMenuItem( choice_plot_fmt, AddMenuItem( choice_plot_fmt,
ID_GEN_PLOT_DXF, ID_GEN_PLOT_DXF,
_( "Plot DXF" ), _( "Plot &DXF" ),
_( "Plot schematic sheet in DXF format" ), _( "Plot schematic sheet in DXF format" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
// Plot to Clipboard (Windows only) // Plot to Clipboard (Windows only)
#ifdef __WINDOWS__ #ifdef __WINDOWS__
AddMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD, AddMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD,
_( "Plot to Clipboard" ), _( "Plot to &Clipboard" ),
_( "Export drawings to clipboard" ), _( "Export drawings to clipboard" ),
KiBitmap( copy_button_xpm ) ); KiBitmap( copy_button_xpm ) );
#endif // __WINDOWS__ #endif // __WINDOWS__
// Plot submenu // Plot submenu
AddMenuItem( fileMenu, choice_plot_fmt, AddMenuItem( fileMenu, choice_plot_fmt,
ID_GEN_PLOT, _( "&Plot" ), ID_GEN_PLOT, _( "&Plot" ),
_( "Plot schematic sheet in HPGL, PostScript or SVG format" ), _( "Plot schematic sheet in HPGL, PostScript or SVG format" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
// Separator // Separator
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// Quit // Quit
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
wxID_EXIT, wxID_EXIT,
_( "&Quit" ), _( "&Quit" ),
_( "Quit Eeschema" ), _( "Quit Eeschema" ),
KiBitmap( exit_xpm ) ); KiBitmap( exit_xpm ) );
// Menu Edit: // Menu Edit:
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
// Undo // Undo
text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO ); text = AddHotkeyName( _( "&Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO );
AddMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) ); AddMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) );
// Redo // Redo
text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO ); text = AddHotkeyName( _( "&Redo" ), s_Schematic_Hokeys_Descr, HK_REDO );
AddMenuItem( editMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) ); AddMenuItem( editMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
// Delete // Delete
editMenu->AppendSeparator(); editMenu->AppendSeparator();
AddMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT, AddMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT,
_( "Delete" ), HELP_DELETE_ITEMS, _( "&Delete" ), HELP_DELETE_ITEMS,
KiBitmap( delete_body_xpm ) ); KiBitmap( delete_body_xpm ) );
// Find // Find
editMenu->AppendSeparator(); editMenu->AppendSeparator();
@ -194,10 +220,10 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Backannotate // Backannotate
editMenu->AppendSeparator(); editMenu->AppendSeparator();
AddMenuItem( editMenu, AddMenuItem( editMenu,
ID_BACKANNO_ITEMS, ID_BACKANNO_ITEMS,
_( "&Backannotate" ), _( "&Backannotate" ),
_( "Back annotate the footprint fields" ), _( "Back annotate the footprint fields" ),
KiBitmap( import_footprint_names_xpm ) ); KiBitmap( import_footprint_names_xpm ) );
// Menu View: // Menu View:
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
@ -218,17 +244,17 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
*/ */
// Zoom in // Zoom in
text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom &In" ), s_Schematic_Hokeys_Descr,
HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
// Zoom out // Zoom out
text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom &Out" ), s_Schematic_Hokeys_Descr,
HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut
AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
// Fit on screen // Fit on screen
text = AddHotkeyName( _( "Fit on Screen" ), s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO ); text = AddHotkeyName( _( "&Fit on Screen" ), s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO );
AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) );
@ -237,13 +263,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Hierarchy // Hierarchy
AddMenuItem( viewMenu, AddMenuItem( viewMenu,
ID_HIERARCHY, ID_HIERARCHY,
_( "H&ierarchy" ), _( "&Hierarchy" ),
_( "Navigate schematic hierarchy" ), _( "Navigate schematic hierarchy" ),
KiBitmap( hierarchy_nav_xpm ) ); KiBitmap( hierarchy_nav_xpm ) );
// Redraw // Redraw
text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW ); text = AddHotkeyName( _( "&Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW );
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
// Menu place: // Menu place:
@ -251,106 +277,104 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
wxMenu* placeMenu = new wxMenu; wxMenu* placeMenu = new wxMenu;
// Component // Component
text = AddHotkeyName( _( "Component" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Component" ), s_Schematic_Hokeys_Descr,
HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text,
HELP_PLACE_COMPONENTS, HELP_PLACE_COMPONENTS,
KiBitmap( add_component_xpm ) ); KiBitmap( add_component_xpm ) );
// Power port // Power port
text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Power Port" ), s_Schematic_Hokeys_Descr,
HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text,
HELP_PLACE_POWERPORT, HELP_PLACE_POWERPORT,
KiBitmap( add_power_xpm ) ); KiBitmap( add_power_xpm ) );
// Wire // Wire
text = AddHotkeyName( _( "Wire" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Wire" ), s_Schematic_Hokeys_Descr,
HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_WIRE_BUTT, text, AddMenuItem( placeMenu, ID_WIRE_BUTT, text,
HELP_PLACE_WIRE, HELP_PLACE_WIRE,
KiBitmap( add_line_xpm ) ); KiBitmap( add_line_xpm ) );
// Bus // Bus
text = AddHotkeyName( _( "Bus" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Bus" ), s_Schematic_Hokeys_Descr,
HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_BUS_BUTT, text, AddMenuItem( placeMenu, ID_BUS_BUTT, text,
HELP_PLACE_BUS, HELP_PLACE_BUS,
KiBitmap( add_bus_xpm ) ); KiBitmap( add_bus_xpm ) );
// Wire to Bus entry // Wire to Bus entry
text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Wire to Bus &Entry" ), s_Schematic_Hokeys_Descr,
HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // addan accelerator, not a shortcut HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // addan accelerator, not a shortcut
AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text,
HELP_PLACE_WIRE2BUS_ENTRY, HELP_PLACE_WIRE2BUS_ENTRY,
KiBitmap( add_line2bus_xpm ) ); KiBitmap( add_line2bus_xpm ) );
// Bus to Bus entry // Bus to Bus entry
text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Bus &to Bus Entry" ), s_Schematic_Hokeys_Descr,
HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text,
HELP_PLACE_BUS2BUS_ENTRY, HELP_PLACE_BUS2BUS_ENTRY,
KiBitmap( add_bus2bus_xpm ) ); KiBitmap( add_bus2bus_xpm ) );
// No Connect Flag // No Connect Flag
text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&No Connect Flag" ), s_Schematic_Hokeys_Descr,
HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) );
// Net name // Net name
text = AddHotkeyName( _( "Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_LABEL_BUTT, text, AddMenuItem( placeMenu, ID_LABEL_BUTT, text,
HELP_PLACE_NETLABEL, HELP_PLACE_NETLABEL,
KiBitmap( add_line_label_xpm ) ); KiBitmap( add_line_label_xpm ) );
// Global label // Global label
text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Gl&obal Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, AddMenuItem( placeMenu, ID_GLABEL_BUTT, text,
HELP_PLACE_GLOBALLABEL, HELP_PLACE_GLOBALLABEL,
KiBitmap( add_glabel_xpm ) ); KiBitmap( add_glabel_xpm ) );
// Junction // Junction
text = AddHotkeyName( _( "Junction" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Junction" ), s_Schematic_Hokeys_Descr,
HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text, AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text,
HELP_PLACE_JUNCTION, HELP_PLACE_JUNCTION,
KiBitmap( add_junction_xpm ) ); KiBitmap( add_junction_xpm ) );
// Separator // Separator
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
// Hierarchical label // Hierarchical label
text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "&Hierarchical Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, AddMenuItem( placeMenu, ID_HIERLABEL_BUTT,
text, HELP_PLACE_HIER_LABEL, text, HELP_PLACE_HIER_LABEL,
KiBitmap( add_hierarchical_label_xpm ) ); KiBitmap( add_hierarchical_label_xpm ) );
// Hierarchical sheet // Hierarchical sheet
text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "H&ierarchical &Sheet" ), s_Schematic_Hokeys_Descr,
HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text,
HELP_PLACE_SHEET, HELP_PLACE_SHEET,
KiBitmap( add_hierarchical_subsheet_xpm ) ); KiBitmap( add_hierarchical_subsheet_xpm ) );
// Import hierarchical sheet // Import hierarchical sheet
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_IMPORT_HLABEL_BUTT, ID_IMPORT_HLABEL_BUTT,
_( "Import Hierarchical Label" ), _( "I&mport Hierarchical Label" ),
HELP_IMPORT_SHEETPIN, HELP_IMPORT_SHEETPIN,
KiBitmap( import_hierarchical_label_xpm ) ); KiBitmap( import_hierarchical_label_xpm ) );
// Add hierarchical Pin to Sheet // Add hierarchical Pin to Sheet
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_SHEET_PIN_BUTT, ID_SHEET_PIN_BUTT,
_( "Hierarchical Pin to Sheet" ), _( "Hierarchical Pi&n to Sheet" ),
HELP_PLACE_SHEETPIN, HELP_PLACE_SHEETPIN,
KiBitmap( add_hierar_pin_xpm ) ); KiBitmap( add_hierar_pin_xpm ) );
// Separator // Separator
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
@ -359,37 +383,37 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr,
HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICLINES, HELP_PLACE_GRAPHICLINES,
KiBitmap( add_dashed_line_xpm ) ); KiBitmap( add_dashed_line_xpm ) );
// Graphic text // Graphic text
text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr,
HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut
AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICTEXTS, HELP_PLACE_GRAPHICTEXTS,
KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) );
// Graphic image // Graphic image
AddMenuItem( placeMenu, ID_ADD_IMAGE_BUTT, _( "Image" ), AddMenuItem( placeMenu, ID_ADD_IMAGE_BUTT, _( "Image" ),
HELP_PLACE_GRAPHICIMAGES, HELP_PLACE_GRAPHICIMAGES,
KiBitmap( image_xpm ) ); KiBitmap( image_xpm ) );
// Menu Preferences: // Menu Preferences:
wxMenu* preferencesMenu = new wxMenu; wxMenu* preferencesMenu = new wxMenu;
// Library // Library
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
ID_CONFIG_REQ, ID_CONFIG_REQ,
_( "&Library" ), _( "&Library" ),
_( "Library preferences" ), _( "Library preferences" ),
KiBitmap( library_xpm ) ); KiBitmap( library_xpm ) );
// Colors // Colors
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
ID_COLORS_SETUP, ID_COLORS_SETUP,
_( "&Colors" ), _( "&Colors" ),
_( "Color preferences" ), _( "Color preferences" ),
KiBitmap( palette_xpm ) ); KiBitmap( palette_xpm ) );
// Options (Preferences on WXMAC) // Options (Preferences on WXMAC)
@ -397,10 +421,10 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
preferencesMenu->Append( wxID_PREFERENCES ); preferencesMenu->Append( wxID_PREFERENCES );
#else #else
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
wxID_PREFERENCES, wxID_PREFERENCES,
_( "&Options" ), _( "&Options" ),
_( "Eeschema preferences" ), _( "Eeschema preferences" ),
KiBitmap( preference_xpm ) ); KiBitmap( preference_xpm ) );
#endif // __WXMAC__ #endif // __WXMAC__
@ -415,83 +439,83 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Save preferences // Save preferences
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
ID_CONFIG_SAVE, ID_CONFIG_SAVE,
_( "&Save Preferences" ), _( "&Save Preferences" ),
_( "Save application preferences" ), _( "Save application preferences" ),
KiBitmap( save_setup_xpm ) ); KiBitmap( save_setup_xpm ) );
// Read preferences // Read preferences
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
ID_CONFIG_READ, ID_CONFIG_READ,
_( "&Read Preferences" ), _( "&Read Preferences" ),
_( "Read application preferences" ), _( "Read application preferences" ),
KiBitmap( read_setup_xpm ) ); KiBitmap( read_setup_xpm ) );
// Menu Tools: // Menu Tools:
wxMenu* toolsMenu = new wxMenu; wxMenu* toolsMenu = new wxMenu;
// Library viewer // Library viewer
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_TO_LIBRARY, ID_TO_LIBRARY,
_( "Library &Browser" ), _( "Library &Browser" ),
_( "Library browser" ), _( "Library browser" ),
KiBitmap( library_browse_xpm ) ); KiBitmap( library_browse_xpm ) );
// Library editor // Library editor
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_TO_LIBRARY, ID_TO_LIBRARY,
_( "Library &Editor" ), _( "Library &Editor" ),
_( "Library editor" ), _( "Library editor" ),
KiBitmap( libedit_xpm ) ); KiBitmap( libedit_xpm ) );
// Separator // Separator
toolsMenu->AppendSeparator(); toolsMenu->AppendSeparator();
// Annotate // Annotate
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_GET_ANNOTATE, ID_GET_ANNOTATE,
_( "&Annotate" ), _( "&Annotate" ),
_( "Annotate the components in the schematic" ), _( "Annotate the components in the schematic" ),
KiBitmap( annotate_xpm ) ); KiBitmap( annotate_xpm ) );
// ERC // ERC
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_GET_ERC, ID_GET_ERC,
_( "ER&C" ), _( "ER&C" ),
_( "Perform electrical rule check" ), _( "Perform electrical rule check" ),
KiBitmap( erc_xpm ) ); KiBitmap( erc_xpm ) );
// Generate netlist // Generate netlist
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_GET_NETLIST, ID_GET_NETLIST,
_( "Generate &Netlist" ), _( "Generate &Netlist" ),
_( "Generate the component netlist" ), _( "Generate the component netlist" ),
KiBitmap( netlist_xpm ) ); KiBitmap( netlist_xpm ) );
// Generate bill of materials // Generate bill of materials
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_GET_TOOLS, ID_GET_TOOLS,
_( "Generate Bill of Materials" ), _( "Generate Bill of &Materials" ),
_( "Generate bill of materials" ), _( "Generate bill of materials" ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
// Separator // Separator
toolsMenu->AppendSeparator(); toolsMenu->AppendSeparator();
//Run CvPcb //Run CvPcb
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_TO_CVPCB, ID_TO_CVPCB,
_( "A&ssign Component Footprints" ), _( "A&ssign Component Footprints" ),
_( "Run CvPcb" ), _( "Run CvPcb" ),
KiBitmap( cvpcb_xpm ) ); KiBitmap( cvpcb_xpm ) );
// Run Pcbnew // Run Pcbnew
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_TO_PCB, ID_TO_PCB,
_( "&Layout Printed Circuit Board" ), _( "&Layout Printed Circuit Board" ),
_( "Run Pcbnew" ), _( "Run Pcbnew" ),
KiBitmap( pcbnew_xpm ) ); KiBitmap( pcbnew_xpm ) );
// Help Menu: // Help Menu:
@ -502,30 +526,31 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Contents // Contents
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_HELP, wxID_HELP,
_( "&Contents" ), _( "&Contents" ),
_( "Open the Eeschema handbook" ), _( "Open the Eeschema handbook" ),
KiBitmap( online_help_xpm ) ); KiBitmap( online_help_xpm ) );
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_INDEX, wxID_INDEX,
_( "&Getting Started in KiCad" ), _( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ), _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
KiBitmap( help_xpm ) ); KiBitmap( help_xpm ) );
// About Eeschema // About Eeschema
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_ABOUT, wxID_ABOUT,
_( "&About Eeschema" ), _( "&About Eeschema" ),
_( "About Eeschema schematic designer" ), _( "About Eeschema schematic designer" ),
KiBitmap( info_xpm ) ); KiBitmap( info_xpm ) );
// Create the menubar and append all submenus // Create the menubar and append all submenus
menuBar->Append( fileMenu, _( "&File" ) ); menuBar->Append( fileMenu, _( "&File" ) );
menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( editMenu, _( "&Edit" ) );
menuBar->Append( viewMenu, _( "&View" ) ); menuBar->Append( viewMenu, _( "&View" ) );
menuBar->Append( placeMenu, _( "&Place" ) ); menuBar->Append( placeMenu, _( "&Place" ) );
menuBar->Append( preferencesMenu, _( "&Preferences" ) ); menuBar->Append( preferencesMenu, _( "P&references" ) );
menuBar->Append( toolsMenu, _( "&Tools" ) ); menuBar->Append( toolsMenu, _( "&Tools" ) );
menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Append( helpMenu, _( "&Help" ) );

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file eeschema/menubar_libedit.cpp * @file eeschema/menubar_libedit.cpp
* @brief (Re)Create the main menubar for the component editor frame (LibEdit) * @brief (Re)Create the main menubar for the component editor frame (LibEdit)
@ -46,7 +71,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
// Save current library as... // Save current library as...
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_LIBEDIT_SAVE_CURRENT_LIB_AS, ID_LIBEDIT_SAVE_CURRENT_LIB_AS,
_( "Save Current Library &as" ), _( "Save Current Library &As" ),
_( "Save current active library as..." ), _( "Save current active library as..." ),
KiBitmap( save_as_xpm ) ); KiBitmap( save_as_xpm ) );
@ -63,7 +88,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
// Export as SVG file // Export as SVG file
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_LIBEDIT_GEN_SVG_FILE, ID_LIBEDIT_GEN_SVG_FILE,
_( "&Create SVG File" ), _( "Create S&VG File" ),
_( "Create a SVG file from the current loaded component" ), _( "Create a SVG file from the current loaded component" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
@ -81,7 +106,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
// Undo // Undo
text = AddHotkeyName( _( "Undo" ), s_Libedit_Hokeys_Descr, HK_UNDO ); text = AddHotkeyName( _( "&Undo" ), s_Libedit_Hokeys_Descr, HK_UNDO );
AddMenuItem( editMenu, AddMenuItem( editMenu,
wxID_UNDO, wxID_UNDO,
@ -90,7 +115,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( undo_xpm ) ); KiBitmap( undo_xpm ) );
// Redo // Redo
text = AddHotkeyName( _( "Redo" ), s_Libedit_Hokeys_Descr, HK_REDO ); text = AddHotkeyName( _( "&Redo" ), s_Libedit_Hokeys_Descr, HK_REDO );
AddMenuItem( editMenu, AddMenuItem( editMenu,
wxID_REDO, wxID_REDO,
text, text,
@ -103,7 +128,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
// Delete // Delete
AddMenuItem( editMenu, AddMenuItem( editMenu,
ID_LIBEDIT_DELETE_ITEM_BUTT, ID_LIBEDIT_DELETE_ITEM_BUTT,
_( "Delete" ), _( "&Delete" ),
HELP_DELETE_ITEMS, HELP_DELETE_ITEMS,
KiBitmap( delete_body_xpm ) ); KiBitmap( delete_body_xpm ) );
@ -124,22 +149,22 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
*/ */
// Zoom in // Zoom in
text = _( "Zoom In" ); text = _( "Zoom &In" );
AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
// Zoom out // Zoom out
text = _( "Zoom Out" ); text = _( "Zoom &Out" );
AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
// Fit on screen // Fit on screen
text = AddHotkeyName( _( "Fit on Screen" ), s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO ); text = AddHotkeyName( _( "&Fit on Screen" ), s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO );
AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) );
// Separator // Separator
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
// Redraw // Redraw
text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW ); text = AddHotkeyName( _( "&Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW );
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
// Menu Place: // Menu Place:
@ -155,35 +180,35 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
// Graphic text // Graphic text
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_LIBEDIT_BODY_TEXT_BUTT, ID_LIBEDIT_BODY_TEXT_BUTT,
_( "Graphic text" ), _( "Graphic &Text" ),
HELP_ADD_BODYTEXT, HELP_ADD_BODYTEXT,
KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) );
// Graphic rectangle // Graphic rectangle
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_LIBEDIT_BODY_RECT_BUTT, ID_LIBEDIT_BODY_RECT_BUTT,
_( "Rectangle" ), _( "&Rectangle" ),
HELP_ADD_BODYRECT, HELP_ADD_BODYRECT,
KiBitmap( add_rectangle_xpm ) ); KiBitmap( add_rectangle_xpm ) );
// Graphic Circle // Graphic Circle
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_LIBEDIT_BODY_CIRCLE_BUTT, ID_LIBEDIT_BODY_CIRCLE_BUTT,
_( "Circle" ), _( "&Circle" ),
HELP_ADD_BODYCIRCLE, HELP_ADD_BODYCIRCLE,
KiBitmap( add_circle_xpm ) ); KiBitmap( add_circle_xpm ) );
// Graphic Arc // Graphic Arc
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_LIBEDIT_BODY_ARC_BUTT, ID_LIBEDIT_BODY_ARC_BUTT,
_( "Arc" ), _( "&Arc" ),
HELP_ADD_BODYARC, HELP_ADD_BODYARC,
KiBitmap( add_arc_xpm ) ); KiBitmap( add_arc_xpm ) );
// Graphic Line or Polygon // Graphic Line or Polygon
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_LIBEDIT_BODY_LINE_BUTT, ID_LIBEDIT_BODY_LINE_BUTT,
_( "Line or Polygon" ), _( "&Line or Polygon" ),
HELP_ADD_BODYPOLYGON, HELP_ADD_BODYPOLYGON,
KiBitmap( add_polygon_xpm ) ); KiBitmap( add_polygon_xpm ) );
@ -239,6 +264,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
_( "&Contents" ), _( "&Contents" ),
_( "Open the Eeschema manual" ), _( "Open the Eeschema manual" ),
KiBitmap( online_help_xpm ) ); KiBitmap( online_help_xpm ) );
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_INDEX, wxID_INDEX,
_( "&Getting Started in KiCad" ), _( "&Getting Started in KiCad" ),
@ -247,6 +273,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
// About Eeschema // About Eeschema
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_ABOUT, wxID_ABOUT,
_( "&About Eeschema" ), _( "&About Eeschema" ),
@ -258,7 +285,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( editMenu, _( "&Edit" ) );
menuBar->Append( viewMenu, _( "&View" ) ); menuBar->Append( viewMenu, _( "&View" ) );
menuBar->Append( placeMenu, _( "&Place" ) ); menuBar->Append( placeMenu, _( "&Place" ) );
menuBar->Append( preferencesMenu, _( "&Preferences" ) ); menuBar->Append( preferencesMenu, _( "P&references" ) );
menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Append( helpMenu, _( "&Help" ) );
menuBar->Thaw(); menuBar->Thaw();

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file gerbview/menubar.cpp * @file gerbview/menubar.cpp
* @brief (Re)Create the main menubar for GerbView * @brief (Re)Create the main menubar for GerbView
@ -79,7 +104,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
m_drillFileHistory.AddFilesToMenu( ); m_drillFileHistory.AddFilesToMenu( );
AddMenuItem( fileMenu, openRecentDrlMenu, AddMenuItem( fileMenu, openRecentDrlMenu,
wxID_ANY, wxID_ANY,
_( "Open Recent &Drill File" ), _( "Open Recent Dri&ll File" ),
_( "Open a recent opened drill file" ), _( "Open a recent opened drill file" ),
KiBitmap( open_project_xpm ) ); KiBitmap( open_project_xpm ) );
@ -99,7 +124,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
// Export to Pcbnew // Export to Pcbnew
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
ID_GERBVIEW_EXPORT_TO_PCBNEW, ID_GERBVIEW_EXPORT_TO_PCBNEW,
_( "Export to &Pcbnew" ), _( "E&xport to Pcbnew" ),
_( "Export data in Pcbnew format" ), _( "Export data in Pcbnew format" ),
KiBitmap( export_xpm ) ); KiBitmap( export_xpm ) );
@ -109,7 +134,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
// Print // Print
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
wxID_PRINT, wxID_PRINT,
_( "P&rint" ), _( "&Print" ),
_( "Print gerber" ), _( "Print gerber" ),
KiBitmap( print_button_xpm ) ); KiBitmap( print_button_xpm ) );

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file kicad/menubar.cpp * @file kicad/menubar.cpp
* @brief (Re)Create the project manager menubar for KiCad * @brief (Re)Create the project manager menubar for KiCad
@ -30,7 +55,8 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
EVT_MENU( ID_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor ) EVT_MENU( ID_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor )
EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser ) EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser ) EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER_NAME, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser ) EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER_NAME,
KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles ) EVT_MENU( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles )
EVT_MENU( ID_READ_ZIP_ARCHIVE, KICAD_MANAGER_FRAME::OnUnarchiveFiles ) EVT_MENU( ID_READ_ZIP_ARCHIVE, KICAD_MANAGER_FRAME::OnUnarchiveFiles )
EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh ) EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh )
@ -52,7 +78,8 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
EVT_BUTTON( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator ) EVT_BUTTON( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator )
EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser ) EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser )
EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser ) EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER,
KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser )
END_EVENT_TABLE() END_EVENT_TABLE()
@ -176,7 +203,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Default // Default
item = new wxMenuItem( SubMenuPdfBrowserChoice, item = new wxMenuItem( SubMenuPdfBrowserChoice,
ID_SELECT_DEFAULT_PDF_BROWSER, ID_SELECT_DEFAULT_PDF_BROWSER,
_( "Default" ), _( "&Default" ),
_( "Use system default PDF viewer used to browse datasheets" ), _( "Use system default PDF viewer used to browse datasheets" ),
wxITEM_CHECK ); wxITEM_CHECK );
@ -189,7 +216,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Favourite // Favourite
item = new wxMenuItem( SubMenuPdfBrowserChoice, item = new wxMenuItem( SubMenuPdfBrowserChoice,
ID_SELECT_PREFERED_PDF_BROWSER, ID_SELECT_PREFERED_PDF_BROWSER,
_( "Favourite" ), _( "&Favourite" ),
_( "Use your favourite PDF viewer used to browse datasheets" ), _( "Use your favourite PDF viewer used to browse datasheets" ),
wxITEM_CHECK ); wxITEM_CHECK );
@ -203,14 +230,14 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Append PDF Viewer submenu to preferences // Append PDF Viewer submenu to preferences
AddMenuItem( SubMenuPdfBrowserChoice, AddMenuItem( SubMenuPdfBrowserChoice,
ID_SELECT_PREFERED_PDF_BROWSER_NAME, ID_SELECT_PREFERED_PDF_BROWSER_NAME,
_( "PDF Viewer" ), _( "&PDF Viewer" ),
_( "Select your favourite PDF viewer used to browse datasheets" ), _( "Select your favourite PDF viewer used to browse datasheets" ),
KiBitmap( datasheet_xpm ) ); KiBitmap( datasheet_xpm ) );
// PDF viewer submenu // PDF viewer submenu
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
SubMenuPdfBrowserChoice, -1, SubMenuPdfBrowserChoice, -1,
_( "PDF Viewer" ), _( "&PDF Viewer" ),
_( "PDF viewer preferences" ), _( "PDF viewer preferences" ),
KiBitmap( datasheet_xpm ) ); KiBitmap( datasheet_xpm ) );

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file pcbnew/menubar_modedit.cpp * @file pcbnew/menubar_modedit.cpp
* @brief (Re)Create the main menubar for the module editor * @brief (Re)Create the main menubar for the module editor
@ -34,7 +59,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// New module // New module
AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE, AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
_( "New Module" ), _( "Create new module" ), _( "&New Module" ), _( "Create new module" ),
KiBitmap( new_footprint_xpm ) ); KiBitmap( new_footprint_xpm ) );
// Open submenu // Open submenu
@ -42,186 +67,187 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// from File // from File
AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART, AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART,
_( "Load from File (Import)" ), _( "Load from File (&Import)" ),
_( "Import a footprint from an existing file" ), _( "Import a footprint from an existing file" ),
KiBitmap( import_module_xpm ) ); KiBitmap( import_module_xpm ) );
// from Library // from Library
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE, AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE,
_( "Load from Library" ), _( "Load from Li&brary" ),
_( "Open a footprint module from a Library" ), _( "Open a footprint module from a Library" ),
KiBitmap( module_xpm ) ); KiBitmap( module_xpm ) );
// from current Board // from current Board
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD, AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
_( "Load from Current Board" ), _( "Load from &Current Board" ),
_( "Load a footprint module from the current loaded board" ), _( "Load a footprint module from the current loaded board" ),
KiBitmap( load_module_board_xpm ) ); KiBitmap( load_module_board_xpm ) );
/* Append openSubmenu to fileMenu */ /* Append openSubmenu to fileMenu */
AddMenuItem( fileMenu, openSubmenu, -1, AddMenuItem( fileMenu, openSubmenu, -1,
_( "&Load Module" ), _( "&Load Module" ),
_( "Load a footprint module" ), _( "Load a footprint module" ),
KiBitmap( open_document_xpm ) ); KiBitmap( open_document_xpm ) );
// Save module // Save module
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE,
_( "&Save Module in Active Library" ), _( "&Save Module in Active Library" ),
_( "Save module in active library" ), _( "Save module in active library" ),
KiBitmap( save_library_xpm ) ); KiBitmap( save_library_xpm ) );
// Save module in new lib // Save module in new lib
AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART, AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
_( "&Save Module in a New Lib" ), _( "S&ave Module in a New Lib" ),
_( "Create new library and save current module" ), _( "Create new library and save current module" ),
KiBitmap( new_library_xpm ) ); KiBitmap( new_library_xpm ) );
// Export module // Export module
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART, AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
_( "&Export Module" ), _( "&Export Module" ),
_( "Save the current loaded module to a file" ), _( "Save the current loaded module to a file" ),
KiBitmap( export_module_xpm ) ); KiBitmap( export_module_xpm ) );
// Separator // Separator
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// Print // Print
AddMenuItem( fileMenu, wxID_PRINT, AddMenuItem( fileMenu, wxID_PRINT,
_( "&Print" ), _( "&Print" ),
_( "Print the current module" ), _( "Print the current module" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
// Separator // Separator
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// Close editor // Close editor
AddMenuItem( fileMenu, wxID_EXIT, AddMenuItem( fileMenu, wxID_EXIT,
_( "Close" ), _( "Cl&ose" ),
_( "Close the footprint editor" ), _( "Close the footprint editor" ),
KiBitmap( exit_xpm ) ); KiBitmap( exit_xpm ) );
// Menu Edit: // Menu Edit:
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
// Undo // Undo
AddMenuItem( editMenu, wxID_UNDO, AddMenuItem( editMenu, wxID_UNDO,
_( "Undo" ), _( "Undo last edit" ), _( "&Undo" ), _( "Undo last edit" ),
KiBitmap( undo_xpm ) ); KiBitmap( undo_xpm ) );
// Redo // Redo
AddMenuItem( editMenu, wxID_REDO, AddMenuItem( editMenu, wxID_REDO,
_( "Redo" ), _( "Redo the last undo action" ), _( "&Redo" ), _( "Redo the last undo action" ),
KiBitmap( redo_xpm ) ); KiBitmap( redo_xpm ) );
// Delete items // Delete items
AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL, AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
_( "Delete" ), _( "Delete objects with the eraser" ), _( "&Delete" ), _( "Delete objects with the eraser" ),
KiBitmap( delete_body_xpm ) ); KiBitmap( delete_body_xpm ) );
// Separator // Separator
editMenu->AppendSeparator(); editMenu->AppendSeparator();
// Properties // Properties
AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES, AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
_( "Properties" ), _( "&Properties" ),
_( "Edit module properties" ), _( "Edit module properties" ),
KiBitmap( module_options_xpm ) ); KiBitmap( module_options_xpm ) );
// Dimensions submenu // Dimensions submenu
wxMenu* dimensions_Submenu = new wxMenu; wxMenu* dimensions_Submenu = new wxMenu;
// Sizes and Widths // Sizes and Widths
AddMenuItem( dimensions_Submenu, ID_PCB_DRAWINGS_WIDTHS_SETUP, AddMenuItem( dimensions_Submenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
_( "Sizes and Widths" ), _( "&Sizes and Widths" ),
_( "Adjust width for texts and drawings" ), _( "Adjust width for texts and drawings" ),
KiBitmap( options_text_xpm ) ); KiBitmap( options_text_xpm ) );
// Pad settings // Pad settings
AddMenuItem( dimensions_Submenu, ID_MODEDIT_PAD_SETTINGS, AddMenuItem( dimensions_Submenu, ID_MODEDIT_PAD_SETTINGS,
_( "Pad Settings" ), _( "Edit the settings for new pads" ), _( "&Pad Settings" ), _( "Edit the settings for new pads" ),
KiBitmap( options_pad_xpm ) ); KiBitmap( options_pad_xpm ) );
// User grid size // User grid size
AddMenuItem( dimensions_Submenu, ID_PCB_USER_GRID_SETUP, AddMenuItem( dimensions_Submenu, ID_PCB_USER_GRID_SETUP,
_( "User Grid Size" ), _( "Adjust user grid" ), _( "&User Grid Size" ), _( "Adjust user grid" ),
KiBitmap( grid_xpm ) ); KiBitmap( grid_xpm ) );
// Append dimensions_Submenu to editMenu // Append dimensions_Submenu to editMenu
AddMenuItem( editMenu, AddMenuItem( editMenu,
dimensions_Submenu, -1, dimensions_Submenu, -1,
_( "&Dimensions" ), _( "Di&mensions" ),
_( "Edit dimensions preferences" ), _( "Edit dimensions preferences" ),
KiBitmap( add_dimension_xpm ) ); KiBitmap( add_dimension_xpm ) );
// View menu // View menu
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
// Zoom In // Zoom In
AddMenuItem( viewMenu, ID_ZOOM_IN, AddMenuItem( viewMenu, ID_ZOOM_IN,
_( "Zoom In" ), _( "Zoom in on the module" ), _( "Zoom &In" ), _( "Zoom in on the module" ),
KiBitmap( zoom_in_xpm ) ); KiBitmap( zoom_in_xpm ) );
// Zoom Out // Zoom Out
AddMenuItem( viewMenu, ID_ZOOM_OUT, AddMenuItem( viewMenu, ID_ZOOM_OUT,
_( "Zoom Out" ), _( "Zoom out on the module" ), _( "Zoom &Out" ), _( "Zoom out on the module" ),
KiBitmap( zoom_out_xpm ) ); KiBitmap( zoom_out_xpm ) );
// Fit on Screen // Fit on Screen
AddMenuItem( viewMenu, ID_ZOOM_PAGE, AddMenuItem( viewMenu, ID_ZOOM_PAGE,
_( "Fit on Screen" ), _( "&Fit on Screen" ),
_( "Zoom and fit the module in the window" ), _( "Zoom and fit the module in the window" ),
KiBitmap( zoom_fit_in_page_xpm ) ); KiBitmap( zoom_fit_in_page_xpm ) );
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
// Redraw // Redraw
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, AddMenuItem( viewMenu, ID_ZOOM_REDRAW,
_( "Redraw" ), _( "Redraw the window's viewport" ), _( "&Redraw" ), _( "Redraw the window's viewport" ),
KiBitmap( zoom_redraw_xpm ) ); KiBitmap( zoom_redraw_xpm ) );
// 3D view // 3D view
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
_( "3D View" ), _( "3&D View" ),
_( "Show board in 3D viewer" ), _( "Show board in 3D viewer" ),
KiBitmap( three_d_xpm ) ); KiBitmap( three_d_xpm ) );
// Menu Place: // Menu Place:
wxMenu* placeMenu = new wxMenu; wxMenu* placeMenu = new wxMenu;
// Pad // Pad
AddMenuItem( placeMenu, ID_MODEDIT_PAD_TOOL, AddMenuItem( placeMenu, ID_MODEDIT_PAD_TOOL,
_( "Pad" ), _( "Add pad" ), _( "&Pad" ), _( "Add pad" ),
KiBitmap( pad_xpm ) ); KiBitmap( pad_xpm ) );
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
// Circle // Circle
AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL, AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
_( "Circle" ), _( "Add graphic circle" ), _( "&Circle" ), _( "Add graphic circle" ),
KiBitmap( add_circle_xpm ) ); KiBitmap( add_circle_xpm ) );
// Line or Polygon // Line or Polygon
AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL, AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
_( "Line or Polygon" ), _( "&Line or Polygon" ),
_( "Add graphic line or polygon" ), _( "Add graphic line or polygon" ),
KiBitmap( add_polygon_xpm ) ); KiBitmap( add_polygon_xpm ) );
// Arc // Arc
AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL, AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
_( "Arc" ), _( "Add graphic arc" ), _( "&Arc" ), _( "Add graphic arc" ),
KiBitmap( add_arc_xpm ) ); KiBitmap( add_arc_xpm ) );
// Text // Text
AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL, AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
_( "Text" ), _( "Add graphic text" ), _( "&Text" ), _( "Add graphic text" ),
KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) );
placeMenu->AppendSeparator();
// Anchor // Anchor
placeMenu->AppendSeparator();
AddMenuItem( placeMenu, ID_MODEDIT_ANCHOR_TOOL, AddMenuItem( placeMenu, ID_MODEDIT_ANCHOR_TOOL,
_( "Anchor" ), _( "A&nchor" ),
_( "Place the footprint module reference anchor" ), _( "Place the footprint module reference anchor" ),
KiBitmap( anchor_xpm ) ); KiBitmap( anchor_xpm ) );
// Menu Help: // Menu Help:
wxMenu* helpMenu = new wxMenu; wxMenu* helpMenu = new wxMenu;
@ -231,20 +257,21 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Contents // Contents
AddMenuItem( helpMenu, wxID_HELP, AddMenuItem( helpMenu, wxID_HELP,
_( "&Contents" ), _( "&Contents" ),
_( "Open the Pcbnew handbook" ), _( "Open the Pcbnew handbook" ),
KiBitmap( online_help_xpm ) ); KiBitmap( online_help_xpm ) );
AddMenuItem( helpMenu, wxID_INDEX, AddMenuItem( helpMenu, wxID_INDEX,
_( "&Getting Started in KiCad" ), _( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ), _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
KiBitmap( help_xpm ) ); KiBitmap( help_xpm ) );
// About Pcbnew // About Pcbnew
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, wxID_ABOUT, AddMenuItem( helpMenu, wxID_ABOUT,
_( "&About Pcbnew" ), _( "&About Pcbnew" ),
_( "About Pcbnew PCB designer" ), _( "About Pcbnew PCB designer" ),
KiBitmap( info_xpm ) ); KiBitmap( info_xpm ) );
// Append menus to the menubar // Append menus to the menubar
menuBar->Append( fileMenu, _( "&File" ) ); menuBar->Append( fileMenu, _( "&File" ) );

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2010-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file menubar_pcbframe.cpp * @file menubar_pcbframe.cpp
* Pcbnew editor menu bar * Pcbnew editor menu bar
@ -28,7 +53,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
menuBar->Freeze(); menuBar->Freeze();
while( menuBar->GetMenuCount() ) while( menuBar->GetMenuCount() )
delete menuBar->Remove(0); delete menuBar->Remove( 0 );
// Recreate all menus: // Recreate all menus:
@ -37,16 +62,15 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// New // New
AddMenuItem( filesMenu, ID_NEW_BOARD, AddMenuItem( filesMenu, ID_NEW_BOARD,
_( "&New" ), _( "&New" ),
_( "Clear current board and initialize a new one" ), _( "Clear current board and initialize a new one" ),
KiBitmap( new_xpm ) ); KiBitmap( new_xpm ) );
// Open // Open
text = AddHotkeyName( _( "&Open" ), g_Board_Editor_Hokeys_Descr, text = AddHotkeyName( _( "&Open" ), g_Board_Editor_Hokeys_Descr, HK_LOAD_BOARD );
HK_LOAD_BOARD );
AddMenuItem( filesMenu, ID_LOAD_FILE, text, AddMenuItem( filesMenu, ID_LOAD_FILE, text,
_( "Delete current board and load new board" ), _( "Delete current board and load new board" ),
KiBitmap( open_document_xpm ) ); KiBitmap( open_document_xpm ) );
// Load Recent submenu // Load Recent submenu
static wxMenu* openRecentMenu; static wxMenu* openRecentMenu;
@ -67,67 +91,66 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Pcbnew Board // Pcbnew Board
AddMenuItem( filesMenu, ID_APPEND_FILE, AddMenuItem( 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" ),
KiBitmap( import_xpm ) ); KiBitmap( import_xpm ) );
// Separator // Separator
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
// Save // Save
text = AddHotkeyName( _( "&Save" ), g_Board_Editor_Hokeys_Descr, text = AddHotkeyName( _( "&Save" ), g_Board_Editor_Hokeys_Descr, HK_SAVE_BOARD );
HK_SAVE_BOARD );
AddMenuItem( filesMenu, ID_SAVE_BOARD, text, AddMenuItem( filesMenu, ID_SAVE_BOARD, text,
_( "Save current board" ), _( "Save current board" ),
KiBitmap( save_xpm ) ); KiBitmap( save_xpm ) );
// Save As // Save As
AddMenuItem( filesMenu, ID_SAVE_BOARD_AS, AddMenuItem( filesMenu, ID_SAVE_BOARD_AS,
_( "Save as..." ), _( "Sa&ve As..." ),
_( "Save the current board as.." ), _( "Save the current board as.." ),
KiBitmap( save_as_xpm ) ); KiBitmap( save_as_xpm ) );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
// Revert // Revert
AddMenuItem( filesMenu, ID_MENU_READ_LAST_SAVED_VERSION_BOARD, AddMenuItem( 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" ),
KiBitmap( jigsaw_xpm ) ); KiBitmap( jigsaw_xpm ) );
// Rescue // Rescue
AddMenuItem( filesMenu, ID_MENU_RECOVER_BOARD, _( "&Rescue" ), AddMenuItem( filesMenu, ID_MENU_RECOVER_BOARD, _( "Rescue" ),
_( "Clear old board and get last rescue file" ), _( "Clear old board and get last rescue file" ),
KiBitmap( hammer_xpm ) ); KiBitmap( hammer_xpm ) );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
/* Fabrication Outputs submenu */ /* Fabrication Outputs submenu */
wxMenu* fabricationOutputsMenu = new wxMenu; wxMenu* fabricationOutputsMenu = new wxMenu;
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE, AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE,
_( "&Modules Position File" ), _( "&Modules Position File" ),
_( "Generate modules position file for pick and place" ), _( "Generate modules position file for pick and place" ),
KiBitmap( post_compo_xpm ) ); KiBitmap( post_compo_xpm ) );
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE, AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE,
_( "&Drill File" ), _( "&Drill File" ),
_( "Generate excellon2 drill file" ), _( "Generate excellon2 drill file" ),
KiBitmap( post_drill_xpm ) ); KiBitmap( post_drill_xpm ) );
// Component File // Component File
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE, AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE,
_( "&Component File" ), _( "&Component File" ),
_( "(Re)create components file (*.cmp) for CvPcb" ), _( "(Re)create components file (*.cmp) for CvPcb" ),
KiBitmap( create_cmp_file_xpm ) ); KiBitmap( create_cmp_file_xpm ) );
// BOM File // BOM File
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD, AddMenuItem( 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" ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
// Fabrications Outputs submenu append // Fabrications Outputs submenu append
AddMenuItem( filesMenu, fabricationOutputsMenu, AddMenuItem( filesMenu, fabricationOutputsMenu,
-1, _( "Fabrication Outputs" ), -1, _( "&Fabrication Outputs" ),
_( "Generate files for fabrication" ), _( "Generate files for fabrication" ),
KiBitmap( fabrication_xpm ) ); KiBitmap( fabrication_xpm ) );
@ -142,7 +165,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( import_xpm ) ); KiBitmap( import_xpm ) );
AddMenuItem( filesMenu, submenuImport, AddMenuItem( filesMenu, submenuImport,
ID_GEN_IMPORT_FILE, _( "Import" ), ID_GEN_IMPORT_FILE, _( "&Import" ),
_( "Import files" ), KiBitmap( import_xpm ) ); _( "Import files" ), KiBitmap( import_xpm ) );
@ -151,38 +174,38 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Specctra DSN // Specctra DSN
AddMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA, AddMenuItem( 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" ),
KiBitmap( export_xpm ) ); KiBitmap( export_xpm ) );
// GenCAD // GenCAD
AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT, AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT,
_( "&GenCAD" ), _( "Export GenCAD format" ), _( "&GenCAD" ), _( "Export GenCAD format" ),
KiBitmap( export_xpm ) ); KiBitmap( export_xpm ) );
// Module Report // Module Report
AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_MODULE_REPORT, AddMenuItem( 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" ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
// VRML // VRML
AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_VRML, AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_VRML,
_( "&VRML" ), _( "&VRML" ),
_( "Export a VRML board representation" ), _( "Export a VRML board representation" ),
KiBitmap( three_d_xpm ) ); KiBitmap( three_d_xpm ) );
AddMenuItem( filesMenu, submenuexport, AddMenuItem( filesMenu, submenuexport,
ID_GEN_EXPORT_FILE, _( "&Export" ), ID_GEN_EXPORT_FILE, _( "E&xport" ),
_( "Export board" ), KiBitmap( export_xpm ) ); _( "Export board" ), KiBitmap( export_xpm ) );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
// Page settings // Page settings
AddMenuItem( filesMenu, ID_SHEET_SET, AddMenuItem( filesMenu, ID_SHEET_SET,
_( "&Page settings" ), _( "Page s&ettings" ),
_( "Page settings for paper size and texts" ), _( "Page settings for paper size and texts" ),
KiBitmap( sheetset_xpm ) ); KiBitmap( sheetset_xpm ) );
// Print // Print
AddMenuItem( filesMenu, wxID_PRINT, AddMenuItem( filesMenu, wxID_PRINT,
@ -191,13 +214,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Create SVG file // Create SVG file
AddMenuItem( filesMenu, ID_GEN_PLOT_SVG, AddMenuItem( filesMenu, ID_GEN_PLOT_SVG,
_( "Print S&VG" ), _( "Print SV&G" ),
_( "Plot board in Scalable Vector Graphics format" ), _( "Plot board in Scalable Vector Graphics format" ),
KiBitmap( print_button_xpm ) ); KiBitmap( print_button_xpm ) );
// Plot // Plot
AddMenuItem( filesMenu, ID_GEN_PLOT, AddMenuItem( filesMenu, ID_GEN_PLOT,
_( "&Plot" ), _( "P&lot" ),
_( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ), _( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
@ -207,19 +230,19 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Archive New Footprints // Archive New Footprints
AddMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES, AddMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES,
_( "Archive 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)" ),
KiBitmap( library_update_xpm ) ); KiBitmap( library_update_xpm ) );
// Create FootPrint Archive // Create FootPrint Archive
AddMenuItem( submenuarchive, ID_MENU_ARCHIVE_ALL_MODULES, AddMenuItem( 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)" ),
KiBitmap( library_xpm ) ); KiBitmap( library_xpm ) );
AddMenuItem( filesMenu, submenuarchive, AddMenuItem( filesMenu, submenuarchive,
ID_MENU_ARCHIVE_MODULES, ID_MENU_ARCHIVE_MODULES,
_( "Archive Footprints" ), _( "Arc&hive Footprints" ),
_( "Archive or add footprints in a library file" ), _( "Archive or add footprints in a library file" ),
KiBitmap( library_xpm ) ); KiBitmap( library_xpm ) );
@ -232,32 +255,29 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
// Undo // Undo
text = AddHotkeyName( _( "Undo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_UNDO ); text = AddHotkeyName( _( "&Undo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_UNDO );
AddMenuItem( editMenu, wxID_UNDO, text, AddMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) );
HELP_UNDO, KiBitmap( undo_xpm ) );
// Redo // Redo
text = AddHotkeyName( _( "Redo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_REDO ); text = AddHotkeyName( _( "&Redo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_REDO );
AddMenuItem( editMenu, wxID_REDO, text, AddMenuItem( editMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
HELP_REDO, KiBitmap( redo_xpm ) );
// Delete // Delete
AddMenuItem( editMenu, ID_PCB_DELETE_ITEM_BUTT, AddMenuItem( editMenu, ID_PCB_DELETE_ITEM_BUTT,
_( "Delete" ), _( "Delete items" ), _( "&Delete" ), _( "Delete items" ),
KiBitmap( delete_body_xpm ) ); KiBitmap( delete_body_xpm ) );
editMenu->AppendSeparator(); editMenu->AppendSeparator();
// Find // Find
text = AddHotkeyName( _( "&Find" ), g_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM ); text = AddHotkeyName( _( "&Find" ), g_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM );
AddMenuItem( editMenu, ID_FIND_ITEMS, AddMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND , KiBitmap( find_xpm ) );
text, HELP_FIND , KiBitmap( find_xpm ) );
editMenu->AppendSeparator(); editMenu->AppendSeparator();
// Global Deletions // Global Deletions
AddMenuItem( editMenu, ID_PCB_GLOBAL_DELETE, AddMenuItem( editMenu, ID_PCB_GLOBAL_DELETE,
_( "Global &Deletions" ), _( "&Global Deletions" ),
_( "Delete tracks, modules, texts... on board" ), _( "Delete tracks, modules, texts... on board" ),
KiBitmap( general_deletions_xpm ) ); KiBitmap( general_deletions_xpm ) );
@ -300,17 +320,17 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
* for Zoom in and Zoom out sub menus * for Zoom in and Zoom out sub menus
*/ */
// Zoom In // Zoom In
text = AddHotkeyName( _( "Zoom In" ), g_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Zoom &In" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_IN, IS_ACCELERATOR ); HK_ZOOM_IN, IS_ACCELERATOR );
AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
// Zoom Out // Zoom Out
text = AddHotkeyName( _( "Zoom Out" ), g_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "Zoom &Out" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_OUT, IS_ACCELERATOR ); HK_ZOOM_OUT, IS_ACCELERATOR );
AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
// Fit on Screen // Fit on Screen
text = AddHotkeyName( _( "Fit on Screen" ), g_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "&Fit on Screen" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_AUTO ); HK_ZOOM_AUTO );
AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT,
@ -319,7 +339,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
// Redraw // Redraw
text = AddHotkeyName( _( "Redraw" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_REDRAW ); text = AddHotkeyName( _( "&Redraw" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_REDRAW );
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text,
HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) ); HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
@ -327,7 +347,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// 3D Display // 3D Display
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
_( "3D Display" ),_( "Show board in 3D viewer" ), _( "3&D Display" ),_( "Show board in 3D viewer" ),
KiBitmap( three_d_xpm ) ); KiBitmap( three_d_xpm ) );
// List Nets // List Nets
@ -339,38 +359,38 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
wxMenu* placeMenu = new wxMenu; wxMenu* placeMenu = new wxMenu;
// Module // Module
text = AddHotkeyName( _( "Module" ), g_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "&Module" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ADD_MODULE, IS_ACCELERATOR ); HK_ADD_MODULE, IS_ACCELERATOR );
AddMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text, AddMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text,
_( "Add modules" ), KiBitmap( module_xpm ) ); _( "Add modules" ), KiBitmap( module_xpm ) );
// Track // Track
text = AddHotkeyName( _( "Track" ), g_Pcbnew_Editor_Hokeys_Descr, text = AddHotkeyName( _( "&Track" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ADD_NEW_TRACK, IS_ACCELERATOR ); HK_ADD_NEW_TRACK, IS_ACCELERATOR );
AddMenuItem( placeMenu, ID_TRACK_BUTT, text, AddMenuItem( placeMenu, ID_TRACK_BUTT, text,
_( "Add tracks and vias" ), KiBitmap( add_tracks_xpm ) ); _( "Add tracks and vias" ), KiBitmap( add_tracks_xpm ) );
// Zone // Zone
AddMenuItem( placeMenu, ID_PCB_ZONES_BUTT, AddMenuItem( placeMenu, ID_PCB_ZONES_BUTT,
_( "Zone" ), _( "Add filled zones" ), KiBitmap( add_zone_xpm ) ); _( "&Zone" ), _( "Add filled zones" ), KiBitmap( add_zone_xpm ) );
// Text // Text
AddMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT, AddMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT,
_( "Text" ), _( "Add text on copper layers or graphic text" ), _( "Te&xt" ), _( "Add text on copper layers or graphic text" ),
KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) );
// Graphic Arc // Graphic Arc
AddMenuItem( placeMenu, ID_PCB_ARC_BUTT, AddMenuItem( placeMenu, ID_PCB_ARC_BUTT,
_( "Arc" ), _( "Add graphic arc" ),KiBitmap( add_arc_xpm ) ); _( "&Arc" ), _( "Add graphic arc" ),KiBitmap( add_arc_xpm ) );
// Graphic Circle // Graphic Circle
AddMenuItem( placeMenu, ID_PCB_CIRCLE_BUTT, AddMenuItem( placeMenu, ID_PCB_CIRCLE_BUTT,
_( "Circle" ), _( "Add graphic circle" ), _( "&Circle" ), _( "Add graphic circle" ),
KiBitmap( add_circle_xpm ) ); KiBitmap( add_circle_xpm ) );
// Line or Polygon // Line or Polygon
AddMenuItem( placeMenu, ID_PCB_ADD_LINE_BUTT, AddMenuItem( placeMenu, ID_PCB_ADD_LINE_BUTT,
_( "Line or Polygon" ), _( "&Line or Polygon" ),
_( "Add graphic line or polygon" ), _( "Add graphic line or polygon" ),
KiBitmap( add_dashed_line_xpm ) ); KiBitmap( add_dashed_line_xpm ) );
@ -378,42 +398,42 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Dimension // Dimension
AddMenuItem( placeMenu, ID_PCB_DIMENSION_BUTT, AddMenuItem( placeMenu, ID_PCB_DIMENSION_BUTT,
_( "Dimension" ), _( "Add dimension" ), _( "&Dimension" ), _( "Add dimension" ),
KiBitmap( add_dimension_xpm ) ); KiBitmap( add_dimension_xpm ) );
// Layer alignment target // Layer alignment target
AddMenuItem( placeMenu, ID_PCB_MIRE_BUTT, AddMenuItem( placeMenu, ID_PCB_MIRE_BUTT,
_( "Layer alignment target" ), _( "Add layer alignment target" ), _( "La&yer alignment target" ), _( "Add layer alignment target" ),
KiBitmap( add_mires_xpm ) ); KiBitmap( add_mires_xpm ) );
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
// Drill & Place Offset // Drill & Place Offset
AddMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT, AddMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT,
_( "Drill and Place Offset" ), _( "Drill and Place O&ffset" ),
_( "Place the origin point for drill and place files" ), _( "Place the origin point for drill and place files" ),
KiBitmap( pcb_offset_xpm ) ); KiBitmap( pcb_offset_xpm ) );
// Grid Origin // Grid Origin
AddMenuItem( placeMenu, ID_PCB_PLACE_GRID_COORD_BUTT, AddMenuItem( placeMenu, ID_PCB_PLACE_GRID_COORD_BUTT,
_( "Grid Origin" ), _( "&Grid Origin" ),
_( "Set the origin point for the grid" ), _( "Set the origin point for the grid" ),
KiBitmap( grid_select_axis_xpm ) ); KiBitmap( grid_select_axis_xpm ) );
/* Create Preferences and configuration menu */ /* Create Preferences and configuration menu */
wxMenu* configmenu = new wxMenu; wxMenu* configmenu = new wxMenu;
// Library // Library
AddMenuItem( configmenu, ID_CONFIG_REQ, AddMenuItem( configmenu, ID_CONFIG_REQ,
_( "&Library" ), _( "Setting libraries, directories and others..." ), _( "Li&brary" ), _( "Setting libraries, directories and others..." ),
KiBitmap( library_xpm ) ); KiBitmap( library_xpm ) );
// Colors and Visibility are also handled by the layers manager toolbar // Colors and Visibility are also handled by the layers manager toolbar
AddMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, AddMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
m_show_layer_manager_tools ? m_show_layer_manager_tools ?
_( "Hide &Layers Manager" ) : _("Show &Layers Manager" ), _( "Hide La&yers Manager" ) : _("Show La&yers Manager" ),
HELP_SHOW_HIDE_LAYERMANAGER, HELP_SHOW_HIDE_LAYERMANAGER,
KiBitmap( layers_manager_xpm ) ); KiBitmap( layers_manager_xpm ) );
// General // General
#ifdef __WXMAC__ #ifdef __WXMAC__
@ -421,7 +441,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
#else #else
AddMenuItem( configmenu, wxID_PREFERENCES, AddMenuItem( configmenu, wxID_PREFERENCES,
_( "&General" ), _( "Select general options for Pcbnew" ), _( "&General" ), _( "Select general options for Pcbnew" ),
KiBitmap( preference_xpm ) ); KiBitmap( preference_xpm ) );
#endif #endif
// Display // Display
@ -435,23 +455,23 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Grid // Grid
AddMenuItem( dimensionsMenu, ID_PCB_USER_GRID_SETUP, AddMenuItem( dimensionsMenu, ID_PCB_USER_GRID_SETUP,
_( "Grid" ),_( "Adjust user grid dimensions" ), _( "G&rid" ),_( "Adjust user grid dimensions" ),
KiBitmap( grid_xpm ) ); KiBitmap( grid_xpm ) );
// Text and Drawings // Text and Drawings
AddMenuItem( dimensionsMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP, AddMenuItem( dimensionsMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
_( "Texts and Drawings" ), _( "Te&xts and Drawings" ),
_( "Adjust dimensions for texts and drawings" ), _( "Adjust dimensions for texts and drawings" ),
KiBitmap( options_text_xpm ) ); KiBitmap( options_text_xpm ) );
// Pads // Pads
AddMenuItem( dimensionsMenu, ID_PCB_PAD_SETUP, AddMenuItem( dimensionsMenu, ID_PCB_PAD_SETUP,
_( "Pads" ), _( "Adjust default pad characteristics" ), _( "&Pads" ), _( "Adjust default pad characteristics" ),
KiBitmap( pad_xpm ) ); KiBitmap( pad_xpm ) );
// Pads Mask Clearance // Pads Mask Clearance
AddMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE, AddMenuItem( 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" ),
KiBitmap( pads_mask_layers_xpm ) ); KiBitmap( pads_mask_layers_xpm ) );
@ -478,18 +498,18 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
wxMenu* macrosMenu = new wxMenu; wxMenu* macrosMenu = new wxMenu;
AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_SAVE, AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_SAVE,
_( "Save macros" ), _( "&Save macros" ),
_( "Save macros to file" ), _( "Save macros to file" ),
KiBitmap( save_setup_xpm ) ); KiBitmap( save_setup_xpm ) );
AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_READ, AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_READ,
_( "Read macros" ), _( "&Read macros" ),
_( "Read macros from file" ), _( "Read macros from file" ),
KiBitmap( read_setup_xpm ) ); KiBitmap( read_setup_xpm ) );
// Append macros menu to config menu // Append macros menu to config menu
AddMenuItem( configmenu, macrosMenu, AddMenuItem( configmenu, macrosMenu,
-1, _( "Macros" ), -1, _( "Ma&cros" ),
_( "Macros save/read operations" ), _( "Macros save/read operations" ),
KiBitmap( macros_record_xpm ) ); KiBitmap( macros_record_xpm ) );
@ -514,23 +534,23 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
/* Netlist */ /* Netlist */
AddMenuItem( toolsMenu, ID_GET_NETLIST, AddMenuItem( toolsMenu, ID_GET_NETLIST,
_( "Netlist" ), _( "&Netlist" ),
_( "Read the netlist and update board connectivity" ), _( "Read the netlist and update board connectivity" ),
KiBitmap( netlist_xpm ) ); KiBitmap( netlist_xpm ) );
/* Layer pair */ /* Layer pair */
AddMenuItem( toolsMenu, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, AddMenuItem( toolsMenu, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR,
_( "Layer Pair" ), _( "Change the active layer pair" ), _( "&Layer Pair" ), _( "Change the active layer pair" ),
KiBitmap( select_layer_pair_xpm ) ); KiBitmap( select_layer_pair_xpm ) );
/* DRC */ /* DRC */
AddMenuItem( toolsMenu, ID_DRC_CONTROL, AddMenuItem( toolsMenu, ID_DRC_CONTROL,
_( "DRC" ), _( "&DRC" ),
_( "Perform design rules check" ), KiBitmap( erc_xpm ) ); _( "Perform design rules check" ), KiBitmap( erc_xpm ) );
/* FreeRoute */ /* FreeRoute */
AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_FREEROUTE_ACCESS, AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_FREEROUTE_ACCESS,
_( "FreeRoute" ), _( "&FreeRoute" ),
_( "Fast access to the Web Based FreeROUTE advanced router" ), _( "Fast access to the Web Based FreeROUTE advanced router" ),
KiBitmap( web_support_xpm ) ); KiBitmap( web_support_xpm ) );
@ -540,8 +560,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Design Rules // Design Rules
AddMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, AddMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
_( "Design Rules" ), _( "Design Rules" ),
_( "Open the design rules editor" ), KiBitmap( hammer_xpm ) ); _( "Open the design rules editor" ), KiBitmap( hammer_xpm ) );
// Layers Setup // Layers Setup
AddMenuItem( configmenu, ID_PCB_LAYERS_SETUP, AddMenuItem( configmenu, ID_PCB_LAYERS_SETUP,
@ -560,6 +580,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
_( "&Contents" ), _( "&Contents" ),
_( "Open the Pcbnew handbook" ), _( "Open the Pcbnew handbook" ),
KiBitmap( online_help_xpm ) ); KiBitmap( online_help_xpm ) );
AddMenuItem( helpMenu, wxID_INDEX, AddMenuItem( helpMenu, wxID_INDEX,
_( "&Getting Started in KiCad" ), _( "&Getting Started in KiCad" ),
_( "Open the \"Getting Started in KiCad\" guide for beginners" ), _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
@ -579,7 +600,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( editMenu, _( "&Edit" ) );
menuBar->Append( viewMenu, _( "&View" ) ); menuBar->Append( viewMenu, _( "&View" ) );
menuBar->Append( placeMenu, _( "&Place" ) ); menuBar->Append( placeMenu, _( "&Place" ) );
menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( configmenu, _( "P&references" ) );
menuBar->Append( toolsMenu, _( "&Tools" ) ); menuBar->Append( toolsMenu, _( "&Tools" ) );
menuBar->Append( designRulesMenu, _( "&Design Rules" ) ); menuBar->Append( designRulesMenu, _( "&Design Rules" ) );
menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Append( helpMenu, _( "&Help" ) );