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

fix update code in macosx gui

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