Skip to content

Commit

Permalink
UPDATES: Read values from config file in MacOS X update manager
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Apr 3, 2016
1 parent b44a98c commit 004f8b3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions backends/updates/macosx/macosx-updates.mm
Expand Up @@ -27,6 +27,7 @@

#ifdef USE_SPARKLE
#include "common/translation.h"
#include "common/config-manager.h"

#include <Cocoa/Cocoa.h>
#include <Sparkle/Sparkle.h>
Expand Down Expand Up @@ -74,11 +75,13 @@
// 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() {
Expand Down

0 comments on commit 004f8b3

Please sign in to comment.