+2005-03-08 John Sullivan <sullivan@apple.com>
+
+ A couple of tweaks to the previous patch, from Darin's review.
+
+ * Misc.subproj/WebNSPasteboardExtras.m:
+ (_writableTypesForImageWithoutArchive):
+ remove unnecessary _web prefix
+ (_writableTypesForImageWithArchive):
+ ditto
+ (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
+ use mutableCopy rather than initWithArray:, and adjust for name changes
+
2005-03-08 John Sullivan <sullivan@apple.com>
Reviewed by Ken.
return types;
}
-static NSArray *_web_writableTypesForImageWithoutArchive ()
+static NSArray *_writableTypesForImageWithoutArchive (void)
{
static NSMutableArray *types = nil;
if (types == nil) {
return types;
}
-static NSArray *_web_writableTypesForImageWithArchive ()
+static NSArray *_writableTypesForImageWithArchive (void)
{
static NSMutableArray *types = nil;
if (types == nil) {
- types = [[NSMutableArray alloc] initWithArray:_web_writableTypesForImageWithoutArchive()];
+ types = [_writableTypesForImageWithoutArchive() mutableCopy];
[types addObject:NSRTFDPboardType];
[types addObject:WebArchivePboardType];
}
+ (NSArray *)_web_writableTypesForImageIncludingArchive:(BOOL)hasArchive
{
return hasArchive
- ? _web_writableTypesForImageWithArchive()
- : _web_writableTypesForImageWithoutArchive();
+ ? _writableTypesForImageWithArchive()
+ : _writableTypesForImageWithoutArchive();
}
+ (NSArray *)_web_dragTypesForURL