From b2a0af91eae18b6490ddeafd2708d256b0d53cb3 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 17 Mar 2011 19:25:56 +0000 Subject: Bind the default favorites drop down menu pref to the new favorites data file, with sub-menus representing groups (still a bit buggy). --- Source/SPTreeNode.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/SPTreeNode.m') diff --git a/Source/SPTreeNode.m b/Source/SPTreeNode.m index e197d180..d93db01b 100644 --- a/Source/SPTreeNode.m +++ b/Source/SPTreeNode.m @@ -69,7 +69,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; return; } - if (![node isLeaf]) { + if ([node isGroup]) { [node removeObjectFromChildren:object]; } } @@ -88,7 +88,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; { [descendants addObject:node]; - if (![node isLeaf]) { + if ([node isGroup]) { [descendants addObjectsFromArray:[node descendants]]; } } @@ -107,7 +107,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; for (SPTreeNode *node in [self childNodes]) { - if ([node isLeaf]) { + if (![node isGroup]) { [childLeafs addObject:node]; } } @@ -127,7 +127,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; for (SPTreeNode *node in [self childNodes]) { - if ([node isLeaf]) { + if (![node isGroup]) { [childLeafs addObject:node]; } else { @@ -149,7 +149,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; for (SPTreeNode *node in [self childNodes]) { - if (![node isLeaf]) { + if ([node isGroup]) { [groupChildren addObject:node]; } } @@ -177,7 +177,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; break; } - if (![node isLeaf]) { + if ([node isGroup]) { SPTreeNode *innerNode = [self parentFromArray:[node childNodes]]; if (innerNode) { @@ -205,7 +205,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup"; if (node == self) return YES; // Check all the sub-nodes - if (![node isLeaf]) { + if ([node isGroup]) { if ([self isDescendantOfOrOneOfNodes:[node childNodes]]) { return YES; } -- cgit v1.2.3