Minor fixes: Bug #1478279 : wrong icon in "YES/NO" dialog; Bug Bug #1478278 (crappy warning/log messages)

This commit is contained in:
jean-pierre charras 2015-07-26 19:50:13 +02:00
parent 8b18f5118c
commit f18aef8182
4 changed files with 18 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}