PyCrust updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-01-03 18:19:16 +00:00
parent 1278f7fcc5
commit 4aaef122cb
2 changed files with 65 additions and 55 deletions

View File

@@ -193,7 +193,7 @@ class Shell(wxStyledTextCtrl):
self.autoCompleteIncludeDouble = 1 self.autoCompleteIncludeDouble = 1
self.autoCompleteCaseInsensitive = 1 self.autoCompleteCaseInsensitive = 1
self.AutoCompSetIgnoreCase(self.autoCompleteCaseInsensitive) self.AutoCompSetIgnoreCase(self.autoCompleteCaseInsensitive)
# De we want to automatically pop up command argument help? # Do we want to automatically pop up command argument help?
self.autoCallTip = 1 self.autoCallTip = 1
self.CallTipSetBackground(wxColour(255, 255, 232)) self.CallTipSetBackground(wxColour(255, 255, 232))
@@ -313,37 +313,41 @@ class Shell(wxStyledTextCtrl):
Prevents modification of previously submitted commands/responses.""" Prevents modification of previously submitted commands/responses."""
key = event.KeyCode() key = event.KeyCode()
controlDown = event.ControlDown()
altDown = event.AltDown()
shiftDown = event.ShiftDown()
currpos = self.GetCurrentPos() currpos = self.GetCurrentPos()
stoppos = self.promptPos[1] stoppos = self.promptPos[1]
# Return is used to submit a command to the interpreter. # Return is used to submit a command to the interpreter.
if key == WXK_RETURN: if key == WXK_RETURN:
if self.AutoCompActive(): self.AutoCompCancel() if self.AutoCompActive(): self.AutoCompCancel()
if self.CallTipActive: self.CallTipCancel() if self.CallTipActive(): self.CallTipCancel()
self.processLine() self.processLine()
# If the auto-complete window is up let it do its thing. # If the auto-complete window is up let it do its thing.
elif self.AutoCompActive(): elif self.AutoCompActive():
event.Skip() event.Skip()
# Let Ctrl-Alt-* get handled normally.
elif controlDown and altDown:
event.Skip()
# Cut to the clipboard. # Cut to the clipboard.
elif event.ControlDown() and key in (ord('X'), ord('x')): elif controlDown and key in (ord('X'), ord('x')):
self.Cut() self.Cut()
# Copy to the clipboard. # Copy to the clipboard.
elif event.ControlDown() and not event.ShiftDown() \ elif controlDown and not shiftDown and key in (ord('C'), ord('c')):
and key in (ord('C'), ord('c')):
self.Copy() self.Copy()
# Copy to the clipboard, including prompts. # Copy to the clipboard, including prompts.
elif event.ControlDown() and event.ShiftDown() \ elif controlDown and shiftDown and key in (ord('C'), ord('c')):
and key in (ord('C'), ord('c')):
self.CopyWithPrompts() self.CopyWithPrompts()
# Paste from the clipboard. # Paste from the clipboard.
elif event.ControlDown() and key in (ord('V'), ord('v')): elif controlDown and key in (ord('V'), ord('v')):
self.Paste() self.Paste()
# Retrieve the previous command from the history buffer. # Retrieve the previous command from the history buffer.
elif (event.ControlDown() and key == WXK_UP) \ elif (controlDown and key == WXK_UP) \
or (event.AltDown() and key in (ord('P'), ord('p'))): or (altDown and key in (ord('P'), ord('p'))):
self.OnHistoryRetrieve(step=+1) self.OnHistoryRetrieve(step=+1)
# Retrieve the next command from the history buffer. # Retrieve the next command from the history buffer.
elif (event.ControlDown() and key == WXK_DOWN) \ elif (controlDown and key == WXK_DOWN) \
or (event.AltDown() and key in (ord('N'), ord('n'))): or (altDown and key in (ord('N'), ord('n'))):
self.OnHistoryRetrieve(step=-1) self.OnHistoryRetrieve(step=-1)
# Search up the history for the text in front of the cursor. # Search up the history for the text in front of the cursor.
elif key == WXK_F8: elif key == WXK_F8:
@@ -374,6 +378,12 @@ class Shell(wxStyledTextCtrl):
# Don't toggle between insert mode and overwrite mode. # Don't toggle between insert mode and overwrite mode.
elif key == WXK_INSERT: elif key == WXK_INSERT:
pass pass
# Don't allow line deletion.
elif controlDown and key in (ord('L'), ord('l')):
pass
# Don't allow line transposition.
elif controlDown and key in (ord('T'), ord('t')):
pass
# Protect the readonly portion of the shell. # Protect the readonly portion of the shell.
elif not self.CanEdit(): elif not self.CanEdit():
pass pass

View File

@@ -6,5 +6,5 @@ __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
__cvsid__ = "$Id$" __cvsid__ = "$Id$"
__version__ = "$Revision$"[11:-2] __version__ = "$Revision$"[11:-2]
VERSION = '0.7' VERSION = '0.7.1'