Commit e9347d2d authored by Rafaël Carré's avatar Rafaël Carré

cosmetics + evil (?) -> hack (objective C definitely looks strange...)

parent ebd31a1f
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
- (void)showUpdateWindow; - (void)showUpdateWindow;
- (void)checkForUpdate; - (void)checkForUpdate;
- (void)updateManagement: (vlc_bool_t) b_success; - (void)setUpToDate: (BOOL)uptodate;
- (void)performDownload:(NSString *)path; - (void)performDownload:(NSString *)path;
+ (VLCUpdate *)sharedInstance; + (VLCUpdate *)sharedInstance;
......
...@@ -167,12 +167,11 @@ static VLCUpdate *_o_sharedInstance = nil; ...@@ -167,12 +167,11 @@ static VLCUpdate *_o_sharedInstance = nil;
[self setShouldCheckUpdate: [sender state]]; [self setShouldCheckUpdate: [sender state]];
} }
- (void)updateManagement:(vlc_bool_t)b_success - (void)setUpToDate:(BOOL)uptodate
{ {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if( !b_success || if( uptodate )
update_CompareReleaseToCurrent( p_u ) != UpdateReleaseStatusNewer )
{ {
[o_fld_status setStringValue: _NS("This version of VLC is the latest available.")]; [o_fld_status setStringValue: _NS("This version of VLC is the latest available.")];
[o_btn_DownloadNow setEnabled: NO]; [o_btn_DownloadNow setEnabled: NO];
...@@ -196,7 +195,7 @@ static VLCUpdate *_o_sharedInstance = nil; ...@@ -196,7 +195,7 @@ static VLCUpdate *_o_sharedInstance = nil;
static void updateCallback( void * p_data, vlc_bool_t b_success ) 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 - (void)checkForUpdate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment