Declare types when writing to pasteboard

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17059 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-06-28 06:55:13 +00:00
parent d13626fc75
commit 97d6293fcc

View file

@ -312,11 +312,13 @@ static NSString *namePrefix = @"NSTypedFilenamesPboardType:";
if (data != nil) if (data != nil)
{ {
tmp = [NSPasteboard pasteboardWithUniqueName]; tmp = [NSPasteboard pasteboardWithUniqueName];
[tmp declareTypes: [NSArray arrayWithObject: fromType] owner: nil];
[tmp setData: data forType: fromType]; [tmp setData: data forType: fromType];
} }
else if (file != nil) else if (file != nil)
{ {
tmp = [NSPasteboard pasteboardWithUniqueName]; tmp = [NSPasteboard pasteboardWithUniqueName];
[tmp declareTypes: [NSArray arrayWithObject: fromType] owner: nil];
[tmp writeFileContents: file]; [tmp writeFileContents: file];
} }
else else