Use standard "Untitled" name for files without names

Also translates to provide useful information regardless of language
This commit is contained in:
Seth Hillbrand 2021-05-27 16:39:41 -07:00
parent d7f219e98f
commit b1dcf74042
3 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,7 @@ int GERBVIEW_CONTROL::ExportToPcbnew( const TOOL_EVENT& aEvent )
return 0;
}
wxString fileDialogName( wxT( "noname." ) + KiCadPcbFileExtension );
wxString fileDialogName( NAMELESS_PROJECT + wxT( "." ) + KiCadPcbFileExtension );
wxString path = m_frame->GetMruPath();
wxFileDialog filedlg( m_frame, _( "Board File Name" ), path, fileDialogName, PcbFileWildcard(),

View File

@ -38,7 +38,7 @@
#define PROJECT_VAR_NAME wxT( "KIPRJMOD" )
/// default name for nameless projects
#define NAMELESS_PROJECT wxT( "noname" )
#define NAMELESS_PROJECT _( "untitled" )
class wxConfigBase;
class PARAM_CFG;

View File

@ -421,7 +421,7 @@ bool PCB_EDIT_FRAME::Files_io_from_id( int id )
wxFileName::SplitPath( GetBoard()->GetFileName(), nullptr, nullptr, &orig_name, nullptr );
if( orig_name.IsEmpty() )
orig_name = _( "noname" );
orig_name = NAMELESS_PROJECT;
wxFileName savePath( Prj().GetProjectFullName() );
@ -1147,7 +1147,7 @@ bool PCB_EDIT_FRAME::doAutoSave()
if( GetBoard()->GetFileName().IsEmpty() )
{
tmpFileName = wxFileName( PATHS::GetDefaultUserProjectsPath(), wxT( "noname" ),
tmpFileName = wxFileName( PATHS::GetDefaultUserProjectsPath(), NAMELESS_PROJECT,
KiCadPcbFileExtension );
GetBoard()->SetFileName( tmpFileName.GetFullPath() );
}