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 ---

Attachment: signature.asc
Description: Digital signature

Reply via email to