Commit ea990230 authored by Felix Morgner's avatar Felix Morgner Committed by Dick Hollenbeck
Browse files

Fixes implementation of MacOpenFile( const wxString& ) in KiCad.

Adds "kicad_pcb" to the list of file-extensions for PCBnew in its Info.plist 
to make Launch Services recognize the file associations.

Change 8 bit string to UTF8 so fancy mew in "um" can be shown. 
parents 91674347 625e8b06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
    // Save as the .cmp file
    AddMenuItem( filesMenu,
                 wxID_SAVEAS,
                 _( "Save &As..." ), SAVE_AS_HLP_MSG, KiBitmap( save_xpm ) );
                 _( "Save &As...\tCtrl+Shift+S" ), SAVE_AS_HLP_MSG, KiBitmap( save_xpm ) );

    // Separator
    filesMenu->AppendSeparator();
+2 −2
Original line number Diff line number Diff line
@@ -166,8 +166,8 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName )
    }
    else
    {
        wxFileDialog dlg( this, _( "Save Component Footprint Link File" ), wxGetCwd(),
                          wxEmptyString, ComponentFileWildcard, wxFD_SAVE );
        wxFileDialog dlg( this, _( "Save Component Footprint Link File" ), wxEmptyString,
                          _( "Unnamed file" ), ComponentFileWildcard, wxFD_SAVE );

        if( dlg.ShowModal() == wxID_CANCEL )
            return -1;
+8 −12
Original line number Diff line number Diff line
@@ -56,20 +56,16 @@ void EDA_APP::MacOpenFile( const wxString &fileName )

    frame->m_ProjectFileName = fn;

    if( m_fileHistory.GetCount() )
    {
        frame->m_ProjectFileName = m_fileHistory.GetHistoryFile( 0 );

        if( !frame->m_ProjectFileName.FileExists() )
    if( !frame->m_ProjectFileName.FileExists() && m_fileHistory.GetCount() )
    {
        m_fileHistory.RemoveFileFromHistory( 0 );
        return;
    }
        else
        {
            wxCommandEvent cmd( 0, wxID_FILE1 );
            frame->OnFileHistory( cmd );
        }
    }

    wxCommandEvent loadEvent;
    loadEvent.SetId( wxID_ANY );

    frame->OnLoadProject( loadEvent );

    wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() +
                     wxT( " " ) + frame->m_ProjectFileName.GetFullPath();
+1 −1
Original line number Diff line number Diff line
@@ -869,7 +869,7 @@ void C_MICROSTRIP::show_results()
    setResult( 4, atten_dielectric_e, "dB" );
    setResult( 5, atten_dielectric_o, "dB" );

    setResult( 6, skindepth / UNIT_MICRON, "m" );
    setResult( 6, skindepth / UNIT_MICRON, "µm" );
}


+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ void COPLANAR::show_results()
    setResult( 1, atten_cond, "dB" );
    setResult( 2, atten_dielectric, "dB" );

    setResult( 3, skindepth / UNIT_MICRON, "m" );
    setResult( 3, skindepth / UNIT_MICRON, "µm" );
}


Loading