Add preference to disable writing the Catalog.xml.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "UnlockManager.h"
|
||||
#include "arch/LoadingWindow/LoadingWindow.h"
|
||||
#include "LocalizedString.h"
|
||||
#include "Preference.h"
|
||||
|
||||
#define SHOW_PLAY_MODE(pm) THEME->GetMetricB("CatalogXml",ssprintf("ShowPlayMode%s",PlayModeToString(pm).c_str()))
|
||||
#define SHOW_STYLE(ps) THEME->GetMetricB("CatalogXml",ssprintf("ShowStyle%s",Capitalize((ps)->m_szName).c_str()))
|
||||
@@ -38,11 +39,15 @@ const RString CATALOG_XSL = "Catalog.xsl";
|
||||
const RString CATALOG_XML_FILE = "Save/" + CATALOG_XML;
|
||||
|
||||
static LocalizedString SAVING_CATALOG_XML( "CatalogXml", "Saving %s ..." );
|
||||
Preference<bool> g_bWriteCatalog( "WriteCatalog", true );
|
||||
|
||||
void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
{
|
||||
ASSERT( SONGMAN );
|
||||
ASSERT( UNLOCKMAN );
|
||||
|
||||
if( !g_bWriteCatalog )
|
||||
return;
|
||||
if( loading_window )
|
||||
loading_window->SetText( ssprintf(SAVING_CATALOG_XML.GetValue(),CATALOG_XML.c_str()) );
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ const RString EDIT_COURSES_SUBDIR = "EditCourses/";
|
||||
ThemeMetric<bool> SHOW_COIN_DATA( "Profile", "ShowCoinData" );
|
||||
static Preference<bool> g_bProfileDataCompress( "ProfileDataCompress", false );
|
||||
static Preference<bool> g_bCopyCatalogToProfiles( "CopyCatalogToProfiles", true );
|
||||
extern Preference<bool> g_bWriteCatalog;
|
||||
static ThemeMetric<RString> UNLOCK_AUTH_STRING( "Profile", "UnlockAuthString" );
|
||||
|
||||
#define GUID_SIZE_BYTES 8
|
||||
|
||||
#define MAX_EDITABLE_INI_SIZE_BYTES 2*1024 // 2KB
|
||||
@@ -1642,7 +1642,7 @@ void Profile::SaveStatsWebPageToDir( RString sDir ) const
|
||||
|
||||
FileCopy( THEME->GetPathO("Profile",STATS_XSL), sDir+STATS_XSL );
|
||||
FileCopy( THEME->GetPathO("Profile",COMMON_XSL), sDir+COMMON_XSL );
|
||||
if( g_bCopyCatalogToProfiles )
|
||||
if( g_bCopyCatalogToProfiles && g_bWriteCatalog )
|
||||
{
|
||||
FileCopy( CATALOG_XML_FILE, sDir+CATALOG_XML );
|
||||
FileCopy( THEME->GetPathO("Profile",CATALOG_XSL), sDir+CATALOG_XSL );
|
||||
|
||||
Reference in New Issue
Block a user