diff --git a/common/confirm.cpp b/common/confirm.cpp index d14109ce42..7aeb85f451 100644 --- a/common/confirm.cpp +++ b/common/confirm.cpp @@ -112,7 +112,7 @@ void DisplayHtmlInfoMessage( wxWindow* parent, const wxString& title, bool IsOK( wxWindow* aParent, const wxString& aMessage ) { wxMessageDialog dlg( aParent, aMessage, _( "Confirmation" ), - wxYES_NO | wxCENTRE | wxICON_HAND ); + wxYES_NO | wxCENTRE | wxICON_QUESTION ); return dlg.ShowModal() == wxID_YES; } diff --git a/common/project.cpp b/common/project.cpp index b2fb30d12b..8bbebf6d5a 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -253,9 +253,22 @@ static bool copy_pro_file_template( const SEARCH_STACK& aSearchS, const wxString DBG( printf( "%s: using template file '%s' as project file.\n", __func__, TO_UTF8( kicad_pro_template ) );) - wxCopyFile( kicad_pro_template, aDestination ); + // Verify aDestination can be created. if this is not the case, wxCopyFile + // will generate a crappy log error message, and we *do not want* this kind + // of stupid message + wxFileName fn( aDestination ); + bool success = true; - return true; + if( fn.IsOk() && fn.IsDirWritable() ) + success = wxCopyFile( kicad_pro_template, aDestination ); + else + { + wxLogMessage( _( "Cannot create prj file '%s' (Directory not writable)" ), + GetChars( aDestination) ); + success = false; + } + + return success; } diff --git a/common/single_top.cpp b/common/single_top.cpp index 0b53fe3250..5c2dcd4ca3 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -205,7 +205,7 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) if( !wxIsAbsolutePath( absoluteArgv0 ) ) { - wxLogSysError( wxT( "No meaningful argv[0]" ) ); + wxLogError( wxT( "No meaningful argv[0]" ) ); return false; } diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 4f497e2c90..01db6fe30c 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -106,7 +106,7 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) if( !wxIsAbsolutePath( absoluteArgv0 ) ) { - wxLogSysError( wxT( "No meaningful argv[0]" ) ); + wxLogError( wxT( "No meaningful argv[0]" ) ); return false; }