Use DisplayErrorMessage instead of wxMessageBox directly

This commit is contained in:
Marek Roszko 2020-12-08 19:28:48 -05:00
parent ad1aae40ec
commit 4e9b9ee9cd
1 changed files with 5 additions and 6 deletions

View File

@ -126,7 +126,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
if( ! InsertPageLayoutDescrFile( filename ) )
{
msg.Printf( _( "Unable to load %s file" ), filename );
wxMessageBox( msg );
DisplayErrorMessage( this, msg );
}
else
{
@ -151,7 +151,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
if( ! LoadPageLayoutDescrFile( filename ) )
{
msg.Printf( _( "Unable to load %s file" ), filename );
wxMessageBox( msg );
DisplayErrorMessage( this, msg );
}
else
{
@ -166,7 +166,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
if( !SavePageLayoutDescrFile( filename ) )
{
msg.Printf( _( "Unable to write \"%s\"" ), filename );
wxMessageBox( msg );
DisplayErrorMessage( this, msg );
}
else
{
@ -196,7 +196,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
if( !SavePageLayoutDescrFile( filename ) )
{
msg.Printf( _( "Unable to create \"%s\"" ), filename );
wxMessageBox( msg );
DisplayErrorMessage( this, msg );
}
else
@ -211,7 +211,6 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
break;
default:
wxMessageBox( wxT( "File_io: unexpected command id" ) );
break;
}
}