Skip to content

Commit

Permalink
Volume has now 1/100 precision
Browse files Browse the repository at this point in the history
  • Loading branch information
Ugo Landini committed Apr 26, 2011
1 parent 6d03b9e commit 9e215c6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Pomodoro.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@
698F4690133B5D4A00311E34 /* Controller */ = {
isa = PBXGroup;
children = (
698F45EB133B5AF900311E34 /* CommonController.h */,
698F45EC133B5AF900311E34 /* CommonController.m */,
698F45EF133B5AF900311E34 /* GettingThingsDoneController.h */,
698F45F0133B5AF900311E34 /* GettingThingsDoneController.m */,
698F45E1133B5AF900311E34 /* AboutController.h */,
Expand All @@ -511,8 +513,6 @@
698F45E4133B5AF900311E34 /* ApplescriptController.m */,
698F45E7133B5AF900311E34 /* CalendarController.h */,
698F45E8133B5AF900311E34 /* CalendarController.m */,
698F45EB133B5AF900311E34 /* CommonController.h */,
698F45EC133B5AF900311E34 /* CommonController.m */,
698F45F1133B5AF900311E34 /* GrowlController.h */,
698F45F2133B5AF900311E34 /* GrowlController.m */,
698F45F5133B5AF900311E34 /* LoginController.h */,
Expand Down
10 changes: 6 additions & 4 deletions Pomodoro/English.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -2827,7 +2827,7 @@
<int key="NSCellFlags2">0</int>
<string key="NSContents"/>
<reference key="NSControlView" ref="69538438"/>
<double key="NSMaxValue">10</double>
<double key="NSMaxValue">100</double>
<double key="NSMinValue">0.0</double>
<double key="NSValue">5</double>
<double key="NSAltIncValue">0.0</double>
Expand All @@ -2850,7 +2850,7 @@
<int key="NSCellFlags2">0</int>
<string key="NSContents"/>
<reference key="NSControlView" ref="500268142"/>
<double key="NSMaxValue">10</double>
<double key="NSMaxValue">100</double>
<double key="NSMinValue">0.0</double>
<double key="NSValue">5</double>
<double key="NSAltIncValue">0.0</double>
Expand All @@ -2873,7 +2873,7 @@
<int key="NSCellFlags2">0</int>
<string key="NSContents"/>
<reference key="NSControlView" ref="1022784245"/>
<double key="NSMaxValue">10</double>
<double key="NSMaxValue">100</double>
<double key="NSMinValue">0.0</double>
<double key="NSValue">5</double>
<double key="NSAltIncValue">0.0</double>
Expand Down Expand Up @@ -3011,6 +3011,7 @@
<string key="NSFrame">{{583, 59}, {26, 22}}</string>
<reference key="NSSuperview" ref="641868737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="625268019">
<int key="NSCellFlags">130560</int>
Expand Down Expand Up @@ -4611,7 +4612,7 @@
<int key="NSCellFlags2">0</int>
<string key="NSContents"/>
<reference key="NSControlView" ref="270335815"/>
<double key="NSMaxValue">10</double>
<double key="NSMaxValue">100</double>
<double key="NSMinValue">0.0</double>
<double key="NSValue">5</double>
<double key="NSAltIncValue">0.0</double>
Expand Down Expand Up @@ -4660,6 +4661,7 @@
</set>
<string key="NSFrame">{{617, 205}, {26, 22}}</string>
<reference key="NSSuperview" ref="1035004129"/>
<reference key="NSNextKeyView"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="654375238">
<int key="NSCellFlags">130560</int>
Expand Down
8 changes: 4 additions & 4 deletions Pomodoro/src/PomodoroController.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
NSInteger oldVolume = [[change objectForKey:NSKeyValueChangeOldKey] intValue];

if (volume != oldVolume) {
float newVolume = volume/10.0;
float newVolume = volume/100.0;
if ([keyPath isEqual:@"ringVolume"]) {
[ringing setVolume:newVolume];
[ringing play];
Expand Down Expand Up @@ -516,9 +516,9 @@ - (void)awakeFromNib {
[statusItem setImage:pomodoroImage];
[statusItem setAlternateImage:pomodoroNegativeImage];

[ringing setVolume:_ringVolume/10.0];
[ringingBreak setVolume:_ringBreakVolume/10.0];
[tick setVolume:_tickVolume/10.0];
[ringing setVolume:_ringVolume/100.0];
[ringingBreak setVolume:_ringBreakVolume/100.0];
[tick setVolume:_tickVolume/100.0];

[initialTimeCombo addItemWithObjectValue: [NSNumber numberWithInt:25]];
[initialTimeCombo addItemWithObjectValue: [NSNumber numberWithInt:30]];
Expand Down
8 changes: 4 additions & 4 deletions Pomodoro/src/PomodoroDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ + (void) setDefaults {

[defaultValues setObject:[NSNumber numberWithBool:NO] forKey:@"autoPomodoroRestart"];

[defaultValues setObject:[NSNumber numberWithInt:10] forKey:@"ringVolume"];
[defaultValues setObject:[NSNumber numberWithInt:10] forKey:@"ringBreakVolume"];
[defaultValues setObject:[NSNumber numberWithInt:8] forKey:@"voiceVolume"];
[defaultValues setObject:[NSNumber numberWithInt:2] forKey:@"tickVolume"];
[defaultValues setObject:[NSNumber numberWithInt:90] forKey:@"ringVolume"];
[defaultValues setObject:[NSNumber numberWithInt:90] forKey:@"ringBreakVolume"];
[defaultValues setObject:[NSNumber numberWithInt:80] forKey:@"voiceVolume"];
[defaultValues setObject:[NSNumber numberWithInt:20] forKey:@"tickVolume"];

[defaultValues setObject:[NSNumber numberWithBool:YES] forKey:@"showTimeOnStatusEnabled"];

Expand Down
2 changes: 1 addition & 1 deletion Pomodoro/src/SpeechController.m
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ - (void)awakeFromNib {
[speechEveryCombo addItemWithObjectValue: [NSNumber numberWithInt:10]];
voices = [[NSSpeechSynthesizer availableVoices] retain];

[speech setVolume:_voiceVolume/10.0];
[speech setVolume:_voiceVolume/100.0];

NSString* voice = [[NSString stringWithFormat:@"com.apple.speech.synthesis.voice.%@", _speechVoice] stringByReplacingOccurrencesOfString:@" "withString:@""];
[speech setVoice: voice];
Expand Down
7 changes: 6 additions & 1 deletion ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Release Notes
-------------

1.3.4
- Fixed a bug in statistics, now coredata is flushed on quit too
- New Preferences layout for Pomodoro tab, thx to Schlaefer
- Added quick stats menu item
- Added real duration to Calendar integration

1.3.3
- Fixed a bug in sound: ring and ringBreak ended up to be the same sound and can't be controlled separately (thx to James Huddleston)
- Disabled Things/Omnifocus default search at Pomodoro startup
Expand All @@ -13,7 +19,6 @@ Release Notes
- Fixed a bug in Pomodoro: when resumed from an interruption, real time counter was reset
- Amplified ring sound
- Implemented long break checker
- Implemented new SmartTimer, counting time also when in sleep
- Removed Makefile, didn't work anymore with Xcode 4 (different build directories)

1.3.1
Expand Down

0 comments on commit 9e215c6

Please sign in to comment.