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