]> git.sesse.net Git - vlc/commitdiff
cosmetics + evil (?) -> hack (objective C definitely looks strange...)
authorRafaël Carré <funman@videolan.org>
Mon, 25 Feb 2008 00:49:30 +0000 (00:49 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 25 Feb 2008 00:49:30 +0000 (00:49 +0000)
modules/gui/macosx/update.h
modules/gui/macosx/update.m

index 17429755063e1e0976216a8fda88f7e4c2778d25..e87f0298be05dacbb76a2f4520412a14dc3451f7 100644 (file)
@@ -53,7 +53,7 @@
 
 - (void)showUpdateWindow;
 - (void)checkForUpdate;
-- (void)updateManagement: (vlc_bool_t) b_success;
+- (void)setUpToDate: (BOOL)uptodate;
 - (void)performDownload:(NSString *)path;
 
 + (VLCUpdate *)sharedInstance;
index 52abfdd2c262b8ac2885499c75f802f17789681e..c66375bfe2ff2bf2aaf2928edee3ba32d6665939 100644 (file)
@@ -167,12 +167,11 @@ static VLCUpdate *_o_sharedInstance = nil;
     [self setShouldCheckUpdate: [sender state]];
 }
 
-- (void)updateManagement:(vlc_bool_t)b_success
+- (void)setUpToDate:(BOOL)uptodate
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
-    if( !b_success ||
-        update_CompareReleaseToCurrent( p_u ) != UpdateReleaseStatusNewer )
+    if( uptodate )
     {
         [o_fld_status setStringValue: _NS("This version of VLC is the latest available.")];
         [o_btn_DownloadNow setEnabled: NO];
@@ -196,7 +195,7 @@ static VLCUpdate *_o_sharedInstance = nil;
 
 static void updateCallback( void * p_data, vlc_bool_t b_success )
 {
-    [(id)p_data updateManagement: b_success];
+    [(id)p_data setUpToDate: b_success && update_CompareReleaseToCurrent( ((VLCUpdate*)p_data)->p_u ) == UpdateReleaseStatusNewer ];
 }
 
 - (void)checkForUpdate