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