More native changes for OSX, see CHANGELOG.txt

This commit is contained in:
Jerry Jacobs 2011-04-04 20:05:55 +02:00
parent f3a923d478
commit fb47536123
13 changed files with 178 additions and 201 deletions

View File

@ -4,6 +4,19 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2011-Apr-4, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com>
================================================================================
More native OSX changes, this removes some WXMAC defines replaced by wxID
macros. These are handled by wxWidgets itself and reduces in-app platform
defines. More work needs to be done for CvPCB and Gerbview.
All:
Hotkey names in menu's all have tabs, this looks more uniform and pretty.
EESschema & PCBNew:
Fix about and preferences wxMenu to be more native (remove unneeded WXMAC )
Disable all icons in wxMenu on OSX with macro SETBITMAPS
2011-Mar-16, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2011-Mar-16, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
Gerbview: Gerbview:

View File

@ -36,7 +36,9 @@ At time of writing (2009-01-16) this is on line 18381
into this: OSX_UNIV_OPTS="-arch ppc -arch i386 -arch x86_64" into this: OSX_UNIV_OPTS="-arch ppc -arch i386 -arch x86_64"
Building a universal monolib wxWidgets 2.9 with the following parameters: Building a universal monolib wxWidgets 2.9 with the following parameters:
./configure --enable-unicode=yes --enable-shared=no --enable-monolithic --with-opengl --with-expat=builtin --enable-universal_binary --enable-aui --enable-debug --with-osx_cocoa --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk/ --prefix=/opt/wxwidgets-svn ./configure --enable-unicode=yes --enable-shared=no --enable-monolithic --with-opengl --with-expat=builtin --enable-universal_binary --enable-aui --enable-debug --with-osx_cocoa --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk/ --prefix=/opt/wxwidgets/<rev>
<rev> Should be subsituded with the revision from SVN
Then you should a message like this: Then you should a message like this:

View File

@ -189,12 +189,8 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
keyname = ReturnKeyNameFromCommandId( aList, aCommandId ); keyname = ReturnKeyNameFromCommandId( aList, aCommandId );
if( !keyname.IsEmpty() ) if( !keyname.IsEmpty() )
{
if( aIsShortCut )
msg << wxT( "\t" ) << keyname; msg << wxT( "\t" ) << keyname;
else
msg << wxT( " <" ) << keyname << wxT( ">" );
}
return msg; return msg;
} }
@ -223,12 +219,10 @@ wxString AddHotkeyName( const wxString& aText,
{ {
List = aDescList->m_HK_InfoList; List = aDescList->m_HK_InfoList;
keyname = ReturnKeyNameFromCommandId( List, aCommandId ); keyname = ReturnKeyNameFromCommandId( List, aCommandId );
if( !keyname.IsEmpty() ) if( !keyname.IsEmpty() )
{ {
if( aIsShortCut ) msg << wxT( "\t" ) << keyname;
msg << wxT( "\t" ) << keyname;
else
msg << wxT( " <" ) << keyname << wxT( ">" );
break; break;
} }
} }

View File

@ -24,7 +24,6 @@
// Global variables // Global variables
bool g_OptNetListUseNames; /* TRUE to use names rather than net bool g_OptNetListUseNames; /* TRUE to use names rather than net
* The numbers (PSPICE netlist only) */ * The numbers (PSPICE netlist only) */
wxSize g_RepeatStep; wxSize g_RepeatStep;
@ -113,13 +112,6 @@ void WinEDA_App::MacOpenFile( const wxString &fileName )
bool WinEDA_App::OnInit() bool WinEDA_App::OnInit()
{ {
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp::s_macPreferencesMenuItemId = ID_OPTIONS_SETUP;
#endif /* __WXMAC__ */
wxFileName filename; wxFileName filename;
SCH_EDIT_FRAME* frame = NULL; SCH_EDIT_FRAME* frame = NULL;
@ -134,7 +126,7 @@ bool WinEDA_App::OnInit()
if( argc > 1 ) if( argc > 1 )
filename = argv[1]; filename = argv[1];
/* init EESCHEMA */ // Init EESchema
SeedLayers(); SeedLayers();
// read current setup and reopen last directory if no filename to open in // read current setup and reopen last directory if no filename to open in

View File

@ -16,6 +16,7 @@
#include "protos.h" #include "protos.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "macros.h"
#include "help_common_strings.h" #include "help_common_strings.h"
@ -46,13 +47,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( filesMenu, ID_NEW_PROJECT, _( "&New\tCtrl+N" ), item = new wxMenuItem( filesMenu, ID_NEW_PROJECT, _( "&New\tCtrl+N" ),
_( "New schematic project" ) ); _( "New schematic project" ) );
item->SetBitmap( new_xpm ); SETBITMAPS( new_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Open // Open
item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ), item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ),
_( "Open an existing schematic project" ) ); _( "Open an existing schematic project" ) );
item->SetBitmap( open_document_xpm ); SETBITMAPS( open_document_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Open Recent submenu // Open Recent submenu
@ -69,26 +70,26 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, item = new wxMenuItem( filesMenu, 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" ) );
item->SetBitmap( save_project_xpm ); SETBITMAPS( save_project_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET, _( "Save &Current Sheet Only" ), item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET, _( "Save &Current Sheet Only" ),
_( "Save only current schematic sheet" ) ); _( "Save only current schematic sheet" ) );
item->SetBitmap( save_xpm ); SETBITMAPS( save_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Save as... // Save as...
item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET_AS, item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET_AS,
_( "Save Current Sheet &as" ), _( "Save Current Sheet &as" ),
_( "Save current schematic sheet as..." ) ); _( "Save current schematic sheet as..." ) );
item->SetBitmap( save_as_xpm ); SETBITMAPS( save_as_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Print // Print
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, wxID_PRINT, _( "P&rint" ), _( "Print schematic" ) ); item = new wxMenuItem( filesMenu, wxID_PRINT, _( "P&rint" ), _( "Print schematic" ) );
item->SetBitmap( print_button ); SETBITMAPS( print_button );
filesMenu->Append( item ); filesMenu->Append( item );
// Plot submenu // Plot submenu
@ -96,25 +97,25 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS, item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS,
_( "Plot PostScript" ), _( "Plot PostScript" ),
_( "Plot schematic sheet in PostScript format" ) ); _( "Plot schematic sheet in PostScript format" ) );
item->SetBitmap( plot_PS_xpm ); SETBITMAPS( plot_PS_xpm );
choice_plot_fmt->Append( item ); choice_plot_fmt->Append( item );
/* Plot HPGL */ /* Plot HPGL */
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_HPGL, _( "Plot HPGL" ), item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_HPGL, _( "Plot HPGL" ),
_( "Plot schematic sheet in HPGL format" ) ); _( "Plot schematic sheet in HPGL format" ) );
item->SetBitmap( plot_HPG_xpm ); SETBITMAPS( plot_HPG_xpm );
choice_plot_fmt->Append( item ); choice_plot_fmt->Append( item );
// Plot SVG // Plot SVG
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_SVG, _( "Plot SVG" ), item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_SVG, _( "Plot SVG" ),
_( "Plot schematic sheet in SVG format" ) ); _( "Plot schematic sheet in SVG format" ) );
item->SetBitmap( plot_xpm ); SETBITMAPS( plot_xpm );
choice_plot_fmt->Append( item ); choice_plot_fmt->Append( item );
// Plot DXF // Plot DXF
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_DXF, _( "Plot DXF" ), item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_DXF, _( "Plot DXF" ),
_( "Plot schematic sheet in DXF format" ) ); _( "Plot schematic sheet in DXF format" ) );
item->SetBitmap( plot_xpm ); SETBITMAPS( plot_xpm );
choice_plot_fmt->Append( item ); choice_plot_fmt->Append( item );
// Under windows, one can draw to the clipboard // Under windows, one can draw to the clipboard
@ -123,7 +124,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD, item = new wxMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD,
_( "Plot to Clipboard" ), _( "Plot to Clipboard" ),
_( "Export drawings to clipboard" ) ); _( "Export drawings to clipboard" ) );
item->SetBitmap( copy_button ); SETBITMAPS( copy_button );
choice_plot_fmt->Append( item ); choice_plot_fmt->Append( item );
#endif #endif
@ -133,14 +134,11 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
plot_xpm ); plot_xpm );
// Quit on all platforms except WXMAC // Quit on all platforms except WXMAC
#if !defined(__WXMAC__)
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit EESchema" ) );
item->SetBitmap( exit_xpm );
filesMenu->Append( item );
#endif // !defined( __WXMAC__) item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit EESchema" ) );
SETBITMAPS( exit_xpm );
filesMenu->Append( item );
// Edit menu // Edit menu
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
@ -149,21 +147,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO ); text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO );
item = new wxMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, wxITEM_NORMAL ); item = new wxMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, wxITEM_NORMAL );
item->SetBitmap( undo_xpm ); SETBITMAPS( undo_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Redo */ /* Redo */
text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO ); text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO );
item = new wxMenuItem( editMenu, wxID_REDO, text, HELP_REDO, wxITEM_NORMAL ); item = new wxMenuItem( editMenu, wxID_REDO, text, HELP_REDO, wxITEM_NORMAL );
item->SetBitmap( redo_xpm ); SETBITMAPS( redo_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Delete */ /* Delete */
editMenu->AppendSeparator(); editMenu->AppendSeparator();
item = new wxMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT, item = new wxMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT,
_( "Delete" ), HELP_DELETE_ITEMS, wxITEM_NORMAL ); _( "Delete" ), HELP_DELETE_ITEMS, wxITEM_NORMAL );
item->SetBitmap( delete_body_xpm ); SETBITMAPS( delete_body_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Separator */ /* Separator */
@ -172,7 +170,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Find */ /* Find */
text = AddHotkeyName( _( "&Find" ), s_Schematic_Hokeys_Descr, HK_FIND_ITEM ); text = AddHotkeyName( _( "&Find" ), s_Schematic_Hokeys_Descr, HK_FIND_ITEM );
item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND, wxITEM_NORMAL ); item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND, wxITEM_NORMAL );
item->SetBitmap( find_xpm ); SETBITMAPS( find_xpm );
editMenu->Append( item ); editMenu->Append( item );
/* Separator */ /* Separator */
@ -182,7 +180,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( editMenu, ID_BACKANNO_ITEMS, _( "Backannotate" ), item = new wxMenuItem( editMenu, ID_BACKANNO_ITEMS, _( "Backannotate" ),
_( "Back annotated footprint fields" ), _( "Back annotated footprint fields" ),
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( backanno_xpm ); SETBITMAPS( backanno_xpm );
editMenu->Append( item ); editMenu->Append( item );
@ -206,20 +204,20 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr,
ID_ZOOM_IN, false ); // add comment, not a shortcut ID_ZOOM_IN, false ); // add comment, not a shortcut
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, wxITEM_NORMAL ); item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, wxITEM_NORMAL );
item->SetBitmap( zoom_in_xpm ); SETBITMAPS( zoom_in_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Zoom out */ /* Zoom out */
text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr,
ID_ZOOM_OUT, false ); // add comment, not a shortcut ID_ZOOM_OUT, false ); // add comment, not a shortcut
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, wxITEM_NORMAL ); item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, wxITEM_NORMAL );
item->SetBitmap( zoom_out_xpm ); SETBITMAPS( zoom_out_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* 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 );
item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, wxITEM_NORMAL ); item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, wxITEM_NORMAL );
item->SetBitmap( zoom_fit_in_page_xpm ); SETBITMAPS( zoom_fit_in_page_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
@ -227,7 +225,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Redraw view */ /* Redraw view */
text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW ); text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW );
item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, wxITEM_NORMAL ); item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, wxITEM_NORMAL );
item->SetBitmap( zoom_redraw_xpm ); SETBITMAPS( zoom_redraw_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
@ -242,7 +240,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_NEW_COMPONENT, false ); // add comment, not a shortcut HK_ADD_NEW_COMPONENT, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, item = new wxMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text,
HELP_PLACE_COMPONENTS, wxITEM_NORMAL ); HELP_PLACE_COMPONENTS, wxITEM_NORMAL );
item->SetBitmap( add_component_xpm ); SETBITMAPS( add_component_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Power port */ /* Power port */
@ -250,7 +248,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_NEW_POWER, false ); // add comment, not a shortcut HK_ADD_NEW_POWER, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, item = new wxMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text,
HELP_PLACE_POWERPORT, wxITEM_NORMAL ); HELP_PLACE_POWERPORT, wxITEM_NORMAL );
item->SetBitmap( add_power_xpm ); SETBITMAPS( add_power_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Wire */ /* Wire */
@ -258,7 +256,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_BEGIN_WIRE, false ); // add comment, not a shortcut HK_BEGIN_WIRE, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_WIRE_BUTT, text, item = new wxMenuItem( placeMenu, ID_WIRE_BUTT, text,
HELP_PLACE_WIRE, wxITEM_NORMAL ); HELP_PLACE_WIRE, wxITEM_NORMAL );
item->SetBitmap( add_line_xpm ); SETBITMAPS( add_line_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Bus */ /* Bus */
@ -266,7 +264,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_BEGIN_BUS, false ); // add comment, not a shortcut HK_BEGIN_BUS, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_BUS_BUTT, text, item = new wxMenuItem( placeMenu, ID_BUS_BUTT, text,
HELP_PLACE_BUS, wxITEM_NORMAL ); HELP_PLACE_BUS, wxITEM_NORMAL );
item->SetBitmap( add_bus_xpm ); SETBITMAPS( add_bus_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Wire to Bus entry */ /* Wire to Bus entry */
@ -274,7 +272,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, item = new wxMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text,
HELP_PLACE_WIRE2BUS_ENTRY, wxITEM_NORMAL ); HELP_PLACE_WIRE2BUS_ENTRY, wxITEM_NORMAL );
item->SetBitmap( add_line2bus_xpm ); SETBITMAPS( add_line2bus_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Bus to Bus entry */ /* Bus to Bus entry */
@ -282,14 +280,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, item = new wxMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text,
HELP_PLACE_BUS2BUS_ENTRY, wxITEM_NORMAL ); HELP_PLACE_BUS2BUS_ENTRY, wxITEM_NORMAL );
item->SetBitmap( add_bus2bus_xpm ); SETBITMAPS( add_bus2bus_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* 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, false ); // add comment, not a shortcut HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, wxITEM_NORMAL ); item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, wxITEM_NORMAL );
item->SetBitmap( noconn_button ); SETBITMAPS( noconn_button );
placeMenu->Append( item ); placeMenu->Append( item );
/* Net name */ /* Net name */
@ -297,7 +295,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_LABEL, false ); // add comment, not a shortcut HK_ADD_LABEL, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_LABEL_BUTT, text, item = new wxMenuItem( placeMenu, ID_LABEL_BUTT, text,
HELP_PLACE_NETLABEL, wxITEM_NORMAL ); HELP_PLACE_NETLABEL, wxITEM_NORMAL );
item->SetBitmap( add_line_label_xpm ); SETBITMAPS( add_line_label_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Global label */ /* Global label */
@ -305,7 +303,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_GLABEL, false ); // add comment, not a shortcut HK_ADD_GLABEL, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_GLABEL_BUTT, text, item = new wxMenuItem( placeMenu, ID_GLABEL_BUTT, text,
HELP_PLACE_GLOBALLABEL, wxITEM_NORMAL ); HELP_PLACE_GLOBALLABEL, wxITEM_NORMAL );
item->SetBitmap( add_glabel_xpm ); SETBITMAPS( add_glabel_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Junction */ /* Junction */
@ -313,7 +311,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_JUNCTION, false ); // add comment, not a shortcut HK_ADD_JUNCTION, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_JUNCTION_BUTT, text, item = new wxMenuItem( placeMenu, ID_JUNCTION_BUTT, text,
HELP_PLACE_JUNCTION, wxITEM_NORMAL ); HELP_PLACE_JUNCTION, wxITEM_NORMAL );
item->SetBitmap( add_junction_xpm ); SETBITMAPS( add_junction_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Separator */ /* Separator */
@ -324,7 +322,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_HIERLABEL_BUTT, text, item = new wxMenuItem( placeMenu, ID_HIERLABEL_BUTT, text,
HELP_PLACE_HIER_LABEL, wxITEM_NORMAL ); HELP_PLACE_HIER_LABEL, wxITEM_NORMAL );
item->SetBitmap( add_hierarchical_label_xpm ); SETBITMAPS( add_hierarchical_label_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Hierarchical sheet */ /* Hierarchical sheet */
@ -332,19 +330,19 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, item = new wxMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text,
HELP_PLACE_SHEET, wxITEM_NORMAL ); HELP_PLACE_SHEET, wxITEM_NORMAL );
item->SetBitmap( add_hierarchical_subsheet_xpm ); SETBITMAPS( add_hierarchical_subsheet_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Import hierarchical sheet */ /* Import hierarchical sheet */
item = new wxMenuItem( placeMenu, ID_IMPORT_HLABEL_BUTT, _( "Import Hierarchical Label" ), item = new wxMenuItem( placeMenu, ID_IMPORT_HLABEL_BUTT, _( "Import Hierarchical Label" ),
HELP_IMPORT_SHEETPIN, wxITEM_NORMAL ); HELP_IMPORT_SHEETPIN, wxITEM_NORMAL );
item->SetBitmap( import_hierarchical_label_xpm ); SETBITMAPS( import_hierarchical_label_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Add hierarchical Pin to Sheet */ /* Add hierarchical Pin to Sheet */
item = new wxMenuItem( placeMenu, ID_SHEET_PIN_BUTT, _( "Add Hierarchical Pin to Sheet" ), item = new wxMenuItem( placeMenu, ID_SHEET_PIN_BUTT, _( "Add Hierarchical Pin to Sheet" ),
HELP_PLACE_SHEETPIN, wxITEM_NORMAL ); HELP_PLACE_SHEETPIN, wxITEM_NORMAL );
item->SetBitmap( add_hierar_pin_xpm ); SETBITMAPS( add_hierar_pin_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Separator */ /* Separator */
@ -355,7 +353,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, item = new wxMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICLINES, wxITEM_NORMAL ); HELP_PLACE_GRAPHICLINES, wxITEM_NORMAL );
item->SetBitmap( add_dashed_line_xpm ); SETBITMAPS( add_dashed_line_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Graphic text */ /* Graphic text */
@ -363,7 +361,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, item = new wxMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICTEXTS, wxITEM_NORMAL ); HELP_PLACE_GRAPHICTEXTS, wxITEM_NORMAL );
item->SetBitmap( add_text_xpm ); SETBITMAPS( add_text_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
@ -373,19 +371,26 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Library */ /* Library */
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ), item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ),
_( "Library preferences" ) ); _( "Library preferences" ) );
item->SetBitmap( library_xpm ); SETBITMAPS( library_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Colors */ /* Colors */
item = new wxMenuItem( configmenu, ID_COLORS_SETUP, _( "&Colors" ), item = new wxMenuItem( configmenu, ID_COLORS_SETUP, _( "&Colors" ),
_( "Color preferences" ) ); _( "Color preferences" ) );
item->SetBitmap( palette_xpm ); SETBITMAPS( palette_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Options */ /* Options */
item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP, _( "&Options" ), item = new wxMenuItem( configmenu, wxID_PREFERENCES,
_( "Eeschema general options and preferences" ) );
item->SetBitmap( preference_xpm ); #ifdef __WXMAC__
_( "&Preferences..." ),
#else
_( "&Options" ),
#endif
_( "EESchema preferences" ) );
SETBITMAPS( preference_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Language submenu */ /* Language submenu */
@ -400,13 +405,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Save preferences */ /* Save preferences */
item = new wxMenuItem( configmenu, ID_CONFIG_SAVE, _( "&Save preferences" ), item = new wxMenuItem( configmenu, ID_CONFIG_SAVE, _( "&Save preferences" ),
_( "Save application preferences" ) ); _( "Save application preferences" ) );
item->SetBitmap( save_setup_xpm ); SETBITMAPS( save_setup_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Read preferences */ /* Read preferences */
item = new wxMenuItem( configmenu, ID_CONFIG_READ, _( "&Read preferences" ), item = new wxMenuItem( configmenu, ID_CONFIG_READ, _( "&Read preferences" ),
_( "Read application preferences" ) ); _( "Read application preferences" ) );
item->SetBitmap( read_setup_xpm ); SETBITMAPS( read_setup_xpm );
configmenu->Append( item ); configmenu->Append( item );
@ -417,20 +422,15 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ), item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the eeschema manual" ) ); _( "Open the eeschema manual" ) );
item->SetBitmap( online_help_xpm ); SETBITMAPS( online_help_xpm );
helpMenu->Append( item ); helpMenu->Append( item );
/* About on all platforms except WXMAC */ /* About on all platforms except WXMAC */
#if !defined(__WXMAC__) item = new wxMenuItem( helpMenu, wxID_ABOUT, _( "&About" ),
item = new wxMenuItem( helpMenu, ID_KICAD_ABOUT, _( "&About" ),
_( "About eeschema schematic designer" ) ); _( "About eeschema schematic designer" ) );
item->SetBitmap( info_xpm ); SETBITMAPS( info_xpm );
helpMenu->Append( item ); helpMenu->Append( item );
#endif /* !defined(__WXMAC__) */
// Create the menubar and append all submenus // Create the menubar and append all submenus
menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( filesMenu, _( "&File" ) );
menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( editMenu, _( "&Edit" ) );

View File

@ -74,7 +74,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
SCH_EDIT_FRAME::Process_Config ) SCH_EDIT_FRAME::Process_Config )
EVT_MENU( ID_COLORS_SETUP, SCH_EDIT_FRAME::OnColorConfig ) EVT_MENU( ID_COLORS_SETUP, SCH_EDIT_FRAME::OnColorConfig )
EVT_TOOL( ID_OPTIONS_SETUP, SCH_EDIT_FRAME::OnSetOptions ) EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnSetOptions )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, SCH_EDIT_FRAME::SetLanguage ) EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, SCH_EDIT_FRAME::SetLanguage )
@ -100,7 +100,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL( ID_BACKANNO_ITEMS, SCH_EDIT_FRAME::OnLoadStuffFile ) EVT_TOOL( ID_BACKANNO_ITEMS, SCH_EDIT_FRAME::OnLoadStuffFile )
EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_KICAD_ABOUT, EDA_DRAW_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
// Tools and buttons for vertical toolbar. // Tools and buttons for vertical toolbar.
EVT_TOOL( ID_CANCEL_CURRENT_COMMAND, SCH_EDIT_FRAME::OnCancelCurrentCommand ) EVT_TOOL( ID_CANCEL_CURRENT_COMMAND, SCH_EDIT_FRAME::OnCancelCurrentCommand )

View File

@ -71,7 +71,7 @@ enum main_id
ID_GENERAL_HELP, ID_GENERAL_HELP,
ID_HELP_COPY_VERSION_STRING, ID_HELP_COPY_VERSION_STRING,
ID_LOCAL_HELP, ID_LOCAL_HELP,
ID_KICAD_ABOUT, ID_KICAD_ABOUT, // @todo all handle by wxID_ABOUT
ID_EDIT, ID_EDIT,
ID_NO_TOOL_SELECTED, ID_NO_TOOL_SELECTED,

View File

@ -75,15 +75,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
bool WinEDA_App::OnInit() bool WinEDA_App::OnInit()
/*****************************************************************************/ /*****************************************************************************/
{ {
/* WXMAC application specific */
/* TODO fix about dialog issue */
/* TODO fix SetExitOnFrameDelete */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp::s_macPreferencesMenuItemId = ID_OPTIONS_SETUP;
#endif /* __WXMAC__ */
WinEDA_MainFrame* frame; WinEDA_MainFrame* frame;
InitEDA_Appl( wxT( "KiCad" ), APP_TYPE_KICAD ); InitEDA_Appl( wxT( "KiCad" ), APP_TYPE_KICAD );

View File

@ -42,7 +42,7 @@ EVT_MENU( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
EVT_MENU( ID_READ_ZIP_ARCHIVE, WinEDA_MainFrame::OnUnarchiveFiles ) EVT_MENU( ID_READ_ZIP_ARCHIVE, WinEDA_MainFrame::OnUnarchiveFiles )
EVT_MENU( ID_PROJECT_TREE_REFRESH, WinEDA_MainFrame::OnRefresh ) EVT_MENU( ID_PROJECT_TREE_REFRESH, WinEDA_MainFrame::OnRefresh )
EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp ) EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp )
EVT_MENU( ID_KICAD_ABOUT, WinEDA_MainFrame::GetKicadAbout ) EVT_MENU( wxID_ABOUT, WinEDA_MainFrame::GetKicadAbout )
/* Range menu events */ /* Range menu events */
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
@ -122,17 +122,13 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_( "Unarchive project files from zip file" ), _( "Unarchive project files from zip file" ),
unzip_xpm ); unzip_xpm );
/* Quit on all platforms except WXMAC */ // Quit
#if !defined( __WXMAC__ )
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ), ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ),
_( "Quit KiCad" ), _( "Quit KiCad" ),
exit_xpm ); exit_xpm );
#endif /* !defined( __WXMAC__ ) */
// Browse menu // Browse menu
wxMenu* browseMenu = new wxMenu(); wxMenu* browseMenu = new wxMenu();
@ -142,7 +138,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_( "Launch preferred text editor" ), _( "Launch preferred text editor" ),
editor_xpm ); editor_xpm );
/* Browse files */ // View file
ADD_MENUITEM_WITH_HELP( browseMenu, ID_BROWSE_AN_SELECT_FILE, ADD_MENUITEM_WITH_HELP( browseMenu, ID_BROWSE_AN_SELECT_FILE,
_( "&View File" ), _( "&View File" ),
_( "View, read or edit file with a text editor" ), _( "View, read or edit file with a text editor" ),
@ -168,23 +164,20 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_( "Use system default PDF viewer used to browse datasheets" ), _( "Use system default PDF viewer used to browse datasheets" ),
wxITEM_CHECK ); wxITEM_CHECK );
#if !defined( __WXMAC__ )
SETBITMAPS( datasheet_xpm ); SETBITMAPS( datasheet_xpm );
#endif /* !defined( __WXMAC__ ) */
SubMenuPdfBrowserChoice->Append( item ); SubMenuPdfBrowserChoice->Append( item );
SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER, SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER,
wxGetApp().m_PdfBrowserIsDefault ); wxGetApp().m_PdfBrowserIsDefault );
// Favourite viewer // 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 );
#if !defined( __WXMAC__ )
SETBITMAPS( preference_xpm ); SETBITMAPS( preference_xpm );
#endif /* !defined( __WXMAC__ ) */
SubMenuPdfBrowserChoice->Append( item ); SubMenuPdfBrowserChoice->Append( item );
SubMenuPdfBrowserChoice->AppendSeparator(); SubMenuPdfBrowserChoice->AppendSeparator();
@ -213,14 +206,14 @@ void WinEDA_MainFrame::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu ); AddHelpVersionInfoMenuEntry( helpMenu );
/* Contents */ // Contents
ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ), ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the kicad manual" ), _( "Open the kicad manual" ),
online_help_xpm ); online_help_xpm );
// About // About
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( helpMenu, ID_KICAD_ABOUT, _( "&About" ), ADD_MENUITEM_WITH_HELP( helpMenu, wxID_ABOUT, _( "&About" ),
_( "About kicad project manager" ), _( "About kicad project manager" ),
info_xpm ); info_xpm );

View File

@ -11,6 +11,7 @@
#include "protos.h" #include "protos.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "pcbnew_id.h" #include "pcbnew_id.h"
#include "macros.h"
#include "help_common_strings.h" #include "help_common_strings.h"
@ -41,14 +42,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( 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_document_xpm ); SETBITMAPS( open_document_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Load Recent submenu // Load Recent submenu
@ -64,7 +65,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( import_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Separator // Separator
@ -74,14 +75,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( 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 ); SETBITMAPS( save_as_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
@ -89,13 +90,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( 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 ); SETBITMAPS( hammer_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
@ -105,77 +106,81 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE, item = new wxMenuItem( 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" ) );
item->SetBitmap( post_compo_xpm ); SETBITMAPS( post_compo_xpm );
fabricationOutputsMenu->Append( item ); fabricationOutputsMenu->Append( item );
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE, item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE,
_( "&Drill File" ), _( "&Drill File" ),
_( "Generate excellon2 drill file" ) ); _( "Generate excellon2 drill file" ) );
item->SetBitmap( post_drill_xpm ); SETBITMAPS( 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 (*.cmp) for CvPcb" ) ); _( "(Re)create components file (*.cmp) for CvPcb" ) );
item->SetBitmap( create_cmp_file_xpm ); SETBITMAPS( create_cmp_file_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" ) );
item->SetBitmap( tools_xpm ); SETBITMAPS( tools_xpm );
fabricationOutputsMenu->Append( item ); fabricationOutputsMenu->Append( item );
/* Fabrications Outputs submenu append */ // Fabrications Outputs submenu append
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, fabricationOutputsMenu, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, fabricationOutputsMenu,
-1, _( "Fabrication Outputs" ), -1, _( "Fabrication Outputs" ),
_( "Generate files for fabrication" ), _( "Generate files for fabrication" ),
fabrication_xpm ); fabrication_xpm );
/* 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 SETBITMAPS( import_xpm ); // @todo need better bitmap
submenuImport->Append( item ); 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 ); SETBITMAPS( 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 ); SETBITMAPS( 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 ); SETBITMAPS( 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" ) );
item->SetBitmap( show_3d_xpm ); SETBITMAPS( show_3d_xpm );
submenuexport->Append( item ); submenuexport->Append( item );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuexport, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuexport,
@ -188,21 +193,21 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( print_button );
filesMenu->Append( item ); filesMenu->Append( item );
// Create SVG file // 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 ); SETBITMAPS( 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 ); SETBITMAPS( plot_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
@ -212,14 +217,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES, item = new wxMenuItem( 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)" ) );
item->SetBitmap( library_update_xpm ); SETBITMAPS( 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)" ) );
item->SetBitmap( library_xpm ); SETBITMAPS( library_xpm );
submenuarchive->Append( item ); submenuarchive->Append( item );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuarchive, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuarchive,
@ -229,15 +234,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
library_xpm ); library_xpm );
/* Quit */ /* Quit */
#if !defined( __WXMAC__ )
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit PCBNew" ) ); item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit PCBNew" ) );
item->SetBitmap( exit_xpm ); SETBITMAPS( exit_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
#endif /* !defined( __WXMAC__ ) */
/** Create Edit menu **/ /** Create Edit menu **/
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
@ -245,21 +246,21 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
text = AddHotkeyName( _( "Undo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_UNDO ); text = AddHotkeyName( _( "Undo" ), g_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 ); SETBITMAPS( undo_xpm );
editMenu->Append( item ); editMenu->Append( item );
// Redo // Redo
text = AddHotkeyName( _( "Redo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_REDO ); text = AddHotkeyName( _( "Redo" ), g_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 ); SETBITMAPS( 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 ); SETBITMAPS( delete_body_xpm );
editMenu->Append( item ); editMenu->Append( item );
editMenu->AppendSeparator(); editMenu->AppendSeparator();
@ -267,7 +268,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
text = AddHotkeyName( _( "&Find" ), g_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM ); text = AddHotkeyName( _( "&Find" ), g_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 ); SETBITMAPS( find_xpm );
editMenu->Append( item ); editMenu->Append( item );
editMenu->AppendSeparator(); editMenu->AppendSeparator();
@ -275,21 +276,21 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( 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 ); SETBITMAPS( 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" ) );
item->SetBitmap( swap_layer_xpm ); SETBITMAPS( swap_layer_xpm );
editMenu->Append( item ); editMenu->Append( item );
// Reset module reference sizes // Reset module reference sizes
@ -297,7 +298,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES, ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES,
_( "Reset Module &Reference Sizes" ), _( "Reset Module &Reference Sizes" ),
_( "Reset text size and width of all module references to current defaults" ) ); _( "Reset text size and width of all module references to current defaults" ) );
item->SetBitmap( reset_text_xpm ); SETBITMAPS( reset_text_xpm );
editMenu->Append( item ); editMenu->Append( item );
// Reset module value sizes // Reset module value sizes
@ -305,7 +306,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES, ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES,
_( "Reset Module &Value Sizes" ), _( "Reset Module &Value Sizes" ),
_( "Reset text size and width of all module values to current defaults" ) ); _( "Reset text size and width of all module values to current defaults" ) );
item->SetBitmap( reset_text_xpm ); SETBITMAPS( reset_text_xpm );
editMenu->Append( item ); editMenu->Append( item );
/** Create View menu **/ /** Create View menu **/
@ -327,7 +328,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
HK_ZOOM_IN, false ); HK_ZOOM_IN, false );
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text,
HELP_ZOOM_IN, wxITEM_NORMAL ); HELP_ZOOM_IN, wxITEM_NORMAL );
item->SetBitmap( zoom_in_xpm ); SETBITMAPS( zoom_in_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
// Zoom Out // Zoom Out
@ -336,7 +337,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text,
HELP_ZOOM_OUT, wxITEM_NORMAL ); HELP_ZOOM_OUT, wxITEM_NORMAL );
item->SetBitmap( zoom_out_xpm ); SETBITMAPS( zoom_out_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
// Fit on Screen // Fit on Screen
@ -345,7 +346,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text,
HELP_ZOOM_FIT, wxITEM_NORMAL ); HELP_ZOOM_FIT, wxITEM_NORMAL );
item->SetBitmap( zoom_fit_in_page_xpm ); SETBITMAPS( zoom_fit_in_page_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
@ -357,7 +358,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text,
HELP_ZOOM_REDRAW, HELP_ZOOM_REDRAW,
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_redraw_xpm ); SETBITMAPS( zoom_redraw_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
@ -365,14 +366,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( 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" ) );
item->SetBitmap( tools_xpm ); SETBITMAPS( tools_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
@ -385,7 +386,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text, item = new wxMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text,
_( "Add modules" ), wxITEM_NORMAL ); _( "Add modules" ), wxITEM_NORMAL );
item->SetBitmap( module_xpm ); SETBITMAPS( module_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
// Track // Track
@ -394,42 +395,42 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( placeMenu, ID_TRACK_BUTT, text, item = new wxMenuItem( placeMenu, ID_TRACK_BUTT, text,
_( "Add tracks and vias" ), wxITEM_NORMAL ); _( "Add tracks and vias" ), wxITEM_NORMAL );
item->SetBitmap( add_tracks_xpm ); SETBITMAPS( 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" )); _( "Add filled zones" ));
item->SetBitmap( add_zone_xpm ); SETBITMAPS( 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" ) ); _( "Add text on copper layers or graphic text" ) );
item->SetBitmap( add_text_xpm ); SETBITMAPS( add_text_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
// Graphic Arc // Graphic Arc
item = new wxMenuItem( placeMenu, ID_PCB_ARC_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_ARC_BUTT,
_( "Arc" ), _( "Arc" ),
_( "Add graphic arc" ) ); _( "Add graphic arc" ) );
item->SetBitmap( add_arc_xpm ); SETBITMAPS( add_arc_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
// Graphic Circle // Graphic Circle
item = new wxMenuItem( placeMenu, ID_PCB_CIRCLE_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_CIRCLE_BUTT,
_( "Circle" ), _( "Circle" ),
_( "Add graphic circle" )); _( "Add graphic circle" ));
item->SetBitmap( add_circle_xpm ); SETBITMAPS( add_circle_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
// Line or Polygon // Line or Polygon
item = new wxMenuItem( placeMenu, 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" )); _( "Add graphic line or polygon" ));
item->SetBitmap( add_dashed_line_xpm ); SETBITMAPS( add_dashed_line_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
@ -437,14 +438,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( placeMenu, ID_PCB_DIMENSION_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_DIMENSION_BUTT,
_( "Dimension" ), _( "Dimension" ),
_( "Add dimension" ) ); _( "Add dimension" ) );
item->SetBitmap( add_dimension_xpm ); SETBITMAPS( add_dimension_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
// Layer alignment target // 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" )); _( "Add layer alignment target" ));
item->SetBitmap( add_mires_xpm ); SETBITMAPS( add_mires_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
@ -452,14 +453,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT, item = new wxMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT,
_( "Drill and Place Offset" ), _( "Drill and Place Offset" ),
_( "Place the origin point for drill and place files" )); _( "Place the origin point for drill and place files" ));
item->SetBitmap( pcb_offset_xpm ); SETBITMAPS( 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" ),
_( "Set the origin point for the grid" )); _( "Set the origin point for the grid" ));
item->SetBitmap( grid_select_axis_xpm ); SETBITMAPS( grid_select_axis_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
@ -471,7 +472,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( library_xpm );
configmenu->Append( item ); configmenu->Append( item );
// Colors and Visibility are also handled by the layers manager toolbar // Colors and Visibility are also handled by the layers manager toolbar
@ -479,52 +480,58 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
m_show_layer_manager_tools ? m_show_layer_manager_tools ?
_( "Hide &Layers Manager" ) : _("Show &Layers Manager" ), _( "Hide &Layers Manager" ) : _("Show &Layers Manager" ),
HELP_SHOW_HIDE_LAYERMANAGER ); HELP_SHOW_HIDE_LAYERMANAGER );
item->SetBitmap( layers_manager_xpm ); SETBITMAPS( layers_manager_xpm );
configmenu->Append( item ); configmenu->Append( item );
// General // General
item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP, item = new wxMenuItem( configmenu, wxID_PREFERENCES,
#ifdef __WXMAC__
_( "&Preferences..." ),
#else
_( "&General" ), _( "&General" ),
#endif
_( "Select general options for PCBnew" ) ); _( "Select general options for PCBnew" ) );
item->SetBitmap( preference_xpm );
SETBITMAPS( 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 ); SETBITMAPS( display_options_xpm );
configmenu->Append( item ); configmenu->Append( item );
/* Create 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 ); SETBITMAPS( 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 ); SETBITMAPS( 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 ); SETBITMAPS( 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" ) );
item->SetBitmap( pads_mask_layers_xpm ); SETBITMAPS( pads_mask_layers_xpm );
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
@ -533,10 +540,10 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item = new wxMenuItem( dimensionsMenu, ID_CONFIG_SAVE, item = new wxMenuItem( dimensionsMenu, ID_CONFIG_SAVE,
_( "&Save" ), _( "&Save" ),
_( "Save dimension preferences" ) ); _( "Save dimension preferences" ) );
item->SetBitmap( save_xpm ); SETBITMAPS( save_xpm );
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
/* append dimension menu to config menu */ // Append dimension menu to config menu
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( configmenu, dimensionsMenu, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( configmenu, dimensionsMenu,
-1, _( "Di&mensions" ), -1, _( "Di&mensions" ),
_( "Global dimensions preferences" ), _( "Global dimensions preferences" ),
@ -553,35 +560,34 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
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 ); SETBITMAPS( 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" ) );
item->SetBitmap( read_setup_xpm ); SETBITMAPS( read_setup_xpm );
configmenu->Append( item ); configmenu->Append( item );
/** /**
* Design Rules menu * Design Rules menu
*/ */
wxMenu* designRulesMenu = new wxMenu; wxMenu* designRulesMenu = new wxMenu;
/* Design Rules */ // Design Rules
item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
_( "Design Rules" ), _( "Design Rules" ),
_( "Open the design rules editor" ) ); _( "Open the design rules editor" ) );
item->SetBitmap( hammer_xpm ); SETBITMAPS( hammer_xpm );
designRulesMenu->Append( item ); designRulesMenu->Append( item );
/* Layers Setup */ // Layers Setup
item = new wxMenuItem( configmenu, ID_PCB_LAYERS_SETUP, item = new wxMenuItem( configmenu, ID_PCB_LAYERS_SETUP,
_( "&Layers Setup" ), _( "&Layers Setup" ),
_( "Enable and set layer properties" ) ); _( "Enable and set layer properties" ) );
item->SetBitmap( copper_layers_setup_xpm ); SETBITMAPS( copper_layers_setup_xpm );
designRulesMenu->Append( item ); designRulesMenu->Append( item );
@ -592,25 +598,20 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu ); AddHelpVersionInfoMenuEntry( helpMenu );
/* Contents */ // Contents
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, item = new wxMenuItem( helpMenu, ID_GENERAL_HELP,
_( "&Contents" ), _( "&Contents" ),
_( "Open the on line PCBnew documentation" ) ); _( "Open the on line PCBnew documentation" ) );
item->SetBitmap( online_help_xpm ); SETBITMAPS( online_help_xpm );
helpMenu->Append( item ); helpMenu->Append( item );
/* About */ // About
#if !defined(__WXMAC__) item = new wxMenuItem( helpMenu, wxID_ABOUT,
item = new wxMenuItem( helpMenu, ID_KICAD_ABOUT,
_( "&About" ), _( "&About" ),
_( "About PCBnew printed circuit board designer" ) ); _( "About PCBnew printed circuit board designer" ));
item->SetBitmap( info_xpm ); SETBITMAPS( info_xpm );
helpMenu->Append( item ); helpMenu->Append( item );
#endif /* !defined(__WXMAC__) */
/** /**
* Append all menus to the menuBar * Append all menus to the menuBar

View File

@ -111,7 +111,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END,
PCB_EDIT_FRAME::Process_Config ) PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_OPTIONS_SETUP, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( wxID_PREFERENCES, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_PCB_LAYERS_SETUP, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_PCB_LAYERS_SETUP, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_PCB_MASK_CLEARANCE, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_PCB_MASK_CLEARANCE, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_PCB_PAD_SETUP, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_PCB_PAD_SETUP, PCB_EDIT_FRAME::Process_Config )
@ -140,7 +140,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
// Menu Help // Menu Help
EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_KICAD_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Menu 3D Frame // Menu 3D Frame
EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, PCB_EDIT_FRAME::Show3D_Frame ) EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, PCB_EDIT_FRAME::Show3D_Frame )

View File

@ -92,14 +92,6 @@ void WinEDA_App::MacOpenFile( const wxString& fileName )
bool WinEDA_App::OnInit() bool WinEDA_App::OnInit()
{ {
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp::s_macPreferencesMenuItemId = ID_OPTIONS_SETUP;
#endif /* __WXMAC__ */
wxFileName fn; wxFileName fn;
PCB_EDIT_FRAME* frame = NULL; PCB_EDIT_FRAME* frame = NULL;

View File

@ -26,7 +26,6 @@
#define HOTKEY_FILENAME wxT( "pcbnew" ) #define HOTKEY_FILENAME wxT( "pcbnew" )
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{ {
int id = event.GetId(); int id = event.GetId();
@ -59,7 +58,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
} }
break; break;
case ID_OPTIONS_SETUP: case wxID_PREFERENCES:
{ {
Dialog_GeneralOptions dlg( this ); Dialog_GeneralOptions dlg( this );
dlg.ShowModal(); dlg.ShowModal();