From f15dd92fb18ae4b9ae06bfd4a1acd3f4a65cf26b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 26 Aug 2010 18:38:03 +0000 Subject: [PATCH] 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. --- aegisub/src/dialog_version_check.cpp | 2 +- aegisub/src/frame_main.cpp | 7 +++---- aegisub/src/libresrc/default_config.json | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aegisub/src/dialog_version_check.cpp b/aegisub/src/dialog_version_check.cpp index 2c3e6173b..eaa8084a5 100644 --- a/aegisub/src/dialog_version_check.cpp +++ b/aegisub/src/dialog_version_check.cpp @@ -171,7 +171,7 @@ wxThread::ExitCode AegisubVersionCheckerThread::Entry() if (!interactive) { // Automatic checking enabled? - if (!OPT_GET("App/Auto/Check For Updates")->GetInt()) + if (!OPT_GET("App/Auto/Check For Updates")->GetBool()) return 0; // Is it actually time for a check? diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp index 7db2bd30e..f50603f0c 100644 --- a/aegisub/src/frame_main.cpp +++ b/aegisub/src/frame_main.cpp @@ -197,11 +197,10 @@ FrameMain::FrameMain (wxArrayString args) // Version checker StartupLog(_T("Possibly perform automatic updates check")); - int option = OPT_GET("App/Auto/Check For Updates")->GetInt(); - if (option == -1) { + if (OPT_GET("App/First Start")->GetBool()) { + 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); - option = (result == wxYES); - OPT_SET("App/Auto/Check For Updates")->SetInt(option); + OPT_SET("App/Auto/Check For Updates")->SetBool(result == wxYES); } PerformVersionCheck(false); diff --git a/aegisub/src/libresrc/default_config.json b/aegisub/src/libresrc/default_config.json index f9808d8e7..81dadeebf 100644 --- a/aegisub/src/libresrc/default_config.json +++ b/aegisub/src/libresrc/default_config.json @@ -2,12 +2,13 @@ "App" : { "Auto" : { "Backup" : true, - "Check For Updates" : -1, + "Check For Updates" : true, "Load Linked Files" : 2, "Save Every Seconds" : 60, "Save on Every Change" : false }, "Call Tips" : false, + "First Start" : true, "Local Config" : false, "Locale" : -1, "Maximized" : false,