]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/update.m
macosx: Cache the input state and properly ask the ugly timer to sync with it.
[vlc] / modules / gui / macosx / update.m
index 4a0b8dbe9ec20b0ced56bc0addd026e9bf207042..ef195d92e11ee3e64a2b6eb04170304b05b092f2 100644 (file)
@@ -167,9 +167,9 @@ static VLCUpdate *_o_sharedInstance = nil;
     [self setShouldCheckUpdate: [sender state]];
 }
 
-- (void)setUpToDate:(BOOL)uptodate
+- (void)setUpToDate:(NSNumber *)uptodate
 {
-    if( uptodate )
+    if( [uptodate boolValue] )
     {
         [o_fld_releaseNote setString: @""];
         [o_fld_currentVersion setStringValue: @""];
@@ -208,7 +208,9 @@ static void updateCallback( void * p_data, bool b_success )
         return;
     update_Check( p_u, updateCallback, self );
 
+    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
     [[NSUserDefaults standardUserDefaults] setObject: [NSDate date] forKey: kPrefUpdateLastTimeChecked];
+    [pool release];
 }
 
 - (void)performDownload:(NSString *)path