diff options
author | ritsuka <[email protected]> | 2013-10-25 18:21:54 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2013-10-25 18:21:54 +0000 |
commit | ef19311ee492b85995da5446d75e2cc0fdb40549 (patch) | |
tree | bd28a616c62f9a9c2eaa5d56f52795279ebf0adc /macosx/HBPreferencesController.m | |
parent | 32a56184a88817091950a94335dbf1036677eaf1 (diff) |
MacGUI: Varius warnings fixes:
- NSUInteger and NSInteger instead of int (where the Cocoa 64bit api uses them).
- Cast to int when needed because NSInteger on 64bit is defined as long.
- NSURL instead of NSString when possible.
- Replaced some deprecated methods/functions.
- numberWithInteger instead of numberWithInt.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5854 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreferencesController.m')
-rw-r--r-- | macosx/HBPreferencesController.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 4e335ee69..544387dee 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -180,16 +180,15 @@ { if( returnCode == NSOKButton ) { - NSString *sendToAppPath = [[sheet filenames] objectAtIndex: 0]; - NSString *sendToAppDirectory = [sendToAppPath stringByDeletingLastPathComponent]; - [[NSUserDefaults standardUserDefaults] setObject:sendToAppDirectory forKey:@"LastSendToAppDirectory"]; + NSURL *sendToAppURL = [[sheet URLs] objectAtIndex: 0]; + NSURL *sendToAppDirectory = [sendToAppURL URLByDeletingLastPathComponent]; + [[NSUserDefaults standardUserDefaults] setObject:[sendToAppDirectory path] forKey:@"LastSendToAppDirectory"]; [sheet orderOut: self]; NSString *sendToAppName; - sendToAppName = [[sendToAppPath lastPathComponent] stringByDeletingPathExtension]; + sendToAppName = [[sendToAppURL lastPathComponent] stringByDeletingPathExtension]; /* we set the name of the app to send to in the display field */ [fSendEncodeToAppField setStringValue:sendToAppName]; [[NSUserDefaults standardUserDefaults] setObject:[fSendEncodeToAppField stringValue] forKey:@"SendCompletedEncodeToApp"]; - } } |