Commit fb475361 authored by Jerry Jacobs's avatar Jerry Jacobs

More native changes for OSX, see CHANGELOG.txt

parent f3a923d4
...@@ -4,6 +4,19 @@ KiCad ChangeLog 2010 ...@@ -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:
......
...@@ -36,7 +36,9 @@ At time of writing (2009-01-16) this is on line 18381 ...@@ -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:
......
...@@ -189,12 +189,8 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, ...@@ -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, ...@@ -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;
} }
} }
......
...@@ -24,7 +24,6 @@ ...@@ -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 ) ...@@ -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() ...@@ -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
......
This diff is collapsed.
...@@ -74,7 +74,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) ...@@ -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 ) ...@@ -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 )
......
...@@ -71,7 +71,7 @@ enum main_id ...@@ -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,
......
...@@ -75,15 +75,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) { ...@@ -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 );
......
...@@ -42,7 +42,7 @@ EVT_MENU( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles ) ...@@ -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() ...@@ -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() ...@@ -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() ...@@ -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() ...@@ -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 );
......
This diff is collapsed.
...@@ -111,7 +111,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) ...@@ -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 ) ...@@ -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 )
......
...@@ -92,14 +92,6 @@ void WinEDA_App::MacOpenFile( const wxString& fileName ) ...@@ -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;
......
...@@ -26,7 +26,6 @@ ...@@ -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 ) ...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment