Tightening up the title bar display

Eeschema was the only application showing the file path.  This is of
limited use and prevented other information from showing in the
shortened menubar display.  Also combined strings for better translation
This commit is contained in:
Seth Hillbrand 2020-09-03 06:59:37 -07:00
parent d6a4ab0eec
commit 8751a55651
2 changed files with 8 additions and 8 deletions

View File

@ -1096,15 +1096,16 @@ void SCH_EDIT_FRAME::AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM*
void SCH_EDIT_FRAME::UpdateTitle()
{
wxString title;
wxString nofile = _( "[no file]" ) + wxS(" ");
wxString app = _( "Eeschema" );
if( GetScreen()->GetFileName().IsEmpty() )
{
title.Printf( _( "[no file]" ) + wxT( " \u2014 " ) + _( "Eeschema" ) );
title = nofile + wxT( "\u2014 " ) + app;
}
else
{
wxString fileName = Prj().AbsolutePath( GetScreen()->GetFileName() );
wxFileName fn = fileName;
wxFileName fn( Prj().AbsolutePath( GetScreen()->GetFileName() ) );
wxString append;
if( fn.FileExists() )
@ -1113,12 +1114,11 @@ void SCH_EDIT_FRAME::UpdateTitle()
append = _( "[Read Only] " );
}
else
append = _( "[no file] " );
append = nofile;
title.Printf( wxT( "%s [%s] \u2014 %s %s\u2014 " ) + _( "Eeschema" ),
title.Printf( wxT( "%s [%s] %s\u2014 " ) + app,
fn.GetName(),
GetCurrentSheet().PathHumanReadable(),
fn.GetPath(),
append );
}

View File

@ -718,9 +718,9 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
}
// Note: don't used GetLoadedFPID(); footprint name may have been edited
title += wxString::Format( wxT( "%s %s \u2014 " ),
title += wxString::Format( wxT( "%s %s\u2014 " ),
FROM_UTF8( GetBoard()->GetFirstModule()->GetFPID().Format().c_str() ),
writable ? wxString( wxEmptyString ) : _( "[Read Only]" ) );
writable ? wxString( wxEmptyString ) : _( "[Read Only] " ) );
}
else if( !fpid.GetLibItemName().empty() )
{