From 0937aa96209e065b8092a193afee76c01a17858b Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 17 Nov 2008 15:09:39 +0000 Subject: [PATCH] fix collection of changed keybindings and apply them to the current instance --- terminatorlib/prefs_profile.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/terminatorlib/prefs_profile.py b/terminatorlib/prefs_profile.py index 37c495aa..861ebddf 100644 --- a/terminatorlib/prefs_profile.py +++ b/terminatorlib/prefs_profile.py @@ -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)