Commit 5a0aca0e authored by jerryjacobs's avatar jerryjacobs
Browse files

More Mac OS X work, see CHANGELOG.txt

parent e3894962
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -5,6 +5,17 @@ Please add newer entries at the top, list the date and your name with
email address.


2010-Jan-17 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com>
================================================================================
More work to make kicad more Mac OS X compliant.
* Workaround for wxAboutDialog bug.
* WXMAC needs wxID_EXIT to make closing the application function properly.
* Workaround for hotkeys, on Mac OS X we can't use Fx keys.
  This needs to be further implemented and is a work in progress.
  We need to modify the hotkey code to display Mac OS X the
  special modifier keys in the hotkey list.


2010-Jan-18 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++any
+7 −1
Original line number Diff line number Diff line
@@ -3,10 +3,16 @@ KiCad TODO List

CMAKE
-----

* Add install targets for binaries and resources on Mac.
* Add Python.

WXMAC Platform
--------------
* Fix hotkey list to match CMD key
* Fix AddHotkeyName to let wxWidgets handle Ctrl to CMD key
* Fix About dialog crash, or trash wxAboutDialog and create our own
  About dialog to match all platforms. (wxAboutDialog different on platforms)
* Fix toolbar button tooltips.

Common
------
+1 −1
Original line number Diff line number Diff line
@@ -799,7 +799,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
    // Under linux, to be tested (could be depend on linux versions
    // so perhaps could be necessary to set this option at run time.

#if 0
#if defined( __WXMAC__ )

    // Use a pixel based draw to display grid
    // There is a lot of calls, so the cost is hight
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
              WinEDA_CvpcbFrame::LoadNetList )
    EVT_MENU( ID_SAVE_PROJECT,
              WinEDA_CvpcbFrame::SaveQuitCvpcb )
    EVT_MENU( ID_CVPCB_QUIT,
    EVT_MENU( wxID_EXIT,
              WinEDA_CvpcbFrame::OnQuit )
    EVT_MENU( ID_GENERAL_HELP,
              WinEDA_CvpcbFrame::GetKicadHelp )
+21 −13
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) );
 * http://wiki.wxwidgets.org/WxMac-specific_topics
 */
void WinEDA_App::MacOpenFile(const wxString &fileName) {
    wxFileName    fn = fileName;
    wxFileName    filename = fileName;
    wxString      oldPath;
    WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow());

@@ -46,16 +46,16 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
    /* Update the library search path list. */
    if( wxGetApp().GetLibraryPathList().Index( oldPath ) != wxNOT_FOUND )
        wxGetApp().GetLibraryPathList().Remove( oldPath );
    wxGetApp().GetLibraryPathList().Insert( fn.GetPath(), 0 );
    wxGetApp().GetLibraryPathList().Insert( filename.GetPath(), 0 );

    frame->m_NetlistFileName = fn;
    frame->m_NetlistFileName = filename;

    if( frame->ReadNetList() )
    {
        frame->SetLastProject( fn.GetFullPath() );
        frame->SetLastProject( filename.GetFullPath() );

        frame->SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() +
                  wxT( " " ) + fn.GetFullPath() );
                  wxT( " " ) + filename.GetFullPath() );
    }
    else
    {
@@ -75,8 +75,16 @@ IMPLEMENT_APP( WinEDA_App )

bool WinEDA_App::OnInit()
{
    wxFileName         fn;
    wxString           msg;
     /* 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;
    WinEDA_CvpcbFrame* frame   = NULL;

    InitEDA_Appl( wxT( "CvPCB" ), APP_TYPE_CVPCB );
@@ -89,8 +97,8 @@ bool WinEDA_App::OnInit()

    if( argc > 1 )
    {
        fn = argv[1];
        wxSetWorkingDirectory( fn.GetPath() );
        filename = argv[1];
        wxSetWorkingDirectory( filename.GetPath() );
    }

    // read current setup and reopen last directory if no filename to open in command line
@@ -105,17 +113,17 @@ bool WinEDA_App::OnInit()
    // Show the frame
    SetTopWindow( frame );

    frame->LoadProjectFile( fn.GetFullPath() );
    frame->LoadProjectFile( filename.GetFullPath() );
    frame->Show( TRUE );
    frame->BuildFOOTPRINTS_LISTBOX();

    if( fn.IsOk() && fn.FileExists() )
    if( filename.IsOk() && filename.FileExists() )
    {
        frame->m_NetlistFileName = fn;
        frame->m_NetlistFileName = filename;

        if( frame->ReadNetList() )
        {
            frame->m_NetlistFileExtension = fn.GetExt();
            frame->m_NetlistFileExtension = filename.GetExt();
            return true;
        }
    }
Loading