-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathGeneralPreferences.m
More file actions
39 lines (30 loc) · 993 Bytes
/
GeneralPreferences.m
File metadata and controls
39 lines (30 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// GeneralPreferences.m
// PrefsTest
//
// Created by Dave Jewell on 13/12/2007.
// Copyright 2007 Dave Jewell. All rights reserved.
//
#import "GeneralPreferences.h"
#import "UPlayer.h"
@interface GeneralPreferences ()
@property (weak) IBOutlet NSButton *resumeAtRebootCheckBox;
@property (weak) IBOutlet NSButton *trackSongsWhenPlayStarted;
@end
@implementation GeneralPreferences
-(void)awakeFromNib
{
self.resumeAtRebootCheckBox.state = player().document.resumeAtReboot ? NSOnState : NSOffState;
self.trackSongsWhenPlayStarted.state = player().document.trackSongsWhenPlayStarted? NSOnState : NSOffState;
}
- (BOOL)isResizable
{
return NO;
}
- (IBAction)actionResumeAtReboot:(id)sender {
player().document.resumeAtReboot = (self.resumeAtRebootCheckBox.state == NSOnState ? 1 : 0);
}
- (IBAction)actionTrackSongsWhenPlayStarted:(id)sender {
player().document.trackSongsWhenPlayStarted= (self.trackSongsWhenPlayStarted.state == NSOnState ? 1 : 0);
}
@end