[kupfer] triggers: Unbind keys on finalize



commit c50f27f585c833e353aa186d631c40bd303bb638
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sun May 9 16:25:25 2010 +0100

    triggers: Unbind keys on finalize

 kupfer/plugin/triggers.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/triggers.py b/kupfer/plugin/triggers.py
index 8196af8..f600645 100644
--- a/kupfer/plugin/triggers.py
+++ b/kupfer/plugin/triggers.py
@@ -60,6 +60,10 @@ class Triggers (Source):
 			keybindings.bind_key(keystr, target)
 		self.output_debug("Loaded triggers, count:", len(self.trigger_table))
 
+	def finalize(self):
+		for target, (keystr, name, id_) in self.trigger_table.iteritems():
+			keybindings.bind_key(None, target)
+
 	def _callback(self, keyobj, target, event_time):
 		self.perform_trigger(target)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]