Revision: 15233
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15233&view=rev
Author: hofman
Date: 2009-04-29 14:32:09 +0000 (Wed, 29 Apr 2009)
Log Message:
-----------
remove unused filewrapper category
Modified Paths:
--------------
trunk/bibdesk/BibDocument.m
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2009-04-29 12:12:57 UTC (rev 15232)
+++ trunk/bibdesk/BibDocument.m 2009-04-29 14:32:09 UTC (rev 15233)
@@ -159,10 +159,10 @@
static char BDSKDocumentDefaultsObservationContext;
enum {
- BDSKItemChangedGroupFieldMask = 1,
- BDSKItemChangedSearchKeyMask = 2,
- BDSKItemChangedSortKeyMask = 4,
- BDSKItemChangedFilesMask = 8
+ BDSKItemChangedGroupFieldMask = 1 << 0,
+ BDSKItemChangedSearchKeyMask = 1 << 1,
+ BDSKItemChangedSortKeyMask = 1 << 2,
+ BDSKItemChangedFilesMask = 1 << 3
};
@interface BDSKFileViewObject : NSObject {
@@ -174,33 +174,8 @@
- (NSString *)string;
@end
-...@implementation BDSKFileViewObject
+#pragma mark -
-- (id)initWithURL:(NSURL *)aURL string:(NSString *)aString {
- if (self = [super init]) {
- URL = [aURL copy];
- string = [aString copy];
- }
- return self;
-}
-
-- (void)dealloc {
- [URL release];
- [string release];
- [super dealloc];
-}
-
-- (NSURL *)URL { return URL; }
-
-- (NSString *)string { return string; }
-
-...@end
-
-
-...@interface NSFileWrapper (BDSKExtensions)
-- (NSFileWrapper *)addFileWrapperWithPath:(NSString *)path
relativeTo:(NSString *)basePath recursive:(BOOL)recursive;
-...@end
-
@interface NSDocument (BDSKPrivateExtensions)
// declare a private NSDocument method so we can override it
- (void)changeSaveType:(id)sender;
@@ -3851,38 +3826,24 @@
#pragma mark -
-...@implementation NSFileWrapper (BDSKExtensions)
+...@implementation BDSKFileViewObject
-- (NSFileWrapper *)addFileWrapperWithPath:(NSString *)path
relativeTo:(NSString *)basePath recursive:(BOOL)recursive {
- NSFileWrapper *fileWrapper = nil;
- BOOL isDir;
- if ([[NSFileManager defaultManager] fileExistsAtPath:path
isDirectory:&isDir]) {
- NSString *filename = [path lastPathComponent];
- NSString *relativePath = basePath ? [path
relativePathFromPath:basePath] : filename;
- NSFileWrapper *container = self;
-
- if ([relativePath isEqualToString:filename] == NO)
- container = [self addFileWrapperWithPath:[path
stringByDeletingLastPathComponent] relativeTo:basePath recursive:NO];
-
- fileWrapper = [[container fileWrappers] objectForKey:filename];
- if (fileWrapper == nil || [fileWrapper isDirectory] != isDir) {
- if (isDir)
- fileWrapper = [[NSFileWrapper alloc]
initDirectoryWithFileWrappers:[NSDictionary dictionary]];
- else
- fileWrapper = [[NSFileWrapper alloc]
initRegularFileWithContents:[NSData dataWithContentsOfFile:path]];
- [fileWrapper setPreferredFilename:filename];
- [container addFileWrapper:fileWrapper];
- [fileWrapper release];
- }
-
- if (isDir && recursive) {
- NSEnumerator *fileEnum = [[[NSFileManager defaultManager]
subpathsAtPath:path] objectEnumerator];
- NSString *file;
- while (file = [fileEnum nextObject])
- [self addFileWrapperWithPath:[path
stringByAppendingPathComponent:file] relativeTo:path recursive:YES];
- }
+- (id)initWithURL:(NSURL *)aURL string:(NSString *)aString {
+ if (self = [super init]) {
+ URL = [aURL copy];
+ string = [aString copy];
}
- return fileWrapper;
+ return self;
}
+- (void)dealloc {
+ [URL release];
+ [string release];
+ [super dealloc];
+}
+
+- (NSURL *)URL { return URL; }
+
+- (NSString *)string { return string; }
+
@end
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit