After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 77186 - april fools joke should stop at midday
april fools joke should stop at midday
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: fish
2.0.x
Other other
: Normal minor
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-04-01 10:00 UTC by Christian Marillat
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Marillat 2002-04-01 10:00:00 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);
=====
Comment 1 Kjartan Maraas 2002-08-16 19:48:19 UTC
Ok. This is cute. Is this correct all over the world or just in some
countries?
Comment 2 Christian Marillat 2002-08-16 20:00:03 UTC
Never heard that in France. The bug submiter is an aussie

http://bugs.debian.org/140743
Comment 3 Kjartan Maraas 2002-08-17 10:09:35 UTC
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?
Comment 4 Kjartan Maraas 2002-10-13 14:33:48 UTC
Moving for comments.
Comment 5 Mark McLoughlin 2002-10-14 06:02:06 UTC
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.