[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9128 - in trunk/gnue-forms/src: GFObjects input/displayHandlers
From: |
reinhard |
Subject: |
[gnue] r9128 - in trunk/gnue-forms/src: GFObjects input/displayHandlers |
Date: |
Tue, 12 Dec 2006 05:19:14 -0600 (CST) |
Author: reinhard
Date: 2006-12-12 05:19:13 -0600 (Tue, 12 Dec 2006)
New Revision: 9128
Modified:
trunk/gnue-forms/src/GFObjects/GFTabStop.py
trunk/gnue-forms/src/input/displayHandlers/Checkbox.py
trunk/gnue-forms/src/input/displayHandlers/Component.py
trunk/gnue-forms/src/input/displayHandlers/Cursor.py
trunk/gnue-forms/src/input/displayHandlers/DateTime.py
trunk/gnue-forms/src/input/displayHandlers/Image.py
trunk/gnue-forms/src/input/displayHandlers/Numeric.py
trunk/gnue-forms/src/input/displayHandlers/Password.py
Log:
Added "editing" parameter to build_display().
Modified: trunk/gnue-forms/src/GFObjects/GFTabStop.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFTabStop.py 2006-12-12 11:00:21 UTC (rev
9127)
+++ trunk/gnue-forms/src/GFObjects/GFTabStop.py 2006-12-12 11:19:13 UTC (rev
9128)
@@ -502,7 +502,7 @@
if not (index == self._visibleIndex \
and self._displayHandler.editing):
value = self._field.get_value(index - self._visibleIndex)
- display = self._displayHandler.build_display(value)
+ display = self._displayHandler.build_display(value, False)
self.uiWidget._ui_set_value_(index, display)
Modified: trunk/gnue-forms/src/input/displayHandlers/Checkbox.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Checkbox.py 2006-12-12
11:00:21 UTC (rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/Checkbox.py 2006-12-12
11:19:13 UTC (rev 9128)
@@ -146,6 +146,6 @@
return
- def build_display(self, value):
+ def build_display(self, value, editing):
return self._sanitizeValue(value)
Modified: trunk/gnue-forms/src/input/displayHandlers/Component.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Component.py 2006-12-12
11:00:21 UTC (rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/Component.py 2006-12-12
11:19:13 UTC (rev 9128)
@@ -37,6 +37,6 @@
if self.entry.type.lower() == 'url':
return value
- def build_display(self, value):
+ def build_display(self, value, editing):
if self.entry.type.lower() == 'url':
return value
Modified: trunk/gnue-forms/src/input/displayHandlers/Cursor.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Cursor.py 2006-12-12
11:00:21 UTC (rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/Cursor.py 2006-12-12
11:19:13 UTC (rev 9128)
@@ -674,7 +674,7 @@
# Build the display string
# -------------------------------------------------------------------------
- def build_display(self, value):
+ def build_display(self, value, editing):
"""
Build the display string from the user value.
"""
Modified: trunk/gnue-forms/src/input/displayHandlers/DateTime.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/DateTime.py 2006-12-12
11:00:21 UTC (rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/DateTime.py 2006-12-12
11:19:13 UTC (rev 9128)
@@ -56,8 +56,7 @@
self.__inputMask = inputMask
- # TODO: Replace with format mask
- def _buildDisplayHelper(self, value, editing):
+ def build_display(self, value, editing):
if editing:
if self.__inputMask:
format = self.__inputMask
@@ -117,5 +116,5 @@
return datetime.datetime(year, int(month), int(day))
- def build_display(self, value):
- return self._buildDisplayHelper(value, False)
+ def _buildDisplayHelper(self, value, editing):
+ return self.build_display(value, editing)
Modified: trunk/gnue-forms/src/input/displayHandlers/Image.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Image.py 2006-12-12 11:00:21 UTC
(rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/Image.py 2006-12-12 11:19:13 UTC
(rev 9128)
@@ -52,7 +52,7 @@
"""
BaseCursor.__init__(self, entry, eventHandler, subEventHandler)
- def _buildDisplayHelper(self, value, editing):
+ def build_display(self, value, editing):
"""
Opens and returns a PIL Image for the requested url
@@ -75,5 +75,5 @@
image = PILImage.new("RGB", (1, 1, ))
return image
- def build_display(self, value):
- return self._buildDisplayHelper(value, False)
+ def _buildDisplayHelper(self, value, editing):
+ return self.build_display(value, editing)
Modified: trunk/gnue-forms/src/input/displayHandlers/Numeric.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Numeric.py 2006-12-12
11:00:21 UTC (rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/Numeric.py 2006-12-12
11:19:13 UTC (rev 9128)
@@ -40,7 +40,6 @@
BaseCursor.__init__(self, entry, eventHandler, subEventHandler)
- # TODO: Replace with format mask
def _buildDisplayHelper(self, val, editing):
try:
if val in (None, ""):
@@ -51,8 +50,6 @@
if editing and type(val) == types.StringType:
return val
-# if float(val) == val:
-# try:
value = val
try:
if int(value) == value:
@@ -63,28 +60,6 @@
value = "%s" % value
except ValueError:
value = "%s" % value
-# else:
-# value = "%s" % val
-# 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
return value
Modified: trunk/gnue-forms/src/input/displayHandlers/Password.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Password.py 2006-12-12
11:00:21 UTC (rev 9127)
+++ trunk/gnue-forms/src/input/displayHandlers/Password.py 2006-12-12
11:19:13 UTC (rev 9128)
@@ -65,7 +65,7 @@
self.generateRefreshEvent()
- def _buildDisplayHelper(self, value, editing):
+ def build_display(self, value, editing):
"""
Builds a string that represents what should be
displayed for the field.
@@ -77,5 +77,5 @@
else:
return "*" * len(str(value))
- def build_display(self, value):
- return self._buildDisplayHelper(value, False)
+ def _buildDisplayHelper(self, value, editing):
+ return self.build_display(value, editing)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9128 - in trunk/gnue-forms/src: GFObjects input/displayHandlers,
reinhard <=