[fDstFile2Field stringValue]] );
return;
}
- /* We get the destination directory from the destingation field here */
+ /* We get the destination directory from the destination field here */
NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
/* We check for a valid destination here */
if ([[NSFileManager defaultManager] fileExistsAtPath:destinationDirectory] == 0)
NSString *defDestDirectory = @"~/Desktop";
defDestDirectory = [defDestDirectory stringByExpandingTildeInPath];
appDefaults = [NSDictionary dictionaryWithObject:defDestDirectory forKey:@"LastDestinationDirectory"];
+
+ NSString *defSrcDirectory = @"~/Desktop";
+ defSrcDirectory = [defSrcDirectory stringByExpandingTildeInPath];
+ appDefaults = [NSDictionary dictionaryWithObject:defSrcDirectory forKey:@"LastSourceDirectory"];
+
appDefaults = [NSDictionary dictionaryWithObject:@"NO"
forKey:@"DefaultAutoNaming"];
appDefaults = [NSDictionary dictionaryWithObject:@"NO"
[panel setAllowsMultipleSelection: NO];
[panel setCanChooseFiles: YES];
[panel setCanChooseDirectories: YES ];
-
- [panel beginSheetForDirectory: nil file: nil types: nil
+ NSString * sourceDirectory;
+ if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastSourceDirectory"])
+ {
+ sourceDirectory = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastSourceDirectory"];
+ }
+ else
+ {
+ sourceDirectory = @"~/Desktop";
+ sourceDirectory = [sourceDirectory stringByExpandingTildeInPath];
+ }
+ [panel beginSheetForDirectory: sourceDirectory file: nil types: nil
modalForWindow: [NSApp mainWindow] modalDelegate: self
didEndSelector: @selector( BrowseDone:returnCode:contextInfo: )
contextInfo: nil];
if( [fMatrix selectedRow] )
{
+ /* we set the last source directory in the prefs here */
+ NSString *sourceDirectory = [[fFolderField stringValue] stringByDeletingLastPathComponent];
+ [[NSUserDefaults standardUserDefaults] setObject:sourceDirectory forKey:@"LastSourceDirectory"];
hb_scan( fHandle, [[fFolderField stringValue] UTF8String], 0 );
}
else