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
Please add newer entries at the top, list the date and your name with
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>
================================================================================
Gerbview:
......
......@@ -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"
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:
......
......@@ -189,12 +189,8 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
keyname = ReturnKeyNameFromCommandId( aList, aCommandId );
if( !keyname.IsEmpty() )
{
if( aIsShortCut )
msg << wxT( "\t" ) << keyname;
else
msg << wxT( " <" ) << keyname << wxT( ">" );
}
return msg;
}
......@@ -223,12 +219,10 @@ wxString AddHotkeyName( const wxString& aText,
{
List = aDescList->m_HK_InfoList;
keyname = ReturnKeyNameFromCommandId( List, aCommandId );
if( !keyname.IsEmpty() )
{
if( aIsShortCut )
msg << wxT( "\t" ) << keyname;
else
msg << wxT( " <" ) << keyname << wxT( ">" );
msg << wxT( "\t" ) << keyname;
break;
}
}
......
......@@ -24,7 +24,6 @@
// Global variables
bool g_OptNetListUseNames; /* TRUE to use names rather than net
* The numbers (PSPICE netlist only) */
wxSize g_RepeatStep;
......@@ -113,13 +112,6 @@ void WinEDA_App::MacOpenFile( const wxString &fileName )
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;
SCH_EDIT_FRAME* frame = NULL;
......@@ -134,7 +126,7 @@ bool WinEDA_App::OnInit()
if( argc > 1 )
filename = argv[1];
/* init EESCHEMA */
// Init EESchema
SeedLayers();
// 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 )
SCH_EDIT_FRAME::Process_Config )
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 )
......@@ -100,7 +100,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL( ID_BACKANNO_ITEMS, SCH_EDIT_FRAME::OnLoadStuffFile )
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.
EVT_TOOL( ID_CANCEL_CURRENT_COMMAND, SCH_EDIT_FRAME::OnCancelCurrentCommand )
......
......@@ -71,7 +71,7 @@ enum main_id
ID_GENERAL_HELP,
ID_HELP_COPY_VERSION_STRING,
ID_LOCAL_HELP,
ID_KICAD_ABOUT,
ID_KICAD_ABOUT, // @todo all handle by wxID_ABOUT
ID_EDIT,
ID_NO_TOOL_SELECTED,
......
......@@ -75,15 +75,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
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;
InitEDA_Appl( wxT( "KiCad" ), APP_TYPE_KICAD );
......
......@@ -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_PROJECT_TREE_REFRESH, WinEDA_MainFrame::OnRefresh )
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 */
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
......@@ -122,17 +122,13 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_( "Unarchive project files from zip file" ),
unzip_xpm );
/* Quit on all platforms except WXMAC */
#if !defined( __WXMAC__ )
// Quit
filesMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( filesMenu, wxID_EXIT, _( "&Quit" ),
_( "Quit KiCad" ),
exit_xpm );
#endif /* !defined( __WXMAC__ ) */
// Browse menu
wxMenu* browseMenu = new wxMenu();
......@@ -142,7 +138,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_( "Launch preferred text editor" ),
editor_xpm );
/* Browse files */
// View file
ADD_MENUITEM_WITH_HELP( browseMenu, ID_BROWSE_AN_SELECT_FILE,
_( "&View File" ),
_( "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" ),
wxITEM_CHECK );
#if !defined( __WXMAC__ )
SETBITMAPS( datasheet_xpm );
#endif /* !defined( __WXMAC__ ) */
SubMenuPdfBrowserChoice->Append( item );
SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER,
wxGetApp().m_PdfBrowserIsDefault );
// Favourite viewer
// Favourite
item = new wxMenuItem( SubMenuPdfBrowserChoice,
ID_SELECT_PREFERED_PDF_BROWSER,
_( "Favourite" ),
_( "Use your favourite PDF viewer used to browse datasheets" ),
wxITEM_CHECK );
#if !defined( __WXMAC__ )
SETBITMAPS( preference_xpm );
#endif /* !defined( __WXMAC__ ) */
SubMenuPdfBrowserChoice->Append( item );
SubMenuPdfBrowserChoice->AppendSeparator();
......@@ -213,14 +206,14 @@ void WinEDA_MainFrame::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu );
/* Contents */
// Contents
ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the kicad manual" ),
online_help_xpm );
// About
helpMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP( helpMenu, ID_KICAD_ABOUT, _( "&About" ),
ADD_MENUITEM_WITH_HELP( helpMenu, wxID_ABOUT, _( "&About" ),
_( "About kicad project manager" ),
info_xpm );
......
This diff is collapsed.
......@@ -111,7 +111,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END,
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_MASK_CLEARANCE, 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
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
EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, PCB_EDIT_FRAME::Show3D_Frame )
......
......@@ -92,14 +92,6 @@ void WinEDA_App::MacOpenFile( const wxString& fileName )
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;
PCB_EDIT_FRAME* frame = NULL;
......
......@@ -26,7 +26,6 @@
#define HOTKEY_FILENAME wxT( "pcbnew" )
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{
int id = event.GetId();
......@@ -59,7 +58,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
}
break;
case ID_OPTIONS_SETUP:
case wxID_PREFERENCES:
{
Dialog_GeneralOptions dlg( this );
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