Bug#465771: [Fwd: Bug#465771: xdaliclock: -countdown should strip leading 0 in 12-hour mode]

2008-02-24 Thread Florian Ernst
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
---BeginMessage---

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


Bug#465771: [Fwd: Bug#465771: xdaliclock: -countdown should strip leading 0 in 12-hour mode]

2008-02-24 Thread Peter Samuelson

[Florian Ernst]
 I, for one, actually like the leading zero. For me it makes the
 display feel complete when using 24 hour mode.

At present, xdaliclock has a leading 0 in 24-hour mode and no leading 0
in 12-hour mode.  However, with the -countdown feature, there is no way
to disable the leading 0 from the command line, because the program
overrides -12.  (The reason it overrides -12 is to support counting
down more than 12 hours.)  What my patch does is to make '-countdown
-12' drop the leading 0, just like -12 does in normal mode, while
'-countdown -24' keeps it.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/


signature.asc
Description: Digital signature


Bug#465771: [Fwd: Bug#465771: xdaliclock: -countdown should strip leading 0 in 12-hour mode]

2008-02-24 Thread Jamie Zawinski
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?



I think it looks better with the leading zero.





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]