Use app display name in messages to user.

Fixes https://gitlab.com/kicad/code/kicad/issues/8038
This commit is contained in:
Jeff Young 2021-03-28 13:04:25 +01:00
parent 673baa0864
commit 8a8167ff0a
1 changed files with 9 additions and 11 deletions

View File

@ -173,8 +173,7 @@ const wxString& PGM_BASE::GetEditorName( bool aCanShowFileChooser )
// If we still don't have an editor name show a dialog asking the user to select one // If we still don't have an editor name show a dialog asking the user to select one
if( !editorname && aCanShowFileChooser ) if( !editorname && aCanShowFileChooser )
{ {
DisplayInfoMessage( NULL, DisplayInfoMessage( NULL, _( "No default editor found, you must choose it" ) );
_( "No default editor found, you must choose it" ) );
editorname = AskUserForPreferredEditor(); editorname = AskUserForPreferredEditor();
} }
@ -206,10 +205,8 @@ const wxString PGM_BASE::AskUserForPreferredEditor( const wxString& aDefaultEdit
// Show the modal editor and return the file chosen (may be empty if the user cancels // Show the modal editor and return the file chosen (may be empty if the user cancels
// the dialog). // the dialog).
return EDA_FILE_SELECTOR( _( "Select Preferred Editor" ), path, return EDA_FILE_SELECTOR( _( "Select Preferred Editor" ), path, name, ext, mask, NULL,
name, ext, mask, wxFD_OPEN | wxFD_FILE_MUST_EXIST, true );
NULL, wxFD_OPEN | wxFD_FILE_MUST_EXIST,
true );
} }
@ -222,7 +219,8 @@ bool PGM_BASE::InitPgm()
#ifndef __WINDOWS__ #ifndef __WINDOWS__
if( wxString( wxGetenv( "HOME" ) ).IsEmpty() ) if( wxString( wxGetenv( "HOME" ) ).IsEmpty() )
{ {
DisplayErrorMessage( nullptr, _( "Environmental variable HOME is empty. Unable to continue." ) ); DisplayErrorMessage( nullptr, _( "Environment variable HOME is empty. "
"Unable to continue." ) );
return false; return false;
} }
#endif #endif
@ -232,11 +230,11 @@ bool PGM_BASE::InitPgm()
if( m_pgm_checker->IsAnotherRunning() ) if( m_pgm_checker->IsAnotherRunning() )
{ {
wxString quiz = if( !IsOK( NULL, wxString::Format( _( "%s is already running. Continue?" ),
wxString::Format( _( "%s is already running. Continue?" ), pgm_name.GetName() ); App().GetAppDisplayName() ) ) )
{
if( !IsOK( NULL, quiz ) )
return false; return false;
}
} }
// Init KiCad environment // Init KiCad environment