Skip to content

Commit

Permalink
0.21 - ticking sound and global hotkeys added
Browse files Browse the repository at this point in the history
  • Loading branch information
Ugo Landini committed Jun 7, 2009
1 parent 6c43700 commit d26b3a4
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 29 deletions.
21 changes: 10 additions & 11 deletions About.xib
Expand Up @@ -8,7 +8,6 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="450"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -39,14 +38,14 @@
<object class="NSWindowTemplate" id="227449490">
<int key="NSWindowStyleMask">8211</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{196, 164}, {496, 346}}</string>
<string key="NSWindowRect">{{196, 116}, {496, 394}}</string>
<int key="NSWTFlags">603979776</int>
<string key="NSWindowTitle">About Pomodoro</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="248242209">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand All @@ -65,7 +64,7 @@
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
<string key="NSFrame">{{15, 208}, {97, 152}}</string>
<string key="NSFrame">{{15, 256}, {97, 152}}</string>
<reference key="NSSuperview" ref="248242209"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="114470227">
Expand All @@ -85,19 +84,20 @@
<object class="BGHUDLabel" id="472895183">
<reference key="NSNextResponder" ref="248242209"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{117, 20}, {362, 306}}</string>
<string key="NSFrame">{{117, 34}, {362, 340}}</string>
<reference key="NSSuperview" ref="248242209"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="205747786">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">1279263744</int>
<string type="base64-UTF8" key="NSContents">UG9tb2Rvcm8gRGVza3RvcCDigKhyZWxlYXNlIDAuMjAg4oCoMDUvMDYvMjAwOeKAqCAK4oCoQ3JlYXRl
<string type="base64-UTF8" key="NSContents">UG9tb2Rvcm8gRGVza3RvcCDigKhyZWxlYXNlIDAuMjEg4oCoMDcvMDYvMjAwOeKAqCAK4oCoQ3JlYXRl
ZCBieSBVZ28gTGFuZGluaeKAqGh0dHA6Ly9wb21vZG9yby51Z29sYW5kaW5pLmNvbeKAqApjb3B5cmln
aHQgKGMpIDIwMDksIFVnbyBMYW5kaW5pCgpncmFwaGljIGRlc2lnbiBieSBTdGVmYW5vIExpbmd1ZXJy
aQpodHRwOi8vd3d3LmVsamVrby5uZXQvCgpyZWxlYXNlZCB1bmRlciBCU0QgTGljZW5zZQpUaGlzIHNv
ZnR3YXJlIGNvbnRhaW5zIHBvcnRpb25zIG9mIEJTRCBsaWNlbnNlZCBjb2RlOgpHcm93bCBmcmFtZXdv
cms6IGh0dHA6Ly9ncm93bC5pbmZvLwpCR0h1ZCBBcHBraXQ6IGh0dHA6Ly9jb2RlLmdvb2dsZS5jb20v
cC9iZ2h1ZGFwcGtpdC8KA</string>
cC9iZ2h1ZGFwcGtpdC8KClRoaXMgc29mdHdhcmUgY29udGFpbnMgc291bmRzIGZyb206Cmh0dHA6Ly93
d3cuZnJlZXNvdW5kLm9yZw</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">1.300000e+01</double>
Expand All @@ -121,8 +121,7 @@ cC9iZ2h1ZGFwcGtpdC8KA</string>
<string key="themeKey">gradientTheme</string>
</object>
</object>
<string key="NSFrameSize">{496, 346}</string>
<reference key="NSSuperview"/>
<string key="NSFrameSize">{496, 394}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
Expand Down Expand Up @@ -240,9 +239,9 @@ cC9iZ2h1ZGFwcGtpdC8KA</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>{{100, 218}, {496, 346}}</string>
<string>{{100, 170}, {496, 394}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{100, 218}, {496, 346}}</string>
<string>{{100, 170}, {496, 394}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down
74 changes: 68 additions & 6 deletions English.lproj/MainMenu.xib
Expand Up @@ -103,6 +103,29 @@
<string key="themeKey">gradientTheme</string>
</object>
</object>
<object class="NSButton" id="297421714">
<reference key="NSNextResponder" ref="157430883"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 193}, {231, 18}}</string>
<reference key="NSSuperview" ref="157430883"/>
<bool key="NSEnabled">YES</bool>
<object class="BGHUDButtonCell" key="NSCell" id="286959858">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Ticking sound</string>
<reference key="NSSupport" ref="284816210"/>
<reference key="NSControlView" ref="297421714"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="227150842"/>
<reference key="NSAlternateImage" ref="383743416"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
<string key="themeKey">gradientTheme</string>
</object>
</object>
<object class="NSComboBox" id="764427420">
<reference key="NSNextResponder" ref="157430883"/>
<int key="NSvFlags">268</int>
Expand Down Expand Up @@ -1738,7 +1761,8 @@
<object class="NSMenuItem" id="601187434">
<reference key="NSMenu" ref="740126098"/>
<string key="NSTitle">Start pomodoro</string>
<string key="NSKeyEquiv"/>
<string type="base64-UTF8" key="NSKeyEquiv">75yAA</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="849301394"/>
<reference key="NSMixedImage" ref="973900610"/>
Expand All @@ -1747,7 +1771,8 @@
<reference key="NSMenu" ref="740126098"/>
<bool key="NSIsDisabled">YES</bool>
<string key="NSTitle">Reset pomodoro</string>
<string key="NSKeyEquiv"/>
<string type="base64-UTF8" key="NSKeyEquiv">75yBA</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="849301394"/>
<reference key="NSMixedImage" ref="973900610"/>
Expand All @@ -1766,7 +1791,8 @@
<reference key="NSMenu" ref="740126098"/>
<bool key="NSIsDisabled">YES</bool>
<string key="NSTitle">Interrupt pomodoro</string>
<string key="NSKeyEquiv"/>
<string type="base64-UTF8" key="NSKeyEquiv">75yCA</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="849301394"/>
<reference key="NSMixedImage" ref="973900610"/>
Expand All @@ -1775,7 +1801,8 @@
<reference key="NSMenu" ref="740126098"/>
<bool key="NSIsDisabled">YES</bool>
<string key="NSTitle">Resume pomodoro</string>
<string key="NSKeyEquiv"/>
<string type="base64-UTF8" key="NSKeyEquiv">75yDA</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="849301394"/>
<reference key="NSMixedImage" ref="973900610"/>
Expand Down Expand Up @@ -2979,6 +3006,22 @@
</object>
<int key="connectionID">709</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.tickEnabled</string>
<reference key="source" ref="297421714"/>
<reference key="destination" ref="227004176"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="297421714"/>
<reference key="NSDestination" ref="227004176"/>
<string key="NSLabel">value: values.tickEnabled</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">values.tickEnabled</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">713</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Expand Down Expand Up @@ -3100,6 +3143,7 @@
<reference ref="215635118"/>
<reference ref="626920907"/>
<reference ref="886871155"/>
<reference ref="297421714"/>
</object>
<reference key="parent" ref="286061383"/>
</object>
Expand Down Expand Up @@ -3981,6 +4025,20 @@
<reference key="object" ref="1002813655"/>
<reference key="parent" ref="826885453"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">710</int>
<reference key="object" ref="297421714"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="286959858"/>
</object>
<reference key="parent" ref="157430883"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">711</int>
<reference key="object" ref="286959858"/>
<reference key="parent" ref="297421714"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Expand Down Expand Up @@ -4123,6 +4181,8 @@
<string>658.IBPluginDependency</string>
<string>659.IBPluginDependency</string>
<string>660.IBPluginDependency</string>
<string>710.IBPluginDependency</string>
<string>711.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -4235,7 +4295,7 @@
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>{{390, 520}, {191, 203}}</string>
<string>{{390, 520}, {233, 203}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down Expand Up @@ -4272,6 +4332,8 @@
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
Expand All @@ -4294,7 +4356,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">709</int>
<int key="maxID">713</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Expand Down
8 changes: 4 additions & 4 deletions Pomodoro.m
Expand Up @@ -126,16 +126,16 @@ - (void) checkIfBreakFinished {

- (void)oncePersecond:(NSTimer *)aTimer
{
//time--;
time=time-60;
time--;
//time=time-60;
[delegate oncePerSecond:time];
[self checkIfFinished];
}

- (void)oncePersecondBreak:(NSTimer *)aTimer
{
//time--;
time=time-60;
time--;
//time=time-60;
[delegate oncePerSecondBreak:time];
[self checkIfBreakFinished];
}
Expand Down
7 changes: 7 additions & 0 deletions PomodoroController.h
Expand Up @@ -59,6 +59,7 @@

NSImage* pomodoroImage;
NSSound* ringing;
NSSound* tick;
NSSpeechSynthesizer* speech;

GrowlNotifier* growl;
Expand All @@ -67,6 +68,12 @@

}

@property (nonatomic, readonly) NSMenuItem* startPomodoro;
@property (nonatomic, readonly) NSMenuItem* interruptPomodoro;
@property (nonatomic, readonly) NSMenuItem* invalidatePomodoro;
@property (nonatomic, readonly) NSMenuItem* resumePomodoro;


-(void) pomodoroStarted;

-(IBAction) about:(id)sender;
Expand Down

0 comments on commit d26b3a4

Please sign in to comment.