summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreferencesController.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBPreferencesController.m')
-rw-r--r--macosx/HBPreferencesController.m17
1 files changed, 8 insertions, 9 deletions
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m
index cd0874696..e53878cca 100644
--- a/macosx/HBPreferencesController.m
+++ b/macosx/HBPreferencesController.m
@@ -179,13 +179,12 @@
/*Opens the app browse window*/
- (IBAction) browseSendToApp: (id) sender
{
- NSOpenPanel * panel;
-
- panel = [NSOpenPanel openPanel];
- [panel setAllowsMultipleSelection: NO];
- [panel setCanChooseFiles: YES];
- [panel setCanChooseDirectories: NO ];
- NSString * sendToAppDirectory;
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+ [panel setAllowsMultipleSelection:NO];
+ [panel setCanChooseFiles:YES];
+ [panel setCanChooseDirectories:NO];
+
+ NSString *sendToAppDirectory;
if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastSendToAppDirectory"])
{
sendToAppDirectory = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastSendToAppDirectory"];
@@ -200,8 +199,8 @@
if (result == NSOKButton)
{
NSURL *sendToAppURL = [panel URL];
- NSURL *sendToAppDirectory = [sendToAppURL URLByDeletingLastPathComponent];
- [[NSUserDefaults standardUserDefaults] setObject:[sendToAppDirectory path] forKey:@"LastSendToAppDirectory"];
+ NSURL *sendToAppDirectoryURL = [sendToAppURL URLByDeletingLastPathComponent];
+ [[NSUserDefaults standardUserDefaults] setObject:[sendToAppDirectoryURL path] forKey:@"LastSendToAppDirectory"];
NSString *sendToAppName = [[sendToAppURL lastPathComponent] stringByDeletingPathExtension];
/* we set the name of the app to send to in the display field */