Loading CHANGELOG.txt +7 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,13 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. 2011-Apr-6, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com> ================================================================================ Cleanup of all the menubar code to have the same style, remove the C comments. Make the wxMenu behave native on OSX for KiCad, CvPCB and Gerbview and remove unneeded ifdefs when using the wxIDs. Add a OnQuit for the gerber frame. Change item->SetBitmap( item ) to use macro SET_BITMAP for menu items. 2011-Apr-4, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com> ================================================================================ More native OSX changes, this removes some WXMAC defines replaced by wxID Loading common/hotkeys_basic.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -673,3 +673,4 @@ void AddHotkeyConfigMenu( wxMenu* aMenu ) ID_PREFERENCES_HOTKEY_SUBMENU, _( "Hotkeys" ), _( "Hotkeys configuration and preferences" ), hotkeys_xpm ); } cvpcb/cvframe.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME ) CVPCB_MAINFRAME::OnQuit ) EVT_MENU( ID_GENERAL_HELP, CVPCB_MAINFRAME::GetKicadHelp ) EVT_MENU( ID_KICAD_ABOUT, EVT_MENU( wxID_ABOUT, CVPCB_MAINFRAME::GetKicadAbout ) EVT_MENU( ID_CONFIG_REQ, EVT_MENU( wxID_PREFERENCES, CVPCB_MAINFRAME::ConfigCvpcb ) EVT_MENU( ID_CONFIG_SAVE, CVPCB_MAINFRAME::Update_Config ) Loading cvpcb/cvpcb.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -83,14 +83,6 @@ IMPLEMENT_APP( WinEDA_App ) 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; wxString message; CVPCB_MAINFRAME* frame = NULL; Loading cvpcb/menubar.cpp +63 −43 Original line number Diff line number Diff line /* * menubar.cpp * Build the CvPCB MenuBar /** * @file cvpcb/menubar.cpp * @brief (Re)Create the menubar for cvpcb */ #include "fctsys.h" #include "appl_wxstruct.h" Loading @@ -14,9 +14,12 @@ #include "bitmaps.h" /** * @brief (Re)Create the menubar for the cvpcb mainframe */ void CVPCB_MAINFRAME::ReCreateMenuBar() { // Create and try to get the current menubar wxMenuItem* item; wxMenuBar* menuBar = GetMenuBar(); Loading @@ -31,53 +34,72 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Recreate all menus: // Menu File: wxMenu* filesMenu = new wxMenu; ADD_MENUITEM_WITH_HELP( filesMenu, ID_LOAD_PROJECT, _( "&Open" ), _( "Open a net list file" ), // Open ADD_MENUITEM_WITH_HELP( filesMenu, ID_LOAD_PROJECT, _( "&Open" ), _( "Open a net list file" ), open_document_xpm ); /* Open Recent submenu */ // Open Recent submenu wxMenu* openRecentMenu = new wxMenu(); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, -1, _( "Open &Recent" ), ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, -1, _( "Open &Recent" ), _("Open a recent opened netlist document" ), open_project_xpm ); // Separator filesMenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( filesMenu, ID_SAVE_PROJECT, // Save as ADD_MENUITEM_WITH_HELP( filesMenu, ID_SAVE_PROJECT, _( "&Save As..." ), _( "Save new net list and footprint list files" ), save_xpm ); /* Quit on all platforms except WXMAC */ #if !defined(__WXMAC__) // Separator filesMenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit CvPCB" ), exit_xpm ); #endif /* !defined( __WXMAC__) */ // Quit ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit CvPCB" ), exit_xpm ); // Menu Configuration: wxMenu* configmenu = new wxMenu; ADD_MENUITEM_WITH_HELP( configmenu, ID_CONFIG_REQ, _( "&Configuration" ), // Menu Preferences: wxMenu* preferencesMenu = new wxMenu; // Options (Preferences on WXMAC) ADD_MENUITEM_WITH_HELP( preferencesMenu, wxID_PREFERENCES, #ifdef __WXMAC__ _( "&Preferences..." ), #else _( "&Options" ), #endif // __WXMAC__ _( "Set libraries and library search paths" ), config_xpm ); wxGetApp().AddMenuLanguageList( configmenu ); // Language submenu wxGetApp().AddMenuLanguageList( preferencesMenu ); item = new wxMenuItem( configmenu, ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, // Keep open on save item = new wxMenuItem( preferencesMenu, ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, _( "Keep Open On Save" ), _( "Prevent CVPcb from exiting after saving netlist file" ), wxITEM_CHECK ); configmenu->Append( item ); preferencesMenu->Append( item ); SETBITMAPS( window_close_xpm ); configmenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( configmenu, ID_CONFIG_SAVE, // Separator preferencesMenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( preferencesMenu, ID_CONFIG_SAVE, _( "&Save Project File" ), _( "Save changes to the project file" ), save_setup_xpm ); Loading @@ -85,25 +107,23 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Menu Help: wxMenu* helpMenu = new wxMenu; // Version info AddHelpVersionInfoMenuEntry( helpMenu ); // Contents ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ), _( "Open the cvpcb manual" ), online_help_xpm ); /* About on all platforms except WXMAC */ #if !defined(__WXMAC__) ADD_MENUITEM_WITH_HELP( helpMenu, ID_KICAD_ABOUT, _( "&About" ), _( "About cvpcb schematic to pcb converter" ), // About ADD_MENUITEM_WITH_HELP( helpMenu, wxID_ABOUT, _( "&About CvPCB" ), _( "About CvPCB schematic to pcb converter" ), info_xpm ); #endif /* !defined(__WXMAC__) */ // Create the menubar and append all submenus menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( preferencesMenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Thaw(); Loading Loading
CHANGELOG.txt +7 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,13 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. 2011-Apr-6, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com> ================================================================================ Cleanup of all the menubar code to have the same style, remove the C comments. Make the wxMenu behave native on OSX for KiCad, CvPCB and Gerbview and remove unneeded ifdefs when using the wxIDs. Add a OnQuit for the gerber frame. Change item->SetBitmap( item ) to use macro SET_BITMAP for menu items. 2011-Apr-4, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com> ================================================================================ More native OSX changes, this removes some WXMAC defines replaced by wxID Loading
common/hotkeys_basic.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -673,3 +673,4 @@ void AddHotkeyConfigMenu( wxMenu* aMenu ) ID_PREFERENCES_HOTKEY_SUBMENU, _( "Hotkeys" ), _( "Hotkeys configuration and preferences" ), hotkeys_xpm ); }
cvpcb/cvframe.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME ) CVPCB_MAINFRAME::OnQuit ) EVT_MENU( ID_GENERAL_HELP, CVPCB_MAINFRAME::GetKicadHelp ) EVT_MENU( ID_KICAD_ABOUT, EVT_MENU( wxID_ABOUT, CVPCB_MAINFRAME::GetKicadAbout ) EVT_MENU( ID_CONFIG_REQ, EVT_MENU( wxID_PREFERENCES, CVPCB_MAINFRAME::ConfigCvpcb ) EVT_MENU( ID_CONFIG_SAVE, CVPCB_MAINFRAME::Update_Config ) Loading
cvpcb/cvpcb.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -83,14 +83,6 @@ IMPLEMENT_APP( WinEDA_App ) 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; wxString message; CVPCB_MAINFRAME* frame = NULL; Loading
cvpcb/menubar.cpp +63 −43 Original line number Diff line number Diff line /* * menubar.cpp * Build the CvPCB MenuBar /** * @file cvpcb/menubar.cpp * @brief (Re)Create the menubar for cvpcb */ #include "fctsys.h" #include "appl_wxstruct.h" Loading @@ -14,9 +14,12 @@ #include "bitmaps.h" /** * @brief (Re)Create the menubar for the cvpcb mainframe */ void CVPCB_MAINFRAME::ReCreateMenuBar() { // Create and try to get the current menubar wxMenuItem* item; wxMenuBar* menuBar = GetMenuBar(); Loading @@ -31,53 +34,72 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Recreate all menus: // Menu File: wxMenu* filesMenu = new wxMenu; ADD_MENUITEM_WITH_HELP( filesMenu, ID_LOAD_PROJECT, _( "&Open" ), _( "Open a net list file" ), // Open ADD_MENUITEM_WITH_HELP( filesMenu, ID_LOAD_PROJECT, _( "&Open" ), _( "Open a net list file" ), open_document_xpm ); /* Open Recent submenu */ // Open Recent submenu wxMenu* openRecentMenu = new wxMenu(); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, -1, _( "Open &Recent" ), ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, -1, _( "Open &Recent" ), _("Open a recent opened netlist document" ), open_project_xpm ); // Separator filesMenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( filesMenu, ID_SAVE_PROJECT, // Save as ADD_MENUITEM_WITH_HELP( filesMenu, ID_SAVE_PROJECT, _( "&Save As..." ), _( "Save new net list and footprint list files" ), save_xpm ); /* Quit on all platforms except WXMAC */ #if !defined(__WXMAC__) // Separator filesMenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit CvPCB" ), exit_xpm ); #endif /* !defined( __WXMAC__) */ // Quit ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit CvPCB" ), exit_xpm ); // Menu Configuration: wxMenu* configmenu = new wxMenu; ADD_MENUITEM_WITH_HELP( configmenu, ID_CONFIG_REQ, _( "&Configuration" ), // Menu Preferences: wxMenu* preferencesMenu = new wxMenu; // Options (Preferences on WXMAC) ADD_MENUITEM_WITH_HELP( preferencesMenu, wxID_PREFERENCES, #ifdef __WXMAC__ _( "&Preferences..." ), #else _( "&Options" ), #endif // __WXMAC__ _( "Set libraries and library search paths" ), config_xpm ); wxGetApp().AddMenuLanguageList( configmenu ); // Language submenu wxGetApp().AddMenuLanguageList( preferencesMenu ); item = new wxMenuItem( configmenu, ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, // Keep open on save item = new wxMenuItem( preferencesMenu, ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, _( "Keep Open On Save" ), _( "Prevent CVPcb from exiting after saving netlist file" ), wxITEM_CHECK ); configmenu->Append( item ); preferencesMenu->Append( item ); SETBITMAPS( window_close_xpm ); configmenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( configmenu, ID_CONFIG_SAVE, // Separator preferencesMenu->AppendSeparator(); ADD_MENUITEM_WITH_HELP( preferencesMenu, ID_CONFIG_SAVE, _( "&Save Project File" ), _( "Save changes to the project file" ), save_setup_xpm ); Loading @@ -85,25 +107,23 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Menu Help: wxMenu* helpMenu = new wxMenu; // Version info AddHelpVersionInfoMenuEntry( helpMenu ); // Contents ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ), _( "Open the cvpcb manual" ), online_help_xpm ); /* About on all platforms except WXMAC */ #if !defined(__WXMAC__) ADD_MENUITEM_WITH_HELP( helpMenu, ID_KICAD_ABOUT, _( "&About" ), _( "About cvpcb schematic to pcb converter" ), // About ADD_MENUITEM_WITH_HELP( helpMenu, wxID_ABOUT, _( "&About CvPCB" ), _( "About CvPCB schematic to pcb converter" ), info_xpm ); #endif /* !defined(__WXMAC__) */ // Create the menubar and append all submenus menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( preferencesMenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Thaw(); Loading