From e9347d2d89166c53ece29004c1a0d46f3cf9182e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Mon, 25 Feb 2008 00:49:30 +0000 Subject: [PATCH] cosmetics + evil (?) -> hack (objective C definitely looks strange...) --- modules/gui/macosx/update.h | 2 +- modules/gui/macosx/update.m | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/gui/macosx/update.h b/modules/gui/macosx/update.h index 1742975506..e87f0298be 100644 --- a/modules/gui/macosx/update.h +++ b/modules/gui/macosx/update.h @@ -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; diff --git a/modules/gui/macosx/update.m b/modules/gui/macosx/update.m index 52abfdd2c2..c66375bfe2 100644 --- a/modules/gui/macosx/update.m +++ b/modules/gui/macosx/update.m @@ -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 -- 2.39.2