[vlc-devel] commit: macosx: finish backport of [ 6342bd65fb2062d14880febb1cdcf7ec61adff34] (Derk-Jan Hartman )
git version control
git at videolan.org
Tue Sep 30 14:59:50 CEST 2008
vlc | branch: 0.9-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Tue Sep 30 15:02:50 2008 +0200| [4793c51ad3045fdf2bcb659ad9c8980702d0871b] | committer: Derk-Jan Hartman
macosx: finish backport of [6342bd65fb2062d14880febb1cdcf7ec61adff34]
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4793c51ad3045fdf2bcb659ad9c8980702d0871b
---
modules/gui/macosx/update.m | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/gui/macosx/update.m b/modules/gui/macosx/update.m
index f596943..1cb018d 100644
--- a/modules/gui/macosx/update.m
+++ b/modules/gui/macosx/update.m
@@ -129,16 +129,16 @@ static VLCUpdate *_o_sharedInstance = nil;
{
/* provide a save dialogue */
SEL sel = @selector(getLocationForSaving:returnCode:contextInfo:);
- NSSavePanel * saveFilePanel = [[NSSavePanel alloc] init];
+ NSOpenPanel * saveFilePanel = [[NSOpenPanel alloc] init];
- [saveFilePanel setRequiredFileType: @"dmg"];
- [saveFilePanel setCanSelectHiddenExtension: YES];
+ [saveFilePanel setCanChooseFiles: NO];
+ [saveFilePanel setCanChooseDirectories: YES];
[saveFilePanel setCanCreateDirectories: YES];
[saveFilePanel setPrompt: _NS("Save" )];
[saveFilePanel setNameFieldLabel: _NS("Save As:" )];
update_release_t *p_release = update_GetRelease( p_u );
assert( p_release );
- [saveFilePanel beginSheetForDirectory:nil file:
+ [saveFilePanel beginSheetForDirectory:@"~/Downloads" file:
[[[NSString stringWithUTF8String: p_release->psz_url] componentsSeparatedByString:@"/"] lastObject]
modalForWindow: o_update_window
modalDelegate:self
@@ -146,14 +146,14 @@ static VLCUpdate *_o_sharedInstance = nil;
contextInfo:nil];
}
-- (void)getLocationForSaving: (NSSavePanel *)sheet
+- (void)getLocationForSaving: (NSOpenPanel *)sheet
returnCode: (int)returnCode
contextInfo: (void *)contextInfo
{
if( returnCode == NSOKButton )
{
/* perform download and pass the selected path */
- [NSThread detachNewThreadSelector:@selector(performDownload:) toTarget:self withObject:[sheet filename]];
+ [NSThread detachNewThreadSelector:@selector(performDownload:) toTarget:self withObject:[sheet directory]];
}
[sheet release];
}
More information about the vlc-devel
mailing list