From f6551172d2ca456cfb9d478d8e1b0df97f0e6c9d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 10 May 2012 08:25:27 +0200 Subject: [PATCH] Fix capitalization issues in title bar and config files (broken by bzr rev 3543) --- common/edaappl.cpp | 2 +- cvpcb/cvpcb.cpp | 2 +- eeschema/eeschema.cpp | 2 +- eeschema/schframe.cpp | 18 ++++++++---------- gerbview/gerbview_frame.cpp | 2 +- pcbnew/pcbframe.cpp | 8 ++++---- pcbnew/pcbnew.cpp | 2 +- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/common/edaappl.cpp b/common/edaappl.cpp index d8db853d3b..d870a08ac7 100644 --- a/common/edaappl.cpp +++ b/common/edaappl.cpp @@ -335,7 +335,7 @@ void EDA_APP::InitEDA_Appl( const wxString& aName, EDA_APP_T aId ) /* Init parameters for configuration */ SetVendorName( wxT( "KiCad" ) ); - SetAppName( aName ); + SetAppName( aName.Lower() ); SetTitle( aName ); m_settings = new wxConfig(); wxASSERT( m_settings != NULL ); diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 3f03eba3df..06b2367234 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -73,7 +73,7 @@ bool EDA_APP::OnInit() wxString message; CVPCB_MAINFRAME* frame = NULL; - InitEDA_Appl( wxT( "CvPCB" ), APP_CVPCB_T ); + InitEDA_Appl( wxT( "CvPcb" ), APP_CVPCB_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 044bb37fd8..e899851990 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -124,7 +124,7 @@ bool EDA_APP::OnInit() wxFileName filename; SCH_EDIT_FRAME* frame = NULL; - InitEDA_Appl( wxT( "EESchema" ), APP_EESCHEMA_T ); + InitEDA_Appl( wxT( "Eeschema" ), APP_EESCHEMA_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index ec6207c5ee..9f9f6478ed 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -977,9 +977,8 @@ void SCH_EDIT_FRAME::UpdateTitle() if( GetScreen()->GetFileName() == m_DefaultSchematicFileName ) { - wxString msg = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion(); - title.Printf( wxT( "%s [%s]" ), GetChars( msg), GetChars( GetScreen()->GetFileName() ) ); - SetTitle( title ); + title.Printf( wxT( "Eeschema %s [%s]" ), GetChars( GetBuildVersion() ), + GetChars( GetScreen()->GetFileName() ) ); } else { @@ -989,12 +988,10 @@ void SCH_EDIT_FRAME::UpdateTitle() // passed to LoadOneEEFile() which omits the path on non-root schematics. // Making the path absolute solves this problem. fn.MakeAbsolute(); - title = wxChar( '[' ); - title << fn.GetName() << wxChar( ' ' ); - title << m_CurrentSheet->PathHumanReadable() << wxChar( ']' ); - - title << wxChar( ' ' ); - title << wxChar( '(' ) << fn.GetPath() << wxChar( ')' ); + title.Printf( wxT( "[ %s %s] (%s)" ), + GetChars( fn.GetName() ), + GetChars( m_CurrentSheet->PathHumanReadable() ), + GetChars( fn.GetPath() ) ); if( fn.FileExists() ) { @@ -1004,6 +1001,7 @@ void SCH_EDIT_FRAME::UpdateTitle() else title << _( " [no file]" ); - SetTitle( title ); } + + SetTitle( title ); } diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 4fca6658ba..869fd806c2 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -451,7 +451,7 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo() // Display the gerber filename if( gerber == NULL ) { - text = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion(); + text.Printf( wxT( "GerbView %s" ), GetChars( GetBuildVersion() ) ); SetTitle( text ); SetStatusText( wxEmptyString, 0 ); text.Printf( _( "Layer %d not in use" ), getActiveLayer() + 1 ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index ed8e9d788d..b64fd4ddf0 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -752,16 +752,16 @@ void PCB_EDIT_FRAME::UpdateTitle() if( fileName.IsOk() && fileName.FileExists() ) { - title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + fileName.GetFullPath(); + title.Printf( wxT( "Pcbnew %s %s" ), GetChars( GetBuildVersion() ), + GetChars( fileName.GetFullPath() ) ); if( !fileName.IsFileWritable() ) title += _( " [Read Only]" ); } else { - title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + _( " [no file]" ); + title.Printf( wxT( "Pcbnew %s " ), GetChars( GetBuildVersion() ) ); + title << _( " [no file]" ); } SetTitle( title ); diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 1a09edde42..dd3304462e 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -102,7 +102,7 @@ bool EDA_APP::OnInit() wxFileName fn; PCB_EDIT_FRAME* frame = NULL; - InitEDA_Appl( wxT( "PCBNew" ), APP_PCBNEW_T ); + InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) {