[Idle-dev] CVS: idle Bindings.py,1.4,1.5 config-keys.def,1.1,1.2 configHandler.py,1.6,1.7

Stephen M. Gava elguavas@users.sourceforge.net
Sun, 02 Dec 2001 16:37:30 -0800


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv19494

Modified Files:
	Bindings.py config-keys.def configHandler.py 
Log Message:
further work on new configuration system, specifically,
on keybinding configuration



Index: Bindings.py
===================================================================
RCS file: /cvsroot/idlefork/idle/Bindings.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Bindings.py	2001/11/21 05:52:51	1.4
--- Bindings.py	2001/12/03 00:37:28	1.5
***************
*** 15,19 ****
  import sys
  import string
! from keydefs import *
  
  menudefs = [
--- 15,20 ----
  import sys
  import string
! #from keydefs import *
! from configHandler import idleConf
  
  menudefs = [
***************
*** 66,73 ****
  ]
  
! if sys.platform == 'win32':
!     default_keydefs = windows_keydefs
! else:
!     default_keydefs = unix_keydefs
  
  del sys
--- 67,76 ----
  ]
  
! #if sys.platform == 'win32':
! #    default_keydefs = windows_keydefs
! #else:
! #    default_keydefs = unix_keydefs
! 
! default_keydefs = idleConf.GetKeys(keySetName=None)
  
  del sys

Index: config-keys.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-keys.def,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** config-keys.def	2001/09/24 09:43:17	1.1
--- config-keys.def	2001/12/03 00:37:28	1.2
***************
*** 1,58 ****
  # IDLE reads several config files to determine user preferences.  This 
  # file is the default config file for idle key binding settings.  
  
! [IDLE Classic - windows]
! Copy= '<Control-c> <Control-C>'
! Cut= '<Control-x> <Control-X>'
! Paste= '<Control-v> <Control-V>'
! beginning-of-line= '<Control-a> <Home>'
! center-insert= '<Control-l>'
! close-all-windows= '<Control-q>'
! close-window= '<Alt-F4>'
! dump-undo-state= '<Control-backslash>'
! end-of-file= '<Control-d>'
! python-docs= '<F1>'
! history-next= '<Alt-n>'
! history-previous= '<Alt-p>'
! interrupt-execution= '<Control-c>'
! open-class-browser= '<Alt-c>'
! open-module= '<Alt-m>'
! open-new-window= '<Control-n>'
! open-window-from-file= '<Control-o>'
! plain-newline-and-indent= '<Control-j>'
! redo= '<Control-y>'
! remove-selection= '<Escape>'
! save-copy-of-window-as-file= '<Alt-Shift-s>'
! save-window-as-file= '<Alt-s>'
! save-window= '<Control-s>'
! select-all= '<Alt-a>'
! toggle-auto-coloring= '<Control-slash>'
! undo= '<Control-z>'
  
! [IDLE Classic - posix]
! Copy= '<Alt-w> <Meta-w>'
! Cut= '<Control-w>'
! Paste= '<Control-y>'
! beginning-of-line= '<Control-a> <Home>'
! center-insert= '<Control-l>'
! close-all-windows= '<Control-x><Control-c>'
! close-window= '<Control-x><Control-0> <Control-x><Key-0>'
! do-nothing= '<Control-x>'
! dump-undo-state= '<Control-backslash>'
! end-of-file= '<Control-d>'
! help= '<F1>'
! history-next= '<Alt-n> <Meta-n>'
! history-previous= '<Alt-p> <Meta-p>'
! interrupt-execution= '<Control-c>'
! open-class-browser= '<Control-x><Control-b>'
! open-module= '<Control-x><Control-m>'
! open-new-window= '<Control-x><Control-n>'
! open-window-from-file= '<Control-x><Control-f>'
! plain-newline-and-indent= '<Control-j>'
! redo= '<Alt-z> <Meta-z>'
! save-copy-of-window-as-file= '<Control-x><w>'
! save-window-as-file= '<Control-x><Control-w>'
! save-window= '<Control-x><Control-s>'
! select-all= '<Alt-a> <Meta-a>'
! toggle-auto-coloring= '<Control-slash>'
! undo= '<Control-z>'
--- 1,64 ----
  # IDLE reads several config files to determine user preferences.  This 
  # file is the default config file for idle key binding settings.  
+ # Where multiple keys are specified for an action: if they are separated
+ # by a space (eg. action=<key1> <key2>) then the keys are altenatives, if
+ # there is no space (eg. action=<key1>key2>) then the keys comprise a
+ # single 'emacs style' multi-keystoke binding.
  
! [IDLE CUA-ish]
! Copy=<Control-c> <Control-C>
! Cut=<Control-x> <Control-X>
! Paste=<Control-v> <Control-V>
! beginning-of-line=<Control-a> <Home>
! center-insert=<Control-l>
! close-all-windows=<Control-q>
! close-window=<Alt-F4>
! dump-undo-state=<Control-backslash>
! end-of-file=<Control-d>
! python-docs=<F1>
! python-context-help=<Shift-F1> 
! history-next=<Alt-n>
! history-previous=<Alt-p>
! interrupt-execution=<Control-c>
! open-class-browser=<Alt-c>
! open-module=<Alt-m>
! open-new-window=<Control-n>
! open-window-from-file=<Control-o>
! plain-newline-and-indent=<Control-j>
! redo=<Control-Shift-z>
! remove-selection=<Escape>
! save-copy-of-window-as-file=<Alt-Shift-s>
! save-window-as-file=<Alt-s>
! save-window=<Control-s>
! select-all=<Alt-a>
! toggle-auto-coloring=<Control-slash>
! undo=<Control-z>
  
! [IDLE Emacs-ish]
! Copy=<Alt-w> <Meta-w>
! Cut=<Control-w>
! Paste=<Control-y>
! beginning-of-line=<Control-a> <Home>
! center-insert=<Control-l>
! close-all-windows=<Control-x><Control-c>
! close-window=<Control-x><Control-0> <Control-x><Key-0>
! do-nothing=<Control-x>
! dump-undo-state=<Control-backslash>
! end-of-file=<Control-d>
! history-next=<Alt-n> <Meta-n>
! history-previous=<Alt-p> <Meta-p>
! interrupt-execution=<Control-c>
! open-class-browser=<Control-x><Control-b>
! open-module=<Control-x><Control-m>
! open-new-window=<Control-x><Control-n>
! open-window-from-file=<Control-x><Control-f>
! plain-newline-and-indent=<Control-j>
! python-docs=<Control-h> 
! python-context-help=<Control-Shift-h> 
! redo=<Alt-z> <Meta-z>
! save-copy-of-window-as-file=<Control-x><w>
! save-window-as-file=<Control-x><Control-w>
! save-window=<Control-x><Control-s>
! select-all=<Alt-a> <Meta-a>
! toggle-auto-coloring=<Control-slash>
! undo=<Control-z>

Index: configHandler.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configHandler.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** configHandler.py	2001/11/04 07:03:08	1.6
--- configHandler.py	2001/12/03 00:37:28	1.7
***************
*** 175,185 ****
          pass
      
!     def GetKeys(self, name=None):
          """
!         Gets the requested keybindings or returns a final fallback keybinding 
!         set in case one can't be obtained from either the user or default 
!         config files.
          """
!         pass
      
      def LoadCfgFiles(self):
--- 175,220 ----
          pass
      
!     def GetKeys(self, keySetName=None):
          """
!         returns the requested keybindings, with fallbacks if required.
          """
!         #default keybindings.
!         #keybindings loaded from the config file(s) are loaded _over_ these
!         #defaults, so if there is a problem getting any binding there will
!         #be an 'ultimate last resort fallback' to the CUA-ish bindings
!         #defined here.
!         keyBindings={
!             '<<Copy>>': ['<Control-c>', '<Control-C>'],
!             '<<Cut>>': ['<Control-x>', '<Control-X>'],
!             '<<Paste>>': ['<Control-v>', '<Control-V>'],
!             '<<beginning-of-line>>': ['<Control-a>', '<Home>'],
!             '<<center-insert>>': ['<Control-l>'],
!             '<<close-all-windows>>': ['<Control-q>'],
!             '<<close-window>>': ['<Alt-F4>'],
!             '<<dump-undo-state>>': ['<Control-backslash>'],
!             '<<end-of-file>>': ['<Control-d>'],
!             '<<python-docs>>': ['<F1>'],
!             '<<python-context-help>>': ['<Shift-F1>'], 
!             '<<history-next>>': ['<Alt-n>'],
!             '<<history-previous>>': ['<Alt-p>'],
!             '<<interrupt-execution>>': ['<Control-c>'],
!             '<<open-class-browser>>': ['<Alt-c>'],
!             '<<open-module>>': ['<Alt-m>'],
!             '<<open-new-window>>': ['<Control-n>'],
!             '<<open-window-from-file>>': ['<Control-o>'],
!             '<<plain-newline-and-indent>>': ['<Control-j>'],
!             '<<redo>>': ['<Control-y>'],
!             '<<remove-selection>>': ['<Escape>'],
!             '<<save-copy-of-window-as-file>>': ['<Alt-Shift-s>'],
!             '<<save-window-as-file>>': ['<Alt-s>'],
!             '<<save-window>>': ['<Control-s>'],
!             '<<select-all>>': ['<Alt-a>'],
!             '<<toggle-auto-coloring>>': ['<Control-slash>'],
!             '<<undo>>': ['<Control-z>']}
!         if keySetName:
!             pass
!             
!         return keyBindings
! 
      
      def LoadCfgFiles(self):