aboutsummaryrefslogtreecommitdiff
path: root/backends/updates
diff options
context:
space:
mode:
authorEugene Sandulenko2016-03-31 09:38:28 +0200
committerEugene Sandulenko2016-03-31 09:38:28 +0200
commit82963f7446f336fe71e71f35fa39768aed059541 (patch)
tree437f4302b3711b46708657b386f123cd04193f6b /backends/updates
parent08e7f0ab9179691fe869bab8fee5585364c846c7 (diff)
downloadscummvm-rg350-82963f7446f336fe71e71f35fa39768aed059541.tar.gz
scummvm-rg350-82963f7446f336fe71e71f35fa39768aed059541.tar.bz2
scummvm-rg350-82963f7446f336fe71e71f35fa39768aed059541.zip
UPDATES: Read values from config file in MacOS X update manager
Diffstat (limited to 'backends/updates')
-rw-r--r--backends/updates/macosx/macosx-updates.mm13
1 files changed, 8 insertions, 5 deletions
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index c13f05f1c6..6f99e71ccf 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -27,6 +27,7 @@
#ifdef USE_SPARKLE
#include "common/translation.h"
+#include "common/config-manager.h"
#include <Cocoa/Cocoa.h>
#include <Sparkle/Sparkle.h>
@@ -74,11 +75,13 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
// Finally give up our references to the objects
[menuItem release];
- // Enable automatic update checking once a day (alternatively use
- // checkForUpdates() here to check for updates on every startup)
- // TODO: Should be removed when an update settings gui is implemented
- setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
- setUpdateCheckInterval(kUpdateIntervalOneDay);
+ if (!ConfMan.hasKey("updates_check")
+ || ConfMan.getInt("updates_check") == Common::UpdateManager::kUpdateIntervalNotSupported) {
+ setAutomaticallyChecksForUpdates(kUpdateStateDisabled);
+ } else {
+ setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
+ setUpdateCheckInterval(ConfMan.getInt("updates_check"));
+ }
}
MacOSXUpdateManager::~MacOSXUpdateManager() {