Commit 0c9b2d28 authored by Rafaël Carré's avatar Rafaël Carré

fix update code in macosx gui

parent 234bf661
{ <?xml version="1.0" encoding="UTF-8"?>
IBClasses = ( <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, <plist version="1.0">
{ <dict>
ACTIONS = {changeCheckUpdateOnStartup = id; download = id; okay = id; }; <key>IBClasses</key>
CLASS = VLCUpdate; <array>
LANGUAGE = ObjC; <dict>
OUTLETS = { <key>CLASS</key>
"o_bar_checking" = id; <string>FirstResponder</string>
"o_btn_DownloadNow" = id; <key>LANGUAGE</key>
"o_btn_okay" = id; <string>ObjC</string>
"o_chk_updateOnStartup" = id; <key>SUPERCLASS</key>
"o_fld_currentVersionAndSize" = id; <string>NSObject</string>
"o_fld_releaseNote" = id; </dict>
"o_fld_status" = id; <dict>
"o_update_window" = id; <key>ACTIONS</key>
}; <dict>
SUPERCLASS = NSObject; <key>changeCheckUpdateOnStartup</key>
} <string>id</string>
); <key>download</key>
IBVersion = 1; <string>id</string>
} <key>okay</key>
\ No newline at end of file <string>id</string>
</dict>
<key>CLASS</key>
<string>VLCUpdate</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_bar_checking</key>
<string>id</string>
<key>o_btn_DownloadNow</key>
<string>id</string>
<key>o_btn_okay</key>
<string>id</string>
<key>o_chk_updateOnStartup</key>
<string>id</string>
<key>o_fld_currentVersion</key>
<string>id</string>
<key>o_fld_releaseNote</key>
<string>id</string>
<key>o_fld_status</key>
<string>id</string>
<key>o_update_window</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key>
<string>16 51 356 240 0 0 1280 778 </string>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>446.1</string> <string>629</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>5</integer> <integer>5</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8P2137</string> <string>9C31</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict> </dict>
</plist> </plist>
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
#include <string.h> #include <string.h>
#include <vlc_keys.h> #include <vlc_keys.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#import "intf.h" #import "intf.h"
#import "fspanel.h" #import "fspanel.h"
#import "vout.h" #import "vout.h"
...@@ -420,7 +424,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -420,7 +424,7 @@ static VLCMain *_o_sharedMainInstance = nil;
o_interaction_list = [[VLCInteractionList alloc] init]; o_interaction_list = [[VLCInteractionList alloc] init];
o_sfilters = nil; o_sfilters = nil;
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
//FIXME o_update = [[VLCUpdate alloc] init]; o_update = [[VLCUpdate alloc] init];
#endif #endif
i_lastShownVolume = -1; i_lastShownVolume = -1;
...@@ -865,9 +869,8 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -865,9 +869,8 @@ static VLCMain *_o_sharedMainInstance = nil;
if( !nib_update_loaded ) if( !nib_update_loaded )
nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self]; nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self];
// FIXME if([o_update shouldCheckForUpdate])
//if([o_update shouldCheckForUpdate]) [NSThread detachNewThreadSelector:@selector(checkForUpdate) toTarget:o_update withObject:NULL];
// [NSThread detachNewThreadSelector:@selector(checkForUpdate) toTarget:o_update withObject:NULL];
#endif #endif
/* Handle sleep notification */ /* Handle sleep notification */
...@@ -2019,8 +2022,9 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -2019,8 +2022,9 @@ static VLCMain *_o_sharedMainInstance = nil;
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
if( !nib_update_loaded ) if( !nib_update_loaded )
nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self]; nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self];
[o_update showUpdateWindow]; [o_update showUpdateWindow];
#else
msg_Err( VLCIntf, "Updates checking was not enabled in this build" );
#endif #endif
} }
......
/***************************************************************************** /*****************************************************************************
* update.h: MacOS X Check-For-Update window * update.h: MacOS X Check-For-Update window
***************************************************************************** *****************************************************************************
* Copyright (C) 2005-2007 the VideoLAN team * Copyright © 2005-2008 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Felix Kühne <fkuehne@users.sf.net> * Authors: Felix Kühne <fkuehne@users.sf.net>
* Rafaël Carré <funman@videolanorg>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -21,6 +22,10 @@ ...@@ -21,6 +22,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <vlc_update.h> #import <vlc_update.h>
...@@ -30,16 +35,14 @@ ...@@ -30,16 +35,14 @@
IBOutlet id o_btn_DownloadNow; IBOutlet id o_btn_DownloadNow;
IBOutlet id o_btn_okay; IBOutlet id o_btn_okay;
IBOutlet id o_fld_releaseNote; IBOutlet id o_fld_releaseNote;
IBOutlet id o_fld_source; IBOutlet id o_fld_currentVersion;
IBOutlet id o_fld_currentVersionAndSize;
IBOutlet id o_fld_status; IBOutlet id o_fld_status;
IBOutlet id o_update_window; IBOutlet id o_update_window;
IBOutlet id o_bar_checking; IBOutlet id o_bar_checking;
IBOutlet id o_chk_updateOnStartup; IBOutlet id o_chk_updateOnStartup;
NSString * o_urlOfBinary;
update_t * p_u; update_t * p_u;
intf_thread_t * p_intf; vlc_bool_t b_checked;
} }
- (IBAction)download:(id)sender; - (IBAction)download:(id)sender;
...@@ -49,8 +52,8 @@ ...@@ -49,8 +52,8 @@
- (BOOL)shouldCheckForUpdate; - (BOOL)shouldCheckForUpdate;
- (void)showUpdateWindow; - (void)showUpdateWindow;
- (void)initInterface;
- (void)checkForUpdate; - (void)checkForUpdate;
- (void)updateManagement: (vlc_bool_t) b_success;
- (void)performDownload:(NSString *)path; - (void)performDownload:(NSString *)path;
+ (VLCUpdate *)sharedInstance; + (VLCUpdate *)sharedInstance;
......
This diff is collapsed.
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