aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoriteNode.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-11-11 16:53:24 +0000
committerstuconnolly <stuart02@gmail.com>2010-11-11 16:53:24 +0000
commitb1bc59225d7f190b6db36da4634cc96095f01591 (patch)
tree95cfdcc96dfbb48750d9f0afa79569591d04bea0 /Source/SPFavoriteNode.m
parentb8fc79dd357d8dd1cf3177d1a7faef030497a9e0 (diff)
downloadsequelpro-b1bc59225d7f190b6db36da4634cc96095f01591.tar.gz
sequelpro-b1bc59225d7f190b6db36da4634cc96095f01591.tar.bz2
sequelpro-b1bc59225d7f190b6db36da4634cc96095f01591.zip
Refactor the favorite node class and fix auto-selection of the default or last used favorite.
Diffstat (limited to 'Source/SPFavoriteNode.m')
-rw-r--r--Source/SPFavoriteNode.m20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/SPFavoriteNode.m b/Source/SPFavoriteNode.m
index 3b46ba80..51a9d1aa 100644
--- a/Source/SPFavoriteNode.m
+++ b/Source/SPFavoriteNode.m
@@ -27,17 +27,18 @@
@implementation SPFavoriteNode
-@synthesize isGroup;
-@synthesize favorite;
-@synthesize children;
+@synthesize nodeIsGroup;
+@synthesize nodeName;
+@synthesize nodeFavorite;
+@synthesize nodeChildren;
- (id)init
{
if ((self = [super init])) {
- [self setIsGroup:NO];
-
- [self setFavorite:nil];
- [self setChildren:[[NSMutableArray alloc] init]];
+ [self setNodeIsGroup:NO];
+ [self setNodeName:nil];
+ [self setNodeFavorite:nil];
+ [self setNodeChildren:[[NSMutableArray alloc] init]];
}
return self;
@@ -45,8 +46,9 @@
- (void)dealloc
{
- if (favorite) [favorite release], favorite = nil;
- if (children) [children release], children = nil;
+ if (nodeName) [nodeName release], nodeName = nil;
+ if (nodeFavorite) [nodeFavorite release], nodeFavorite = nil;
+ if (nodeChildren) [nodeChildren release], nodeChildren = nil;
[super dealloc];
}