Accept dragged file names in NSSavePanel.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21838 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2005-10-17 11:50:04 +00:00
parent a360bbba59
commit 9c2cf54e7e
2 changed files with 26 additions and 5 deletions

View file

@ -1,7 +1,12 @@
2005-10-17 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSSavePanel.m (-performDragOperation:): Set file name and
directory to allow dragging of files, not just directories.
2005-10-14 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSRulerVeiw.m (-drawHashMarksAndLabelsInRect:): For
vertical rulers use ruler hickness to position labels. Patch by Saso
* Source/NSRulerView.m (-drawHashMarksAndLabelsInRect:): For
vertical rulers use ruler thickness to position labels. Patch by Saso
Kiselkov <diablos@manga.sk>.
2005-10-09 Richard Frith-Macdonald <rfm@gnu.org>
@ -14,7 +19,8 @@
that other apps can contact it.
Implement ([-extendPowerOffBy:]) to ask workspace application.
* Tools/gclose.m: Triavial utility ... counterpart for gopen ...
close doen an application.
close doen an application.Saso
Kiselkov <diablos@manga.sk>
* Tools/GNUmakefile: build gclose
2005-10-08 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -104,6 +104,7 @@ static BOOL _gs_display_reading_progress = NO;
{
return NSDragOperationNone;
}
return NSDragOperationAll;
}
@ -117,9 +118,23 @@ static BOOL _gs_display_reading_progress = NO;
if ([types containsObject: NSFilenamesPboardType] == YES)
{
NSArray *names = [dragPb propertyListForType: NSFilenamesPboardType];
NSString *file = [names lastObject];
NSString *file = [[names lastObject] stringByStandardizingPath];
BOOL isDir;
if (file &&
[_fm fileExistsAtPath: file isDirectory: &isDir] &&
isDir)
{
[self setDirectory: file];
}
else
{
NSString *path = [file stringByDeletingLastPathComponent];
NSString *filename = [file lastPathComponent];
[self _setupForDirectory: path file: filename];
}
[self setDirectory: file];
return YES;
}
return NO;