GNOME Bugzilla – Bug 77186
april fools joke should stop at midday
Last modified: 2004-12-22 21:47:04 UTC
Hi, The "fish_applet" panel applet has code for an April Fools joke (the fish is dead because you didn't change its water). The code currently continues this joke for the entire 24-hour period of 1-Apr. By the tradition of April Fools Day, anyone who starts or continues a joke after midday is a bigger fool than the one on whom the joke is played. The code should set the joke only between the hours of 00:00 and 11:59 on 1-Apr. The following patch to applets/fish/fish.c will set april_fools only between the hours of midnight and midday on 1-Apr. ===== --- fish.c.orig Fri Oct 26 19:12:51 2001 +++ fish.c Mon Apr 1 13:36:59 2002 @@ -27,6 +27,7 @@ #define sure_string(__x) ((__x)!=NULL?(__x):"") int fools_day=1, fools_month=3; +int fools_hour_start=0, fools_hour_end=12; typedef struct _FishProp FishProp; struct _FishProp { @@ -365,14 +366,14 @@ tm = localtime(&ourtime); if(fish->april_fools) { - if(tm->tm_mon != fools_month || tm->tm_mday != fools_day) { + if(tm->tm_mon != fools_month || tm->tm_mday != fools_day || tm->tm_hour >= fools_hour_end) { fish->april_fools = FALSE; load_image_file(fish); setup_size(fish); fish_timeout(fish); } } else { - if(tm->tm_mon == fools_month && tm->tm_mday == fools_day) { + if(tm->tm_mon == fools_month && tm->tm_mday == fools_day && tm->tm_hour >= fools_hour_start && tm->tm_hour < fools_hour_end) { fish->april_fools = TRUE; load_image_file(fish); setup_size(fish); =====
Ok. This is cute. Is this correct all over the world or just in some countries?
Never heard that in France. The bug submiter is an aussie http://bugs.debian.org/140743
I think this is too much of a corner case to be fixed in 1.4.x. Is it worth moving it to gnome-applets 2.0.x?
Moving for comments.
Fixed, thanks. 2002-10-14 Mark McLoughlin <mark@skynet.ie> * fish.c: (fish_timeout): stop the april fools joke at midday - #77186. Based on patch by Christian Marrilat.