Register defaults for shuffle/repeat.
This commit is contained in:
parent
bafb6485f4
commit
489063ad33
1 changed files with 13 additions and 0 deletions
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue