From cdbbadba94d42a82c8c5773fd3fdef746e7ad8e4 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Tue, 9 Nov 2010 20:04:44 +0000 Subject: Comments. --- Source/SPConnectionController.m | 4 ++-- Source/SPFavoriteNode.h | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index ce2acd3f..f8e9db18 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -1153,7 +1153,7 @@ } /** - * + * Builds a tree structure from the user's connection favorties by wrapping them in SPFavoriteNode instances. */ - (void)_buildFavoritesTree { @@ -1161,12 +1161,12 @@ favoritesRoot = [[SPFavoriteNode alloc] init]; + // Add a dummy item to represent the favorites heading SPFavoriteNode *favoritesNode = [[SPFavoriteNode alloc] init]; [favoritesNode setIsGroup:YES]; [favoritesNode setFavorite:[NSDictionary dictionaryWithObject:NSLocalizedString(@"FAVORITES", @"Favorites title at the top of the sidebar") forKey:@"name"]]; - for (NSDictionary *favorite in favorites) { SPFavoriteNode *node2 = [[SPFavoriteNode alloc] init]; diff --git a/Source/SPFavoriteNode.h b/Source/SPFavoriteNode.h index 289958f7..0493ae70 100644 --- a/Source/SPFavoriteNode.h +++ b/Source/SPFavoriteNode.h @@ -23,6 +23,14 @@ // // More info at +/** + * @class SPFavoriteNode SPFavoriteNode.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * This class is designed to be a simple wrapper around a connection favorite to allow us to easily represent + * them in a tree structure for use in an outline view. + */ @interface SPFavoriteNode : NSObject { BOOL isGroup; @@ -30,8 +38,19 @@ NSMutableArray *children; } +/** + * @property isGroup Indicates whether this node is a group item + */ @property (readwrite, assign) BOOL isGroup; + +/** + * @property favorite The actual favorite dictionary + */ @property (readwrite, retain) NSDictionary *favorite; + +/** + * @property children This node's children + */ @property (readwrite, retain) NSMutableArray *children; @end -- cgit v1.2.3