commit-gnue
[Top][All Lists]
Advanced

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

gnue common/etc/sample.gnue.conf forms/src/GFDi...


From: Jason Cater
Subject: gnue common/etc/sample.gnue.conf forms/src/GFDi...
Date: Sat, 16 Feb 2002 09:55:52 -0500

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/02/16 09:55:52

Modified files:
        common/etc     : sample.gnue.conf 
        forms/src      : GFDisplayHandler.py 

Log message:
        more work on input handler [synching machines]

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/etc/sample.gnue.conf.diff?cvsroot=OldCVS&tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFDisplayHandler.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gnue/common/etc/sample.gnue.conf
diff -c gnue/common/etc/sample.gnue.conf:1.16 
gnue/common/etc/sample.gnue.conf:1.17
*** gnue/common/etc/sample.gnue.conf:1.16       Fri Feb 15 22:58:59 2002
--- gnue/common/etc/sample.gnue.conf    Sat Feb 16 09:55:52 2002
***************
*** 26,50 ****
  [forms]
  FormDir = forms
  
! # Allow formulas to be entered into numeric fields? 
  NumericFormulaEntry = 1
!                           
  # Create new records in blocks automagically when you hit the bottom
  autoCreate = 1
  
  # Remember last query entered. (if enabled, then the last values entered
! # for a query can be retrieved by doing an Enter-Query twice) 
  RememberLastQuery = 1
  
  # Detail data caching behavior:
  #
! # If set to true (default), then always cache detail data in a master/detail 
  # set. The benefits of this method is performance.  The downsize to this 
method
  # is that records are cached so any changes made elsewhere are not reflected
  # in the cached records.
  #
  # If set to false, then only cache detail data if it has unposted changes.
! # The benefits of this method are that if another user modifies data and 
  # saves, then it will be available to your form much quicker.
  CacheDetailRecords = 1
  
--- 26,57 ----
  [forms]
  FormDir = forms
  
! # Allow formulas to be entered into numeric fields?
  NumericFormulaEntry = 1
! 
  # Create new records in blocks automagically when you hit the bottom
  autoCreate = 1
  
  # Remember last query entered. (if enabled, then the last values entered
! # for a query can be retrieved by doing an Enter-Query twice)
  RememberLastQuery = 1
  
+ # Values to store for checkbox entries
+ checkboxTrue = 1
+ checkboxFalse = 0
+ #checkboxTrue = Y
+ #checkboxFalse = N
+ 
+ 
  # Detail data caching behavior:
  #
! # If set to true (default), then always cache detail data in a master/detail
  # set. The benefits of this method is performance.  The downsize to this 
method
  # is that records are cached so any changes made elsewhere are not reflected
  # in the cached records.
  #
  # If set to false, then only cache detail data if it has unposted changes.
! # The benefits of this method are that if another user modifies data and
  # saves, then it will be available to your form much quicker.
  CacheDetailRecords = 1
  
Index: gnue/forms/src/GFDisplayHandler.py
diff -c gnue/forms/src/GFDisplayHandler.py:1.4 
gnue/forms/src/GFDisplayHandler.py:1.5
*** gnue/forms/src/GFDisplayHandler.py:1.4      Fri Feb 15 22:57:55 2002
--- gnue/forms/src/GFDisplayHandler.py  Sat Feb 16 09:55:52 2002
***************
*** 30,35 ****
--- 30,36 ----
  import sys, string
  
  from gnue.common.FormatMasks import DateMask, TextMask, NumberMask
+ from gnue.common import GDebug, GConfig
  
  
  #############################################################################
***************
*** 79,91 ****
      return not self.editing
  
  
!   def getDisplay(self):
!     return self.formatter.getFormattedInput()
  
  
-   def _buildValue(self):
-     ##self.value = self.formatter.
-     return 1
  
  
    #####################
--- 80,97 ----
      return not self.editing
  
  
!   def keyPressed(self, event):
  
+     if selection1:
+       replaces = abs(selection2-selection1)
+     else:
+       replaces = 0
+ 
+     if self._unicode:
+       pass
+ 
+     event.__dropped__ = 1
  
  
  
    #####################
***************
*** 94,108 ****
    #
  
    def moveCursor(self, position):
!     pass
  
    def moveCursorRelative(self, relative):
!     pass
  
    def moveCursorToEnd(self):
!     pass
  
    def moveCursorToBegin(self):
      self.moveCursor(0)
  
  
--- 100,118 ----
    #
  
    def moveCursor(self, position):
!     self.selection1 = None
! 
  
    def moveCursorRelative(self, relative):
!     self.selection1 = None
! 
  
    def moveCursorToEnd(self):
!     self.selection1 = None
! 
  
    def moveCursorToBegin(self):
+     self.selection1 = None
      self.moveCursor(0)
  
  
***************
*** 124,129 ****
--- 134,152 ----
    def moveSelectionCursor(self, relative):
      pass
  
+   def clipboardCopy(self):
+     return self.value
+ 
+   def clipboardCut(self):
+     value = self.value
+     self.value = None
+     return value
+ 
+ 
+   def clipboardPaste(self, value):
+     pass
+ 
+ 
  
    #####################
    #
***************
*** 140,150 ****
      # Needs to be set by the child classes
      self.formatter = formatter
  
  
-   #####################
-   #
-   # General methods
-   #
  
  
  
--- 163,176 ----
      # Needs to be set by the child classes
      self.formatter = formatter
  
+     self._unicode = 0
+ 
+ 
+   def _buildValue(self):
+     ##self.value = self.formatter.
+     return 1
+ 
  
  
  
  
***************
*** 186,192 ****
  
  #############################################################################
  #
! #
  #
  class DropdownDisplayHandler(FieldDisplayHandler):
    pass
--- 212,218 ----
  
  #############################################################################
  #
! # Handler for dropdowns
  #
  class DropdownDisplayHandler(FieldDisplayHandler):
    pass
***************
*** 199,210 ****
  #
  class CheckboxDisplayHandler(FieldDisplayHandler):
  
    def setValue(self, value):
!     if value:
        self.value = 1
!     else:
        self.value = 0
  
  
    def getDisplay(self):
      return self.value
--- 225,250 ----
  #
  class CheckboxDisplayHandler(FieldDisplayHandler):
  
+   trueValue = GConfig.get("checkboxTrue","Y")
+   falseValue = GConfig.get("checkboxFalse","N")
+ 
+   trueValues = ('Y','y','T','t','1','x','X', trueValue)
+   falseValues = ('N','n','f','F','0', falseValue)
+ 
    def setValue(self, value):
!     # Force to 0 or 1
!     if ("%s" % value)[:1] in self.trueValues:
        self.value = 1
!     elif ("%s" % value)[:1] in self.falseValues:
        self.value = 0
+     else:
+       self.value = value and 1 or 0
  
+   def getValue(self):
+     if self.value:
+       return self.trueValue
+     else:
+       return self.falseValue
  
    def getDisplay(self):
      return self.value



reply via email to

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