fix collection of changed keybindings and apply them to the current instance

This commit is contained in:
Chris Jones 2008-11-17 15:09:39 +00:00
parent 0c354b6aa2
commit 0937aa9620
1 changed files with 6 additions and 3 deletions

View File

@ -311,10 +311,13 @@ class ProfileEditor:
if isinstance (value, tuple):
value = value[0]
if (row[2], row[3]) != self.tkbobj._parsebinding(value):
changed_keybindings.append (row[0], accel)
print("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel))
changed_keybindings.append ((row[0], accel))
dbg("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel))
# FIXME: Do something with "changed" and "changed_keybindings"
newbindings = self.term.conf.keybindings
for binding in changed_keybindings:
newbindings[binding[0]] = binding[1]
self.term.keybindings.configure (newbindings)
# We're not actually cancelling, but since all it does is close the window, we might as well use it
self.cancel(None)