Register defaults for shuffle/repeat.

This commit is contained in:
vspader 2009-02-28 10:18:56 -08:00
parent bafb6485f4
commit 489063ad33

View file

@ -61,6 +61,17 @@
} }
- (void)initDefaults
{
NSDictionary *defaultsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInteger:RepeatNone], @"repeatMode",
[NSNumber numberWithBool:NO], @"shuffle",
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultsDictionary];
}
- (id)initWithCoder:(NSCoder *)decoder - (id)initWithCoder:(NSCoder *)decoder
{ {
self = [super initWithCoder:decoder]; self = [super initWithCoder:decoder];
@ -69,11 +80,13 @@
{ {
shuffleList = [[NSMutableArray alloc] init]; shuffleList = [[NSMutableArray alloc] init];
queueList = [[NSMutableArray alloc] init]; queueList = [[NSMutableArray alloc] init];
[self initDefaults];
} }
return self; return self;
} }
- (void)dealloc - (void)dealloc
{ {
[shuffleList release]; [shuffleList release];