From efe0bd06ad500c89075279767d997ee08575d409 Mon Sep 17 00:00:00 2001 From: vspader Date: Thu, 31 Jan 2008 00:50:50 +0000 Subject: [PATCH] Fix for making rootPath KVC compliant for the file tree. --- FileDrawer/FileTreeDataSource.h | 1 + FileDrawer/FileTreeDataSource.m | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/FileDrawer/FileTreeDataSource.h b/FileDrawer/FileTreeDataSource.h index ef72bde42..a94fbf466 100644 --- a/FileDrawer/FileTreeDataSource.h +++ b/FileDrawer/FileTreeDataSource.h @@ -16,6 +16,7 @@ IBOutlet NSOutlineView *outlineView; } +- (NSString *)rootPath; - (void)setRootPath:(NSString *)rootPath; - (void)reloadPathNode:(PathNode *)item; diff --git a/FileDrawer/FileTreeDataSource.m b/FileDrawer/FileTreeDataSource.m index b2e1f4837..4b61376e0 100644 --- a/FileDrawer/FileTreeDataSource.m +++ b/FileDrawer/FileTreeDataSource.m @@ -19,6 +19,11 @@ [self setRootPath: [[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"fileDrawerRootPath"] ]; } +- (NSString *)rootPath +{ + return [[rootNode url] path]; +} + - (void)setRootPath: (NSString *)rootPath { [[[[outlineView tableColumns] objectAtIndex:0] headerCell] setStringValue:[[NSFileManager defaultManager] displayNameAtPath:rootPath]];