[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:01:35 UTC 2012


The following commit has been merged in the wheezy branch:
commit f9ed71c4befbd0f678f1609d837bd56a3c482fc6
Author: Owen Rudge <orudge at codeweavers.com>
Date:   Thu Mar 8 11:34:38 2012 +0000

    comctl32/datetime: Fix AM/PM handling with 12-hour fields.
    (cherry picked from commit ffbdd27268f1b5c4bb1d57f1014f1512e4fc6cd5)

diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index f65691e..bfd5d5e 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -4,6 +4,7 @@
  * Copyright 1998, 1999 Eric Kohl
  * Copyright 1999, 2000 Alex Priem <alexp at sci.kun.nl>
  * Copyright 2000 Chris Morgan <cmorgan at wpi.edu>
+ * Copyright 2012 Owen Rudge for CodeWeavers
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -896,9 +897,20 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
             break;
         case ONEDIGIT12HOUR:
         case TWODIGIT12HOUR:
+            if (val >= 24)
+                val -= 20;
+
+            if (val >= 13)
+                date.wHour = val;
+            else if (val != 0) {
+                if (date.wHour >= 12) /* preserve current AM/PM state */
+                    date.wHour = (val == 12 ? 12 : val + 12);
+                else
+                    date.wHour = (val == 12 ? 0 : val);
+            }
+            break;
         case ONEDIGIT24HOUR:
         case TWODIGIT24HOUR:
-            /* FIXME: Preserve AM/PM for 12HOUR? */
             date.wHour = val;
             break;
         case ONEDIGITMINUTE:
@@ -1232,6 +1244,16 @@ DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode)
         else
             maxChars = 2;
 
+        if ((fieldSpec == ONEDIGIT12HOUR ||
+             fieldSpec == TWODIGIT12HOUR ||
+             fieldSpec == ONEDIGIT24HOUR ||
+             fieldSpec == TWODIGIT24HOUR) &&
+            (infoPtr->nCharsEntered == 1))
+        {
+            if (vkCode >= '3')
+                 maxChars = 1;
+        }
+
         if (maxChars == infoPtr->nCharsEntered)
             DATETIME_ApplySelectedField(infoPtr);
     }

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list