Index: /trunk/Cocoa/AntiRSI/AntiRSI.h
===================================================================
--- /trunk/Cocoa/AntiRSI/AntiRSI.h	(revision 328)
+++ /trunk/Cocoa/AntiRSI/AntiRSI.h	(revision 329)
@@ -22,4 +22,8 @@
 #import "AntiRSIView.h"
 
+#define sLatestVersionURL @"http://tech.inhelsinki.nl/antirsi/antirsi_version.txt"
+#define sURL @"http://tech.inhelsinki.nl/antirsi/"
+#define sVersion @"1.4"
+
 typedef enum _AntiRSIState {
 	s_normal = 0,
@@ -37,4 +41,5 @@
 	IBOutlet NSTextField *next_break;
     IBOutlet NSTextField *status;
+	IBOutlet NSTextField *version;
     
 	// dock icon image
@@ -53,4 +58,6 @@
 	double micro_pause_taking_t;
 	double work_break_taking_t;
+	double work_break_taking_cached_t;
+	double work_break_taking_cached_date;
 	double date;
 		
@@ -92,4 +99,9 @@
 - (void)setBackground:(NSColor *)c;
 
+// goto website button
+- (IBAction)gotoWebsite:(id)sender;
+
+// check updates
+- (IBAction)checkForUpdate:(id)sender;
 
 // postpone button
Index: /trunk/Cocoa/AntiRSI/AntiRSI.m
===================================================================
--- /trunk/Cocoa/AntiRSI/AntiRSI.m	(revision 328)
+++ /trunk/Cocoa/AntiRSI/AntiRSI.m	(revision 329)
@@ -139,4 +139,6 @@
 	micro_pause_taking_t = 0;
 	work_break_taking_t = 0;
+	work_break_taking_cached_t = 0;
+	work_break_taking_cached_date = 0;
 	
 	// initialize dock image
@@ -177,5 +179,5 @@
 	[initial setObject:[NSNumber numberWithFloat:50] forKey:@"work_break_period"];
 	[initial setObject:[NSNumber numberWithFloat:8] forKey:@"work_break_duration"];
-	[initial setObject:@"Normal" forKey:@"sample_interval"];
+	[initial setObject:@"Smooth" forKey:@"sample_interval"];
 	[initial setObject:[NSNumber numberWithBool:YES] forKey:@"draw_dock_image"];
 	[initial setObject:[NSNumber numberWithBool:NO] forKey:@"lock_focus"];
@@ -204,4 +206,7 @@
 	// start the timer
 	[self installTimer:sample_interval];
+	
+	// about dialog
+	[version setStringValue:[NSString stringWithFormat:@"Version %@", sVersion]]; 
 }
 
@@ -228,4 +233,5 @@
 	}
 	
+	// just did a whole micropause beyond normal time
 	if (tick_time > micro_pause_duration && s_taking_work_break != state) {
 		// set micro_pause timers to 0
@@ -274,4 +280,8 @@
 				work_break_t += tick_time;
 				micro_pause_taking_t = 0;
+				if (work_break_taking_t > 0) {
+					work_break_taking_cached_t = work_break_taking_t;
+					work_break_taking_cached_date = date;
+				}
 				work_break_taking_t = 0;
 			} else if (micro_pause_t > 0) {
@@ -294,5 +304,5 @@
 				micro_pause_t = 0;
 				work_break_t = 0;
-				//micro_pause_taking_t stays put
+				// micro_pause_taking_t stays put
 				// work_break_taking_t stays put
 			}
@@ -495,4 +505,9 @@
 {
 	work_break_taking_t = 0;
+	// incase you were already having an implicit work break and clicked the take work break now button
+	// not more then 20 seconds ago we took a natural break longer then 0.2 * normal work break duration 
+	if (date - work_break_taking_cached_date < 20 && work_break_taking_cached_t > work_break_duration * 0.2) {
+		work_break_taking_t = work_break_taking_cached_t;
+	} 
 	[status setStringValue:@"Work Break"];
 	[progress setMaxValue:work_break_duration / 60];
@@ -527,4 +542,40 @@
 }
 
+// goto website
+- (IBAction)gotoWebsite:(id)sender
+{
+	[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:sURL]];
+}
+
+// check for update
+- (IBAction)checkForUpdate:(id)sender
+{
+	NSString *latest_version =
+	[NSString stringWithContentsOfURL: [NSURL URLWithString:sLatestVersionURL]];
+	
+	if (latest_version == Nil) latest_version = @"";
+	latest_version = [latest_version stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+	
+	if ([latest_version length] == 0) {
+		NSRunInformationalAlertPanel(
+			@"Unable to Determine",
+			@"Unable to determine the latest AntiRSI version number.",
+			@"Ok", nil, nil);
+	} else if ([latest_version compare:sVersion] == NSOrderedDescending) {
+		int r = NSRunInformationalAlertPanel(
+			@"New Version",
+			[NSString stringWithFormat:@"A new version (%@) of AntiRSI is available; would you like to go to the website now?", latest_version],
+			@"Goto Website", @"Cancel", nil);
+		if (r == NSOKButton) {
+			[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:sURL]];
+		}
+    } else {
+    	NSRunInformationalAlertPanel(
+			@"No Update Available", 
+			@"This is the latest version of AntiRSI.", 
+			@"OK", nil, nil);
+    }
+}
+
 // stop work break and postpone by 10 minutes
 - (IBAction)postpone:(id)sender
@@ -534,4 +585,5 @@
 		micro_pause_taking_t = 0;
 		work_break_taking_t = 0;
+		work_break_taking_cached_t = 0;
 		work_break_t -= 10*60; // decrease with 10 minutes
 		if (work_break_t < 0) work_break_t = 0;
@@ -553,4 +605,8 @@
 	
 	if ([[anItem title] isEqualToString:@"Postpone Break"] && state == s_taking_work_break) {
+		return YES;
+	}
+	
+	if ([[anItem title] isEqualToString:@"AntiRSI Help"]) {
 		return YES;
 	}
Index: /trunk/Cocoa/AntiRSI/AntiRSI.xcodeproj/project.pbxproj
===================================================================
--- /trunk/Cocoa/AntiRSI/AntiRSI.xcodeproj/project.pbxproj	(revision 328)
+++ /trunk/Cocoa/AntiRSI/AntiRSI.xcodeproj/project.pbxproj	(revision 329)
@@ -244,8 +244,4 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
 				COPY_PHASE_STRIP = NO;
 				DEBUGGING_SYMBOLS = YES;
@@ -284,8 +280,4 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
 				COPY_PHASE_STRIP = YES;
 				DEPLOYMENT_LOCATION = NO;
@@ -320,8 +312,4 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
 				DEPLOYMENT_LOCATION = NO;
 				FRAMEWORK_SEARCH_PATHS = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Versions/A/Frameworks\"";
@@ -360,4 +348,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = (
+					ppc,
+					i386,
+				);
 				GCC_C_LANGUAGE_STANDARD = c99;
 			};
Index: /trunk/Cocoa/AntiRSI/AntiRSIView.m
===================================================================
--- /trunk/Cocoa/AntiRSI/AntiRSIView.m	(revision 328)
+++ /trunk/Cocoa/AntiRSI/AntiRSIView.m	(revision 329)
@@ -26,5 +26,5 @@
 {
     NSColor *bgColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.90];
-    NSRect bgRect = [self bounds];
+    NSRect bgRect = [self frame];
     int minX = NSMinX(bgRect);
     int midX = NSMidX(bgRect);
Index: /trunk/Cocoa/AntiRSI/English.lproj/MainMenu.nib/info.nib
===================================================================
--- /trunk/Cocoa/AntiRSI/English.lproj/MainMenu.nib/info.nib	(revision 328)
+++ /trunk/Cocoa/AntiRSI/English.lproj/MainMenu.nib/info.nib	(revision 329)
@@ -4,13 +4,13 @@
 <dict>
 	<key>IBDocumentLocation</key>
-	<string>35 305 441 309 0 0 1680 1028 </string>
+	<string>35 23 441 309 0 0 1024 746 </string>
 	<key>IBEditorPositions</key>
 	<dict>
 		<key>259</key>
-		<string>340 618 300 322 0 0 1680 1028 </string>
+		<string>490 507 300 322 0 0 1280 1002 </string>
 		<key>29</key>
-		<string>142 885 330 44 0 0 1680 1028 </string>
+		<string>194 823 330 44 0 0 1280 1002 </string>
 		<key>343</key>
-		<string>64 674 189 68 0 0 1680 1028 </string>
+		<string>84 540 189 68 0 0 1280 1002 </string>
 	</dict>
 	<key>IBFramework Version</key>
@@ -18,5 +18,4 @@
 	<key>IBOpenObjects</key>
 	<array>
-		<integer>438</integer>
 		<integer>343</integer>
 		<integer>259</integer>
@@ -24,5 +23,5 @@
 	</array>
 	<key>IBSystem Version</key>
-	<string>8I127</string>
+	<string>8G32</string>
 </dict>
 </plist>
Index: /trunk/Cocoa/AntiRSI/Info.plist
===================================================================
--- /trunk/Cocoa/AntiRSI/Info.plist	(revision 328)
+++ /trunk/Cocoa/AntiRSI/Info.plist	(revision 329)
@@ -18,5 +18,5 @@
 	<string>ONNE</string>
 	<key>CFBundleVersion</key>
-	<string>1.3</string>
+	<string>1.4</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
