commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5517 - trunk/gnue-forms/src


From: jcater
Subject: r5517 - trunk/gnue-forms/src
Date: Thu, 25 Mar 2004 18:57:15 -0600 (CST)

Author: jcater
Date: 2004-03-25 18:57:14 -0600 (Thu, 25 Mar 2004)
New Revision: 5517

Modified:
   trunk/gnue-forms/src/GFDisplayHandler.py
Log:
disabled default comma-fying of number fields (at least until masks work)

Modified: trunk/gnue-forms/src/GFDisplayHandler.py
===================================================================
--- trunk/gnue-forms/src/GFDisplayHandler.py    2004-03-25 23:42:13 UTC (rev 
5516)
+++ trunk/gnue-forms/src/GFDisplayHandler.py    2004-03-26 00:57:14 UTC (rev 
5517)
@@ -600,27 +600,27 @@
     except OverflowError:
       value = "%s" % value
 
-    if not editing:
-      # Comma-fy (Temporary!)
-      if value[:1] == '-':
-        minus = "-"
-        value = value[1:]
-      else:
-        minus = ""
+#     if not editing:
+#       # Comma-fy (Temporary!)
+#       if value[:1] == '-':
+#         minus = "-"
+#         value = value[1:]
+#       else:
+#         minus = ""
+#
+#       try:
+#         whole, decimal = string.split(value,'.')
+#         value = ".%s" % decimal
+#       except ValueError:
+#         whole = value
+#         value = ""
+#
+#       while len(whole) > 3:
+#         value = ",%s%s" % (whole[-3:], value)
+#         whole = whole[:-3]
+#
+#       value = minus + whole + value
 
-      try:
-        whole, decimal = string.split(value,'.')
-        value = ".%s" % decimal
-      except ValueError:
-        whole = value
-        value = ""
-
-      while len(whole) > 3:
-        value = ",%s%s" % (whole[-3:], value)
-        whole = whole[:-3]
-
-      value = minus + whole + value
-
     return value
 
 
@@ -736,7 +736,7 @@
   def beginEdit(self, event):
     if self.editing == True and self.modified == False:
       return
-    
+
     if not self._loadedAllowedValues and not 
hasattr(self.field,'_allowedValues'):
       self.field.allowedValues()
       self._loadedAllowedValues = True





reply via email to

[Prev in Thread] Current Thread [Next in Thread]