Remove all traces of local configuration support ("portable application") in non-Windows builds. Closes #856.

Originally committed to SVN as r3011.
This commit is contained in:
Niels Martin Hansen 2009-06-03 23:42:47 +00:00
parent 4b986b5a53
commit 390fb2d03c
2 changed files with 12 additions and 3 deletions

View file

@ -114,8 +114,8 @@ DialogOptions::DialogOptions(wxWindow *parent)
AddCheckBox(generalPage,genSizer4,_("Show Splash Screen"),_T("Show splash"));
#ifdef __WXMSW__
AddCheckBox(generalPage,genSizer4,_("Auto Check for Updates"),_T("Auto check for updates"));
#endif
AddCheckBox(generalPage,genSizer4,_("Save config.dat locally"),_T("Local config"));
#endif
genSizer4->AddGrowableCol(0,1);
genSizer1->Add(genSizer4,1,wxEXPAND|wxALL,5);
@ -904,11 +904,15 @@ void DialogOptions::WriteToOptions(bool justApply) {
}
// Save options
#ifdef __WXMSW__
if (Options.AsBool(_T("Local config"))) Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
else {
#endif
Options.SetFile(StandardPaths::DecodePath(_T("?user/config.dat")));
#ifdef __WXMSW__
wxRemoveFile(StandardPaths::DecodePath(_T("?data/config.dat")));
}
#endif
Options.Save();
// Need restart?

View file

@ -153,13 +153,18 @@ bool AegisubApp::OnInit() {
// Set config file
StartupLog(_T("Load configuration"));
Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
Options.LoadDefaults();
#ifndef __WXMSW__
Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
Options.Load();
if (!Options.AsBool(_T("Local config"))) {
if (!Options.AsBool(_T("Local config")))
#endif
{
Options.SetFile(StandardPaths::DecodePath(_T("?user/config.dat")));
Options.Load();
#ifndef __WXMSW__
wxRemoveFile(StandardPaths::DecodePath(_T("?data/config.dat")));
#endif
}
StartupLog(_T("Store options back"));
Options.SetInt(_T("Last Version"),GetSVNRevision());