diff options
author | Steven M. Gava <elguavas@python.net> | 2002-02-11 03:45:22 (GMT) |
---|---|---|
committer | Steven M. Gava <elguavas@python.net> | 2002-02-11 03:45:22 (GMT) |
commit | e28ee754b0749b2c4d1d6eb5f040dd3c8b01154a (patch) | |
tree | 469763cc3c1af3c23041d3e6d7b23c605221ed72 /Lib/idlelib/configDialog.py | |
parent | 9f25e67dd7cf1f7624421b420f117cf5478dcc39 (diff) | |
download | cpython-e28ee754b0749b2c4d1d6eb5f040dd3c8b01154a.zip cpython-e28ee754b0749b2c4d1d6eb5f040dd3c8b01154a.tar.gz cpython-e28ee754b0749b2c4d1d6eb5f040dd3c8b01154a.tar.bz2 |
improvement to keybinding re-use check
Diffstat (limited to 'Lib/idlelib/configDialog.py')
-rw-r--r-- | Lib/idlelib/configDialog.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index cb3cf4d..025bf81 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -561,7 +561,16 @@ class ConfigDialog(Toplevel): listIndex=self.listBindings.index(ANCHOR) binding=self.listBindings.get(listIndex) bindName=binding.split()[0] #first part, up to first space - currentKeySequences=idleConf.GetCurrentKeySet().values() + if self.keysAreBuiltin.get(): + currentKeySetName=self.builtinKeys.get() + else: + currentKeySetName=self.customKeys.get() + currentBindings=idleConf.GetCurrentKeySet() + if currentKeySetName in self.changedItems['keys'].keys(): #unsaved changes + keySetChanges=self.changedItems['keys'][currentKeySetName] + for event in keySetChanges.keys(): + currentBindings[event]=keySetChanges[event].split() + currentKeySequences=currentBindings.values() newKeys=GetKeysDialog(self,'Get New Keys',bindName, currentKeySequences).result if newKeys: #new keys were specified |