Change App/Auto/Check For Updates to a bool so that the correct control is used in the preferences dialog

Originally committed to SVN as r4758.
This commit is contained in:
Thomas Goyne 2010-08-26 18:38:03 +00:00
parent 27a7c41a44
commit f15dd92fb1
3 changed files with 6 additions and 6 deletions

View file

@ -171,7 +171,7 @@ wxThread::ExitCode AegisubVersionCheckerThread::Entry()
if (!interactive) if (!interactive)
{ {
// Automatic checking enabled? // Automatic checking enabled?
if (!OPT_GET("App/Auto/Check For Updates")->GetInt()) if (!OPT_GET("App/Auto/Check For Updates")->GetBool())
return 0; return 0;
// Is it actually time for a check? // Is it actually time for a check?

View file

@ -197,11 +197,10 @@ FrameMain::FrameMain (wxArrayString args)
// Version checker // Version checker
StartupLog(_T("Possibly perform automatic updates check")); StartupLog(_T("Possibly perform automatic updates check"));
int option = OPT_GET("App/Auto/Check For Updates")->GetInt(); if (OPT_GET("App/First Start")->GetBool()) {
if (option == -1) { OPT_SET("App/First Start")->SetBool(false);
int result = wxMessageBox(_("Do you want Aegisub to check for updates whenever it starts? You can still do it manually via the Help menu."),_("Check for updates?"),wxYES_NO); int result = wxMessageBox(_("Do you want Aegisub to check for updates whenever it starts? You can still do it manually via the Help menu."),_("Check for updates?"),wxYES_NO);
option = (result == wxYES); OPT_SET("App/Auto/Check For Updates")->SetBool(result == wxYES);
OPT_SET("App/Auto/Check For Updates")->SetInt(option);
} }
PerformVersionCheck(false); PerformVersionCheck(false);

View file

@ -2,12 +2,13 @@
"App" : { "App" : {
"Auto" : { "Auto" : {
"Backup" : true, "Backup" : true,
"Check For Updates" : -1, "Check For Updates" : true,
"Load Linked Files" : 2, "Load Linked Files" : 2,
"Save Every Seconds" : 60, "Save Every Seconds" : 60,
"Save on Every Change" : false "Save on Every Change" : false
}, },
"Call Tips" : false, "Call Tips" : false,
"First Start" : true,
"Local Config" : false, "Local Config" : false,
"Locale" : -1, "Locale" : -1,
"Maximized" : false, "Maximized" : false,