Author: adamfoxtp
Date: Wed Aug 12 19:21:42 2015
New Revision: 38874
URL: http://svn.gna.org/viewcvs/gnustep?rev=38874&view=rev
Log:
Apply change from Fred Kiefer (r38871) in [NSTextView
validateUserInterfaceItem:].
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m?rev=38874&r1=38873&r2=38874&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m Wed Aug
12 19:21:42 2015
@@ -3216,21 +3216,36 @@
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];
-
- available = [[NSPasteboard generalPasteboard]
- availableTypeFromArray: types];
+ {
+ types = [NSArray arrayWithObject: NSRulerPboard];
+ pb = [NSPasteboard pasteboardWithName: NSRulerPboard];
+ }
+
+ available = [pb availableTypeFromArray: types];
return available != nil;
}
else
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs