Changeset 331
- Timestamp:
- 08/06/07 21:55:03 (17 years ago)
- Location:
- trunk/Cocoa/AntiRSI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/AntiRSI/AntiRSI.h
r330 r331 126 126 - (void)tick:(NSTimer *)timer; 127 127 128 // reset all timers 129 - (void)resetTimers; 130 128 131 // draw the dock icon 129 132 - (void)drawDockImage; -
trunk/Cocoa/AntiRSI/AntiRSI.m
r330 r331 114 114 // end of bindings 115 115 116 - (void)awakeFromNib 117 { 118 // want transparancy 119 [NSColor setIgnoresAlpha:NO]; 120 121 // initial colors 122 elapsed = [[NSColor colorWithCalibratedRed:0.3 green:0.3 blue:0.9 alpha:0.95] retain]; 123 taking = [[NSColor colorWithCalibratedRed:0.3 green:0.9 blue:0.3 alpha:0.90] retain]; 124 background = [NSColor colorWithCalibratedRed:0.9 green:0.9 blue:0.9 alpha:0.7]; 125 126 //initial values 127 micro_pause_period = 4*60; 128 micro_pause_duration = 13; 129 work_break_period = 50*60; 130 work_break_duration = 8*60; 131 sample_interval = 1; 132 133 // set current state 134 state = s_normal; 135 116 - (void)resetTimers; 117 { 136 118 // set timers to 0 137 119 micro_pause_t = 0; … … 141 123 work_break_taking_cached_t = 0; 142 124 work_break_taking_cached_date = 0; 125 session_t = 0; 126 } 127 128 - (void)awakeFromNib 129 { 130 // want transparancy 131 [NSColor setIgnoresAlpha:NO]; 132 133 // initial colors 134 elapsed = [[NSColor colorWithCalibratedRed:0.3 green:0.3 blue:0.9 alpha:0.95] retain]; 135 taking = [[NSColor colorWithCalibratedRed:0.3 green:0.9 blue:0.3 alpha:0.90] retain]; 136 background = [NSColor colorWithCalibratedRed:0.9 green:0.9 blue:0.9 alpha:0.7]; 137 138 //initial values 139 micro_pause_period = 4*60; 140 micro_pause_duration = 13; 141 work_break_period = 50*60; 142 work_break_duration = 8*60; 143 sample_interval = 1; 144 145 // set current state 146 state = s_normal; 147 [self resetTimers]; 143 148 144 149 // initialize dock image … … 161 166 [main_window setContentView:view]; 162 167 [progress setEnabled:NO]; 168 NSFont *myriad = [NSFont fontWithName: @"Myriad" size: 40]; 169 if (myriad) [status setFont: myriad]; 163 170 164 171 // initialze history filter … … 523 530 - (NSString *)sessionTimeString; 524 531 { 525 return [NSString stringWithFormat:@"Session: %d:%02d:%02d", (int)session_t / 3600, (int)session_t / 60, lrint(session_t) % 60]; 532 return [NSString stringWithFormat:@"Session: %d:%02d:%02d", (int)session_t / 3600, 533 ((int)session_t / 60) % 60, lrint(session_t) % 60]; 526 534 } 527 535 … … 616 624 [self endBreak]; 617 625 } 618 session_t = 0;626 [self resetTimers]; 619 627 } 620 628 -
trunk/Cocoa/AntiRSI/English.lproj/MainMenu.nib/info.nib
r330 r331 21 21 <array> 22 22 <integer>21</integer> 23 <integer>259</integer> 23 24 </array> 24 25 <key>IBSystem Version</key>
Note:
See TracChangeset
for help on using the changeset viewer.