[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue gnue-common/src/FormatMasks/DateMask.py gn...
From: |
Jason Cater |
Subject: |
gnue gnue-common/src/FormatMasks/DateMask.py gn... |
Date: |
Fri, 12 Oct 2001 20:06:18 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/10/12 20:06:18
Modified files:
gnue-common/src/FormatMasks: DateMask.py
gnuef/src : GFForm.py UIbase.py UIwxpython.py
gnuef/src/GFObjects: GFEntry.py
Log message:
synching machines (I hope it doesn't break)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/FormatMasks/DateMask.py.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&tr1=1.124&tr2=1.125&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/UIbase.py.diff?cvsroot=OldCVS&tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/UIwxpython.py.diff?cvsroot=OldCVS&tr1=1.112&tr2=1.113&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFEntry.py.diff?cvsroot=OldCVS&tr1=1.23&tr2=1.24&r1=text&r2=text
Patches:
Index: gnue/gnue-common/src/FormatMasks/DateMask.py
diff -u gnue/gnue-common/src/FormatMasks/DateMask.py:1.7
gnue/gnue-common/src/FormatMasks/DateMask.py:1.8
--- gnue/gnue-common/src/FormatMasks/DateMask.py:1.7 Thu Oct 11 00:36:08 2001
+++ gnue/gnue-common/src/FormatMasks/DateMask.py Fri Oct 12 20:06:18 2001
@@ -127,6 +127,8 @@
else:
nv = "%s%s%s" % (nv[:pos],str,nv[pos+replaces:])
+ GDebug.printMesg(15,"inputMaskPos=%s" % self.inputMaskPos)
+
section = 0
while section < len(self.inputMaskPos) and \
self.inputMaskPos[section] < pos:
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.124 gnue/gnuef/src/GFForm.py:1.125
--- gnue/gnuef/src/GFForm.py:1.124 Thu Oct 11 00:36:08 2001
+++ gnue/gnuef/src/GFForm.py Fri Oct 12 20:06:18 2001
@@ -417,13 +417,13 @@
#
def moveCursor(self, position):
if position == 'end':
- self._currentEntry._cursorPosition = len(self._currentEntry.getDisplay())
+ self._currentEntry._cursorPosition =
len(self._currentEntry.getDisplay(hasFocus=1))
elif position == 'home':
self._currentEntry._cursorPosition = 0
elif position == 'left' and self._currentEntry._cursorPosition > 0:
self._currentEntry._cursorPosition =
self._currentEntry._cursorPosition - 1
elif position == 'right':
- if self._currentEntry._cursorPosition <
len(self._currentEntry.getDisplay()):
+ if self._currentEntry._cursorPosition <
len(self._currentEntry.getDisplay(hasFocus=1)):
self._currentEntry._cursorPosition= self._currentEntry._cursorPosition
+ 1
def replaceValue(self,object, value):
@@ -441,7 +441,7 @@
# Hack!
self.dispatchEvent(GFEvent('updateDETAILBLOCK',self._currentBlock))
-
+
#
# keyPress
#
@@ -450,23 +450,23 @@
#
def keyPress(self, value):
modified = 0
-
+
if (self._currentEntry != None):
currentvalue = self._currentEntry.getValue()
if ord(value) == 13:
if self._currentEntry.height > 1: value = '\n';
- else: return modified
+ else: return modified
if hasattr(self._currentEntry,'foreign_key_description') and
hasattr(self._currentEntry,'style') and (self._currentEntry.style=='dropdown'):
value= self._currentEntry.findClosestValue(value)
if not value: return modified
-
+
self._currentEntry.processTrigger('pre-change')
self._currentEntry.setValue(value)
self._currentEntry.processTrigger('post-change')
modified = 1
return modified
-
+
if self._currentEntry._lowercase:
value = string.lower(value)
if self._currentEntry._uppercase:
@@ -474,27 +474,35 @@
if hasattr(self._currentEntry,'max_length'):
if len(currentvalue) >= int(self._currentEntry.max_length):
return modified
-
+
if self._currentEntry._numeric and self._currentBlock.mode == 'normal':
if not (value in string.digits or value in '.'):
return modified
-
+
if self._insertMode == 1:
- currentvalue = currentvalue[:self._currentEntry._cursorPosition] +
value + \
+ if self._currentEntry._maskHandler:
+ currentvalue =
self._currentEntry._maskHandler.processEdit(currentvalue, value,
+ self._currentEntry._cursorPosition)
+ else:
+ currentvalue = currentvalue[:self._currentEntry._cursorPosition] +
value + \
currentvalue[self._currentEntry._cursorPosition:]
else:
- currentvalue = currentvalue[:self._currentEntry._cursorPosition] +
value + \
+ if self._currentEntry._maskHandler:
+ currentvalue =
self._currentEntry._maskHandler.processEdit(currentvalue, value,
+ self._currentEntry._cursorPosition,1)
+ else:
+ currentvalue = currentvalue[:self._currentEntry._cursorPosition] +
value + \
currentvalue[self._currentEntry._cursorPosition+1:]
-
+
self._currentEntry._cursorPosition += 1
self._currentEntry.processTrigger('pre-change')
self._currentEntry.setValue(currentvalue)
self._currentEntry.processTrigger('post-change')
-
+
modified = 1
-
+
return modified
-
+
#
# removeCharacter
#
Index: gnue/gnuef/src/GFObjects/GFEntry.py
diff -u gnue/gnuef/src/GFObjects/GFEntry.py:1.23
gnue/gnuef/src/GFObjects/GFEntry.py:1.24
--- gnue/gnuef/src/GFObjects/GFEntry.py:1.23 Thu Oct 11 00:36:08 2001
+++ gnue/gnuef/src/GFObjects/GFEntry.py Fri Oct 12 20:06:18 2001
@@ -199,7 +199,8 @@
return str(v)
else:
if hasFocus:
- return self._maskHandler.getFormattedInput(v)
+ GDebug.printMesg(15,"calling getFormattedInput with '%s'" % v)
+ return self._maskHandler.getFormattedInput(v, "_")
else:
return self._maskHandler.getFormattedOutput(v, secondary=1)
Index: gnue/gnuef/src/UIbase.py
diff -u gnue/gnuef/src/UIbase.py:1.45 gnue/gnuef/src/UIbase.py:1.46
--- gnue/gnuef/src/UIbase.py:1.45 Thu Oct 11 00:36:08 2001
+++ gnue/gnuef/src/UIbase.py Fri Oct 12 20:06:18 2001
@@ -16,7 +16,7 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2000 Free Software Foundation
+# Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# UIbase.py
@@ -284,7 +284,7 @@
style = 'text'
# Fill the prior spots
- if block.mode != 'query':
+ if block.mode != 'query':
for count in range(index):
value =
block._resultSet.getRecord(currentRecord-(index-count)).getField(event.data.field)
if value == None: value = ""
@@ -295,7 +295,7 @@
if value in (1,'1','T','t','TRUE','true'):
value = 1
else:
- value = 0
+ value = 0
self._formToUIWidget[event.data].setValue(value,count)
@@ -303,7 +303,7 @@
if style == 'dropdown':
value = event.data.allowedValues()["%s" % event.data.getValue()]
else:
- value = event.data.getDisplay()
+ value = event.data.getDisplay(hasFocus=1)
value = str(value) # Done to remove unicode types which wxpython doesn't
like
if style == 'checkbox':
@@ -341,7 +341,7 @@
if value in (1,'1','T','t','TRUE','true'):
value = 1
else:
- value = 0
+ value = 0
self._formToUIWidget[event.data].setValue(value, count)
count = count +1
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.112 gnue/gnuef/src/UIwxpython.py:1.113
--- gnue/gnuef/src/UIwxpython.py:1.112 Tue Oct 9 09:35:12 2001
+++ gnue/gnuef/src/UIwxpython.py Fri Oct 12 20:06:18 2001
@@ -16,7 +16,7 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2000 Free Software Foundation
+# Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# UIwxpython