[vlc-devel] commit: macosx: check for updates only every seven days ( Felix Paul Kühne )

git version control git at videolan.org
Sat Sep 20 15:12:22 CEST 2008


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Sep 20 15:15:44 2008 +0200| [1feca0de20fe4d3600a698a48ab072a6159dfd1a] | committer: Felix Paul Kühne 

macosx: check for updates only every seven days

additionally, save the user's selection to check for updates as soon as it is changed, so we don't ask multiple times in case of a crash

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1feca0de20fe4d3600a698a48ab072a6159dfd1a
---

 modules/gui/macosx/update.m |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/update.m b/modules/gui/macosx/update.m
index f8c71ae..7c964f5 100644
--- a/modules/gui/macosx/update.m
+++ b/modules/gui/macosx/update.m
@@ -36,7 +36,7 @@ static NSString * kPrefUpdateOnStartup = @"UpdateOnStartup";
 static NSString * kPrefUpdateLastTimeChecked = @"UpdateLastTimeChecked";
 
 /*****************************************************************************
- * VLCExtended implementation
+ * VLCUpdate implementation
  *****************************************************************************/
 
 @implementation VLCUpdate
@@ -85,6 +85,9 @@ static VLCUpdate *_o_sharedInstance = nil;
 {
     [[NSUserDefaults standardUserDefaults] setBool: check forKey: kPrefUpdateOnStartup];
     [o_chk_updateOnStartup setState: check];
+
+    /* make sure we got this set, even if we crash later on */
+    [[NSUserDefaults standardUserDefaults] synchronize];
 }
 
 - (BOOL)shouldCheckForUpdate
@@ -107,7 +110,7 @@ static VLCUpdate *_o_sharedInstance = nil;
     if( !o_last_update )
         return YES;
 
-    o_next_update = [[[NSDate alloc] initWithTimeInterval: 60*60*24*2 /* every two days */ sinceDate: o_last_update] autorelease];
+    o_next_update = [[[NSDate alloc] initWithTimeInterval: 60*60*24*7 /* every seven days */ sinceDate: o_last_update] autorelease];
     if( !o_next_update )
         return YES;
 




More information about the vlc-devel mailing list