Allow hiding version from manager title bar with advanced config
This commit is contained in:
parent
01515680b3
commit
ae55db77c5
|
@ -166,6 +166,8 @@ static const wxChar Skip3DModelFileCache[] = wxT( "Skip3DModelFileCache" );
|
|||
|
||||
static const wxChar Skip3DModelMemoryCache[] = wxT( "Skip3DModelMemoryCache" );
|
||||
|
||||
static const wxChar HideVersionFromTitle[] = wxT( "HideVersionFromTitle" );
|
||||
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
|
@ -270,6 +272,7 @@ ADVANCED_CFG::ADVANCED_CFG()
|
|||
m_ShowPcbnewExportNetlist = false;
|
||||
m_Skip3DModelFileCache = false;
|
||||
m_Skip3DModelMemoryCache = false;
|
||||
m_HideVersionFromTitle = false;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
@ -376,6 +379,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::Skip3DModelMemoryCache,
|
||||
&m_Skip3DModelMemoryCache, false ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::HideVersionFromTitle,
|
||||
&m_HideVersionFromTitle, false ) );
|
||||
|
||||
wxConfigLoadSetups( &aCfg, configParams );
|
||||
|
||||
dumpCfg( configParams );
|
||||
|
|
|
@ -183,6 +183,12 @@ public:
|
|||
*/
|
||||
bool m_Skip3DModelMemoryCache;
|
||||
|
||||
/**
|
||||
* Hides the build version from the KiCad manager frame title.
|
||||
* Useful for making screenshots/videos of KiCad without pinning to a specific version.
|
||||
*/
|
||||
bool m_HideVersionFromTitle;
|
||||
|
||||
private:
|
||||
ADVANCED_CFG();
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "kicad_id.h"
|
||||
#include "pgm_kicad.h"
|
||||
#include "project_tree_pane.h"
|
||||
#include <advanced_config.h>
|
||||
#include <bitmaps.h>
|
||||
#include <build_version.h>
|
||||
#include <dialogs/panel_kicad_launcher.h>
|
||||
|
@ -172,7 +173,10 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl
|
|||
if( mainSizer && config()->m_Window.state.size_x == 0 && config()->m_Window.state.size_y == 0 )
|
||||
mainSizer->Fit( this );
|
||||
|
||||
SetTitle( wxString( "KiCad " ) + GetBuildVersion() );
|
||||
if( ADVANCED_CFG::GetCfg().m_HideVersionFromTitle )
|
||||
SetTitle( wxT( "KiCad" ) );
|
||||
else
|
||||
SetTitle( wxString( "KiCad " ) + GetBuildVersion() );
|
||||
|
||||
// Do not let the messages window have initial focus
|
||||
m_leftWin->SetFocus();
|
||||
|
@ -622,7 +626,10 @@ void KICAD_MANAGER_FRAME::ProjectChanged()
|
|||
title = _( "[no project loaded]" );
|
||||
}
|
||||
|
||||
title += wxT( " \u2014 " ) + _( "KiCad " ) + GetMajorMinorVersion();
|
||||
if( ADVANCED_CFG::GetCfg().m_HideVersionFromTitle )
|
||||
title += wxT( " \u2014 " ) + wxString( "KiCad" );
|
||||
else
|
||||
title += wxT( " \u2014 " ) + wxString( "KiCad " ) + GetMajorMinorVersion();
|
||||
|
||||
SetTitle( title );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue