diff options
author | stuconnolly <stuart02@gmail.com> | 2010-11-09 20:04:44 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-11-09 20:04:44 +0000 |
commit | cdbbadba94d42a82c8c5773fd3fdef746e7ad8e4 (patch) | |
tree | 3c1c0033c8f008f08af55d9d00963cd5eec420a8 | |
parent | 0a5acd7a34f5e759171a82b0e4995b25d815d5cf (diff) | |
download | sequelpro-cdbbadba94d42a82c8c5773fd3fdef746e7ad8e4.tar.gz sequelpro-cdbbadba94d42a82c8c5773fd3fdef746e7ad8e4.tar.bz2 sequelpro-cdbbadba94d42a82c8c5773fd3fdef746e7ad8e4.zip |
Comments.
-rw-r--r-- | Source/SPConnectionController.m | 4 | ||||
-rw-r--r-- | 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 <http://code.google.com/p/sequel-pro/> +/** + * @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 |