The _() macro affords some nullptr safety over a naked immediate.
Fixes: lp:1477448 * https://bugs.launchpad.net/kicad/+bug/1477448
This commit is contained in:
parent
b1f613071d
commit
4eedb3a27d
|
@ -735,11 +735,9 @@ void CVPCB_MAINFRAME::UpdateTitle()
|
||||||
|
|
||||||
if( fn.IsOk() && !prj.GetProjectFullName().IsEmpty() && fn.FileExists() )
|
if( fn.IsOk() && !prj.GetProjectFullName().IsEmpty() && fn.FileExists() )
|
||||||
{
|
{
|
||||||
title.Printf( L"Cvpcb \u2014 %s%s",
|
title.Printf( _( "Cvpcb" ) + wxT( " \u2014 %s%s" ),
|
||||||
fn.GetFullPath(),
|
fn.GetFullPath(),
|
||||||
fn.IsFileWritable()
|
fn.IsFileWritable() ? wxEmptyString : _( " [Read Only]" ) );
|
||||||
? wxString( wxEmptyString )
|
|
||||||
: _( " [Read Only]" ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1474,14 +1474,14 @@ void SCH_EDIT_FRAME::UpdateTitle()
|
||||||
|
|
||||||
if( GetScreen()->GetFileName() == m_DefaultSchematicFileName )
|
if( GetScreen()->GetFileName() == m_DefaultSchematicFileName )
|
||||||
{
|
{
|
||||||
title.Printf( L"Eeschema \u2014 %s", GetChars( GetScreen()->GetFileName() ) );
|
title.Printf( _( "Eeschema \u2014 %s" ), GetChars( GetScreen()->GetFileName() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString fileName = Prj().AbsolutePath( GetScreen()->GetFileName() );
|
wxString fileName = Prj().AbsolutePath( GetScreen()->GetFileName() );
|
||||||
wxFileName fn = fileName;
|
wxFileName fn = fileName;
|
||||||
|
|
||||||
title.Printf( L"Eeschema \u2014 %s [%s] \u2014 %s",
|
title.Printf( _( "Eeschema \u2014 %s [%s] \u2014 %s" ),
|
||||||
GetChars( fn.GetName() ),
|
GetChars( fn.GetName() ),
|
||||||
GetChars( m_CurrentSheet->PathHumanReadable() ),
|
GetChars( m_CurrentSheet->PathHumanReadable() ),
|
||||||
GetChars( fn.GetPath() ) );
|
GetChars( fn.GetPath() ) );
|
||||||
|
|
|
@ -776,11 +776,9 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString title;
|
wxString title;
|
||||||
title.Printf( L"GerbView \u2014 %s%s",
|
title.Printf( _( "GerbView" ) + wxT( " \u2014 %s%s" ),
|
||||||
gerber->m_FileName,
|
gerber->m_FileName,
|
||||||
gerber->m_IsX2_file
|
gerber->m_IsX2_file ? _( " (with X2 attributes)" ) : wxEmptyString );
|
||||||
? " " + _( "(with X2 attributes)" )
|
|
||||||
: wxString( wxEmptyString ) );
|
|
||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
|
|
||||||
gerber->DisplayImageInfo( this );
|
gerber->DisplayImageInfo( this );
|
||||||
|
|
|
@ -330,8 +330,8 @@ void PL_EDITOR_FRAME::UpdateTitleAndInfo()
|
||||||
wxString title;
|
wxString title;
|
||||||
wxString file = GetCurrFileName();
|
wxString file = GetCurrFileName();
|
||||||
|
|
||||||
title.Printf( _( "Page Layout Editor" ) + L" \u2014 %s",
|
title.Printf( _( "Page Layout Editor" ) + wxT( " \u2014 %s" ),
|
||||||
!!file ? file : _( "no file selected" ) );
|
file.Length() ? file : _( "no file selected" ) );
|
||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -797,10 +797,10 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString title;
|
wxString title;
|
||||||
title.Printf( _( "Footprint Editor" ) + L" \u2014 %s%s%s",
|
title.Printf( _( "Footprint Editor" ) + wxT( " \u2014 %s%s%s" ),
|
||||||
nickname_display,
|
nickname_display,
|
||||||
writable ? wxString( wxEmptyString ) : _( " [Read Only]" ),
|
writable ? wxEmptyString : _( " [Read Only]" ),
|
||||||
path_display );
|
path_display );
|
||||||
|
|
||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
}
|
}
|
||||||
|
|
|
@ -688,9 +688,8 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame( bool aForceReloadFootprint )
|
||||||
if( draw3DFrame == NULL )
|
if( draw3DFrame == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxString title = wxString::Format(
|
wxString title = wxString::Format( _( "3D Viewer" ) + wxT( " \u2014 %s" ),
|
||||||
_( "3D Viewer" ) + L" \u2014 %s",
|
getCurFootprintName() );
|
||||||
getCurFootprintName() );
|
|
||||||
|
|
||||||
draw3DFrame->SetTitle( title );
|
draw3DFrame->SetTitle( title );
|
||||||
|
|
||||||
|
|
|
@ -1112,9 +1112,7 @@ void PCB_EDIT_FRAME::UpdateTitle()
|
||||||
|
|
||||||
if( fileName.IsOk() && fileName.FileExists() )
|
if( fileName.IsOk() && fileName.FileExists() )
|
||||||
{
|
{
|
||||||
fileinfo = fileName.IsFileWritable()
|
fileinfo = fileName.IsFileWritable() ? wxEmptyString : _( " [Read Only]" );
|
||||||
? wxString( wxEmptyString )
|
|
||||||
: _( " [Read Only]" );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1122,9 +1120,9 @@ void PCB_EDIT_FRAME::UpdateTitle()
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString title;
|
wxString title;
|
||||||
title.Printf( L"Pcbnew \u2014 %s%s",
|
title.Printf( _( "Pcbnew" ) + wxT( " \u2014 %s%s" ),
|
||||||
fileName.GetFullPath(),
|
fileName.GetFullPath(),
|
||||||
fileinfo );
|
fileinfo );
|
||||||
|
|
||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue