AClock fork with republican time

Ingolf Jandt <[email protected]> Mon, 20 Nov 2006 18:25:13 +0100
Newsgroups gmane.comp.lib.gnustep.general,gmane.comp.lib.gnustep.applications
Message-ID <d6ab2a7cc18ac14f95484df4a73db701@pingi-desktop>
Attached you find a diff for AClock.app version 0.2.3 with the minimal 
changes to make it show French republican/revolution time (10 hours, 
100min, 100sec) instead of the traditional clock (2*12 hours, 60m, 
60s). The app name is changed to RClock.app to avoid overwriting the 
existing one and permit playing around with settings.

(I did not touch the arc code, as I never use the arc.)

(The AClock drawing code is a bit er ... untidy.)

== Why? ==
Fun.

Ingolf


<rclock.diff>

_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep
rclock.diff (text/plain, 3.2 KB)
Gemeinsame Unterverzeichnisse: aclock-0.2.3/AClock.gorm und RClock-0.1/AClock.gorm.
diff aclock-0.2.3/AppController.m RClock-0.1/AppController.m
189c189
< 	    registerDefaults:[NSDictionary dictionaryWithObject:@"0.1" forKey:@"RefreshRate"]];
---
> 	    registerDefaults:[NSDictionary dictionaryWithObject:@"0.0864" forKey:@"RefreshRate"]];
diff aclock-0.2.3/Clock.m RClock-0.1/Clock.m
23,24c23,24
< 	numArray[0] = [NSArray arrayWithObjects:@"XII",@"I",@"II",@"III",@"IV",@"V",@"VI",@"VII",@"VIII",@"IX",@"X",@"XI",nil];
< 	numArray[1] = [NSArray arrayWithObjects:@"12",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",nil];
---
> 	numArray[0] = [NSArray arrayWithObjects:@"X",@"I",@"II",@"III",@"IV",@"V",@"VI",@"VII",@"VIII",@"IX",@"X",@"XI",nil];
> 	numArray[1] = [NSArray arrayWithObjects:@"10",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",nil];
36c36
< 	[defaults registerDefaults:[NSDictionary dictionaryWithObject:@"YES" forKey:@"ShowAMPM"]];
---
> 	[defaults registerDefaults:[NSDictionary dictionaryWithObject:@"NO" forKey:@"ShowAMPM"]];
424c424
< 				for (i=0;i<60;i++)
---
> 				for (i=0;i<100;i++)
426c426
< 					if (i%5)
---
> 					if (i%10)
428c428
< 						a=i/60.0*2*PI;
---
> 						a=i/100.0*2*PI;
436c436
< 			for (i=0;i<12;i++)
---
> 			for (i=0;i<10;i++)
438c438
< 				a=i/12.0*2*PI;
---
> 				a=i/10.0*2*PI;
588c588
< 				seconds=handsTime-60*floor(handsTime/60);
---
> 				seconds=handsTime-100*floor(handsTime/100);
593c593
< 				seconds/=60;
---
> 				seconds/=100;
601c601
< 				seconds=handsTime-60*floor(handsTime/60)+30;
---
> 				seconds=handsTime-100*floor(handsTime/100)+50;
606c606
< 				seconds/=60;
---
> 				seconds/=100;
623,624c623,624
< 			minutes=handsTime-3600*floor(handsTime/3600);
< 			minutes/=3600;
---
> 			minutes=handsTime-10000*floor(handsTime/10000);
> 			minutes/=10000;
634,635c634,635
< 			hours=handsTime-43200*floor(handsTime/43200);
< 			hours/=3600*12;
---
> 			hours=handsTime-100000*floor(handsTime/100000);
> 			hours/=100000;
675,676c675,676
< 		minutes=handsTime-3600*floor(handsTime/3600);
< 		minutes/=3600;
---
> 		minutes=handsTime-10000*floor(handsTime/10000);
> 		minutes/=10000;
686,687c686,687
< 		hours=handsTime-43200*floor(handsTime/43200);
< 		hours/=3600*12;
---
> 		hours=handsTime-100000*floor(handsTime/100000);
> 		hours/=100000;
723c723
< 			seconds=handsTime-60*floor(handsTime/60);
---
> 			seconds=handsTime-100*floor(handsTime/100);
728c728
< 			seconds/=60;
---
> 			seconds/=100;
736c736
< 			seconds=handsTime-60*floor(handsTime/60)+30;
---
> 			seconds=handsTime-100*floor(handsTime/100)+50;
741c741
< 			seconds/=60;
---
> 			seconds/=100;
871c871
< 	handsTime=time;
---
> 	handsTime=time*(1000/864.0);
diff aclock-0.2.3/GNUmakefile RClock-0.1/GNUmakefile
3,7c3,7
< PACKAGE_NAME = AClock
< VERSION = 0.2.1
< APP_NAME = AClock
< AClock_MAIN_MODEL_FILE=AClock.gorm
< AClock_APPLICATION_ICON=AClock.tiff
---
> PACKAGE_NAME = RClock
> VERSION = 0.1
> APP_NAME = RClock
> RClock_MAIN_MODEL_FILE=AClock.gorm
> RClock_APPLICATION_ICON=AClock.tiff
9,10c9,10
< AClock_OBJC_FILES = main.m Clock.m AppController.m
< AClock_RESOURCE_FILES = AClock.gorm AClock.tiff
---
> RClock_OBJC_FILES = main.m Clock.m AppController.m
> RClock_RESOURCE_FILES = AClock.gorm AClock.tiff