Shortening filenames in titlebar
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2096
This commit is contained in:
parent
de03d3d427
commit
d6a4ab0eec
|
@ -1116,7 +1116,7 @@ void SCH_EDIT_FRAME::UpdateTitle()
|
|||
append = _( "[no file] " );
|
||||
|
||||
title.Printf( wxT( "%s [%s] \u2014 %s %s\u2014 " ) + _( "Eeschema" ),
|
||||
fn.GetFullName(),
|
||||
fn.GetName(),
|
||||
GetCurrentSheet().PathHumanReadable(),
|
||||
fn.GetPath(),
|
||||
append );
|
||||
|
|
|
@ -714,8 +714,10 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo()
|
|||
else
|
||||
{
|
||||
wxString title;
|
||||
wxFileName filename( gerber->m_FileName );
|
||||
|
||||
title.Printf( wxT( "%s%s \u2014 " ) + _( "GerbView" ),
|
||||
gerber->m_FileName,
|
||||
filename.GetFullName(),
|
||||
gerber->m_IsX2_file ? _( " (with X2 attributes)" )
|
||||
: wxString( wxEmptyString ) );
|
||||
SetTitle( title );
|
||||
|
|
|
@ -529,10 +529,10 @@ void PL_EDITOR_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
void PL_EDITOR_FRAME::UpdateTitleAndInfo()
|
||||
{
|
||||
wxString title;
|
||||
wxString file = GetCurrentFileName();
|
||||
wxFileName file( GetCurrentFileName() );
|
||||
|
||||
title.Printf( wxT( "%s \u2014 " ) + _( "Page Layout Editor" ),
|
||||
file.Length() ? file : _( "no file selected" ) );
|
||||
file.IsOk() ? file.GetName() : _( "no file selected" ) );
|
||||
SetTitle( title );
|
||||
}
|
||||
|
||||
|
|
|
@ -1155,7 +1155,7 @@ void PCB_EDIT_FRAME::UpdateTitle()
|
|||
fileinfo = _( " [Unsaved]" );
|
||||
|
||||
SetTitle( wxString::Format( wxT( "%s%s \u2014 " ) + _( "Pcbnew" ),
|
||||
fileName.GetFullPath(),
|
||||
fileName.GetName(),
|
||||
fileinfo ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue