[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue common/etc/sample.gnue.conf forms/src/GFKe...
From: |
Jason Cater |
Subject: |
gnue common/etc/sample.gnue.conf forms/src/GFKe... |
Date: |
Fri, 01 Mar 2002 00:28:41 -0500 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/03/01 00:28:41
Modified files:
common/etc : sample.gnue.conf
forms/src : GFKeyMapper.py
forms/src/uidrivers/wx: UIdriver.py
Log message:
added support for Shift-Enter and (optionally) Enter to insert newlines
in multirow entries
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/etc/sample.gnue.conf.diff?cvsroot=OldCVS&tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFKeyMapper.py.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/uidrivers/wx/UIdriver.py.diff?cvsroot=OldCVS&tr1=1.155&tr2=1.156&r1=text&r2=text
Patches:
Index: gnue/common/etc/sample.gnue.conf
diff -c gnue/common/etc/sample.gnue.conf:1.17
gnue/common/etc/sample.gnue.conf:1.18
*** gnue/common/etc/sample.gnue.conf:1.17 Sat Feb 16 09:55:52 2002
--- gnue/common/etc/sample.gnue.conf Fri Mar 1 00:28:40 2002
***************
*** 43,48 ****
--- 43,53 ----
#checkboxFalse = N
+ # Set to "true" if you want <enter> to insert newlines in multirow entries.
+ # Even if set to false, Shift+Enter will insert a newline
+ EnterIsNewLine = 0
+
+
# Detail data caching behavior:
#
# If set to true (default), then always cache detail data in a master/detail
Index: gnue/forms/src/GFKeyMapper.py
diff -c gnue/forms/src/GFKeyMapper.py:1.6 gnue/forms/src/GFKeyMapper.py:1.7
*** gnue/forms/src/GFKeyMapper.py:1.6 Sun Feb 17 13:25:32 2002
--- gnue/forms/src/GFKeyMapper.py Fri Mar 1 00:28:40 2002
***************
*** 285,290 ****
--- 285,291 ----
(vk.F9, 0, 0, 0) : 'EXECQUERY',
(vk.F11, 0, 0, 0) : 'ROLLBACK',
(vk.F12, 0, 0, 0) : 'NEWRECORD',
+ (vk.ENTER, 1, 0, 0) : 'NEWLINE',
}
Index: gnue/forms/src/uidrivers/wx/UIdriver.py
diff -c gnue/forms/src/uidrivers/wx/UIdriver.py:1.155
gnue/forms/src/uidrivers/wx/UIdriver.py:1.156
*** gnue/forms/src/uidrivers/wx/UIdriver.py:1.155 Tue Feb 26 22:29:56 2002
--- gnue/forms/src/uidrivers/wx/UIdriver.py Fri Mar 1 00:28:40 2002
***************
*** 57,63 ****
def _eventObjTowxWindow(event):
eo = event.GetEventObject()
return wxPyTypeCast(eo, 'wxWindow')
!
##
## Only create one instance of wxApp
## Use getWxApp() to get or create the
--- 57,63 ----
def _eventObjTowxWindow(event):
eo = event.GetEventObject()
return wxPyTypeCast(eo, 'wxWindow')
!
##
## Only create one instance of wxApp
## Use getWxApp() to get or create the
***************
*** 659,665 ****
id = object.GetId()
gfObject = _IdToGFObj[id]
action = GFEvent('fireTRIGGER',gfObject.trigger)
!
if action:
_EVENTPROCESSOR(action)
--- 659,665 ----
id = object.GetId()
gfObject = _IdToGFObj[id]
action = GFEvent('fireTRIGGER',gfObject.trigger)
!
if action:
_EVENTPROCESSOR(action)
***************
*** 827,833 ****
## Required Dialog box support
##
#####################################################################
!
#
# UIAbout
#
--- 827,833 ----
## Required Dialog box support
##
#####################################################################
!
#
# UIAbout
#
***************
*** 855,861 ****
def __init__(self, interface, message, caption):
message = lineWrap(message,60)
wxMessageDialog.__init__(self, interface, message, caption,
style=wxOK|wxICON_EXCLAMATION)
!
#####################################################################
##
## Keymapper Support
--- 855,861 ----
def __init__(self, interface, message, caption):
message = lineWrap(message,60)
wxMessageDialog.__init__(self, interface, message, caption,
style=wxOK|wxICON_EXCLAMATION)
!
#####################################################################
##
## Keymapper Support
***************
*** 900,918 ****
self._eventProcessor = eventProcessor
for eventType in eventList:
self.Connect(-1, -1, eventType,self._processEvent)
!
def _processEvent(self,event):
GDebug.printMesg(0,"uiBaseEvtHandler _processEvent was called?!?")
!
class mouseEvtHandler(uiBaseEvtHandler):
def __init__(self,eventProcessor):
eventList = [wxEVT_LEFT_DOWN]
uiBaseEvtHandler.__init__(self, eventList, eventProcessor)
!
def _processEvent(self,event):
global _charWidth
object = _eventObjTowxWindow(event)
!
# compute the location of the character in the widget
x,y = event.GetPositionTuple()
cursorPosition = x/_charWidth
--- 900,918 ----
self._eventProcessor = eventProcessor
for eventType in eventList:
self.Connect(-1, -1, eventType,self._processEvent)
!
def _processEvent(self,event):
GDebug.printMesg(0,"uiBaseEvtHandler _processEvent was called?!?")
!
class mouseEvtHandler(uiBaseEvtHandler):
def __init__(self,eventProcessor):
eventList = [wxEVT_LEFT_DOWN]
uiBaseEvtHandler.__init__(self, eventList, eventProcessor)
!
def _processEvent(self,event):
global _charWidth
object = _eventObjTowxWindow(event)
!
# compute the location of the character in the widget
x,y = event.GetPositionTuple()
cursorPosition = x/_charWidth
***************
*** 939,962 ****
def __init__(self, eventProcessor):
eventList = [wxEVT_CHAR]
uiBaseEvtHandler.__init__(self, eventList, eventProcessor)
!
def _processEvent(self,event):
action = None
# hack for swig shortcomming needed by wxPython 2.2.x (2.3 does not need
this)
# compute the location of the character in the widget
object = _eventObjTowxWindow(event)
! command = GFKeyMapper.KeyMapper.getEvent(
! event.KeyCode(),
! event.ShiftDown(),
! event.ControlDown(),
! event.AltDown())
# TODO : Broken for the moment, this should probably be form driven
if command == 'JUMPRECORD':
global _PROMPTFORRECORD
_PROMPTFORRECORD()
! if command:
action = GFEvent('request%s' % command)
else:
--- 939,989 ----
def __init__(self, eventProcessor):
eventList = [wxEVT_CHAR]
uiBaseEvtHandler.__init__(self, eventList, eventProcessor)
!
def _processEvent(self,event):
action = None
# hack for swig shortcomming needed by wxPython 2.2.x (2.3 does not need
this)
# compute the location of the character in the widget
object = _eventObjTowxWindow(event)
!
!
! #
! # Sigh... a hack for using <enter> in multiline entries
! #
! if event.KeyCode() == 13 and \
! not event.ShiftDown() and \
! not event.ControlDown() and \
! not event.AltDown() and \
! int (GConfig.get('enterIsNewLine',0)) and \
! _IdToGFObj[_eventObjTowxWindow(event).GetId()].height > 1:
!
! command = 'NEWLINE'
!
! else:
!
!
! #
! # Get the event to process from the KeyMapper
! #
! command = GFKeyMapper.KeyMapper.getEvent(
! event.KeyCode(),
! event.ShiftDown(),
! event.ControlDown(),
! event.AltDown())
!
# TODO : Broken for the moment, this should probably be form driven
if command == 'JUMPRECORD':
global _PROMPTFORRECORD
_PROMPTFORRECORD()
!
! if command == 'NEWLINE':
! action = GFEvent('requestKEYPRESS', '\n',
! text='\n',
! code=10)
!
! elif command:
action = GFEvent('request%s' % command)
else:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue common/etc/sample.gnue.conf forms/src/GFKe...,
Jason Cater <=