mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 10:01:14 +00:00
Apply change from Fred Kiefer (r38871) in [NSTextView validateUserInterfaceItem:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38874 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00e7aa5a61
commit
e53c91a2fb
1 changed files with 22 additions and 7 deletions
|
@ -3216,21 +3216,36 @@ Scroll so that the beginning of the range is visible.
|
|||
if ([self isEditable])
|
||||
{
|
||||
NSArray *types = nil;
|
||||
NSPasteboard *pb = nil;
|
||||
NSString *available;
|
||||
|
||||
if (sel_isEqual(action, @selector(paste:)))
|
||||
types = [self readablePasteboardTypes];
|
||||
{
|
||||
types = [self readablePasteboardTypes];
|
||||
pb = [NSPasteboard generalPasteboard];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(pasteAsPlainText:)))
|
||||
types = [NSArray arrayWithObject: NSStringPboardType];
|
||||
{
|
||||
types = [NSArray arrayWithObject: NSStringPboardType];
|
||||
pb = [NSPasteboard generalPasteboard];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(pasteAsRichText:)))
|
||||
types = [NSArray arrayWithObject: NSRTFPboardType];
|
||||
{
|
||||
types = [NSArray arrayWithObject: NSRTFPboardType];
|
||||
pb = [NSPasteboard generalPasteboard];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(pasteFont:)))
|
||||
types = [NSArray arrayWithObject: NSFontPboardType];
|
||||
{
|
||||
types = [NSArray arrayWithObject: NSFontPboardType];
|
||||
pb = [NSPasteboard pasteboardWithName: NSFontPboard];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(pasteRuler:)))
|
||||
types = [NSArray arrayWithObject: NSRulerPboard];
|
||||
{
|
||||
types = [NSArray arrayWithObject: NSRulerPboard];
|
||||
pb = [NSPasteboard pasteboardWithName: NSRulerPboard];
|
||||
}
|
||||
|
||||
available = [[NSPasteboard generalPasteboard]
|
||||
availableTypeFromArray: types];
|
||||
available = [pb availableTypeFromArray: types];
|
||||
return available != nil;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue