Your message dated Sun, 24 Feb 2008 09:23:26 +0100
with message-id <[EMAIL PROTECTED]>
has caused the report #465771,
regarding xdaliclock: -countdown should strip leading 0 in 12-hour mode
to be marked as having been forwarded to the upstream software
author(s) Jamie Zawinski <[EMAIL PROTECTED]>
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
465771: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465771
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Hello Peter, hello Jamie,
[ cf. http://bugs.debian.org/465771 ]
I, for one, actually like the leading zero. For me it makes the display
feel complete when using 24 hour mode.
Jamie, what do you think?
Cheers,
Flo
--- Begin Message ---
Package: xdaliclock
Version: 2.25-1
Severity: minor
Tags: patch
'xdaliclock -countdown' automatically enables 24-hour mode, so that the
number of hours is always displayed correctly. However, 24-hour mode
also implies a leading 0 in the hours column, which I do not want.
Thus I'd like for 'xdaliclock -12 -countdown' to have its usual effect
of saying "4:33" instead of "04:33".
The following patch fixes this. The command line I use for testing:
xdaliclock -12 -title 'Can we go home yet?' -countdown "$(LC_TIME=C date +'%b
%d 17:00:00 %Y')"
--
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
--- xdaliclock-2.25/X11/digital.c
+++ xdaliclock-2.25/X11/digital.c
@@ -735,10 +735,12 @@
tm->tm_sec = delta % 60;
tm->tm_min = (delta / 60) % 60;
tm->tm_hour = (delta / (60 * 60)) % 100;
- twelve_hour_time = 0;
}
- if (twelve_hour_time && tm->tm_hour > 12) tm->tm_hour -= 12;
- if (twelve_hour_time && tm->tm_hour == 0) tm->tm_hour = 12;
+ else
+ {
+ if (twelve_hour_time && tm->tm_hour > 12) tm->tm_hour -= 12;
+ if (twelve_hour_time && tm->tm_hour == 0) tm->tm_hour = 12;
+ }
time_digits [0] = (tm->tm_hour - (tm->tm_hour % 10)) / 10;
time_digits [1] = tm->tm_hour % 10;
time_digits [2] = (tm->tm_min - (tm->tm_min % 10)) / 10;
--- End Message ---
signature.asc
Description: Digital signature
--- End Message ---