Commits

Anonymous committed b759987

Whether to show remaining time or elapsed time now survives restarts

Comments (0)

Files changed (1)

 
 #import "TimeField.h"
 
+@implementation TimeField
 
-@implementation TimeField
+- (void)awakeFromNib
+{
+    showTimeRemaining = [[NSUserDefaults standardUserDefaults] boolForKey:@"timerShowTimeRemaining"];
+}
 
 - (void)update
 {
 - (void)mouseDown:(NSEvent *)theEvent
 {
 	showTimeRemaining = !showTimeRemaining;
+    [[NSUserDefaults standardUserDefaults] setBool:showTimeRemaining forKey:@"timerShowTimeRemaining"];
 	[self update];
 }