aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPGroupNode.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-05 00:14:43 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-05 00:14:43 +0000
commit32b7c4df28e2eb3a4a8bcb71b3faae4f173f016c (patch)
tree4d1f2fe472fa622665b81f775f3a43f924a5b71f /Source/SPGroupNode.m
parentbea72ac3bbebb9e35e34b840968b4ba0f433e87a (diff)
downloadsequelpro-32b7c4df28e2eb3a4a8bcb71b3faae4f173f016c.tar.gz
sequelpro-32b7c4df28e2eb3a4a8bcb71b3faae4f173f016c.tar.bz2
sequelpro-32b7c4df28e2eb3a4a8bcb71b3faae4f173f016c.zip
Add support for auto saving expanded items.
Diffstat (limited to 'Source/SPGroupNode.m')
-rw-r--r--Source/SPGroupNode.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/SPGroupNode.m b/Source/SPGroupNode.m
index 6687b29e..182a96f7 100644
--- a/Source/SPGroupNode.m
+++ b/Source/SPGroupNode.m
@@ -25,6 +25,9 @@
#import "SPGroupNode.h"
+// Constants
+static const NSString *SPGroupNodeNameKey = @"SPGroupNodeName";
+
@implementation SPGroupNode
@synthesize nodeName;
@@ -68,6 +71,25 @@
}
#pragma mark -
+#pragma mark Coding protocol methods
+
+- (id)initWithCoder:(NSCoder *)coder
+{
+ if ((self = [super initWithCoder:coder])) {
+ [self setNodeName:[coder decodeObjectForKey:SPGroupNodeNameKey]];
+ }
+
+ return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder
+{
+ [super encodeWithCoder:coder];
+
+ [coder encodeObject:[self nodeName] forKey:SPGroupNodeNameKey];
+}
+
+#pragma mark -
#pragma mark Other
- (NSString *)description