[pitivi: 4/20] ui.controller.py: connect to and handle key_{press, release}_event signals
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 4/20] ui.controller.py: connect to and handle key_{press, release}_event signals
- Date: Wed, 15 Jul 2009 06:37:13 +0000 (UTC)
commit 1f9f1412c50af55c0bca594df288510708b3118c
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Tue Jul 7 00:04:29 2009 -0700
ui.controller.py: connect to and handle key_{press,release}_event signals
pitivi/ui/controller.py | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/controller.py b/pitivi/ui/controller.py
index aeafe9c..5bc890d 100644
--- a/pitivi/ui/controller.py
+++ b/pitivi/ui/controller.py
@@ -135,6 +135,18 @@ class Controller(object):
self._dragging = None
return True
+ @handler(_view, "key_press_event")
+ def key_press_event(self, item, target, event):
+ self._event_common(item, target, event)
+ kv = event.keyval
+ return self.key_press(kv)
+
+ @handler(_view, "key_release_event")
+ def key_release_event(self, item, target, event):
+ self._event_common(item, target, event)
+ kv = event.keyval
+ return self.key_release(kv)
+
## internal callbacks
def _event_common(self, item, target, event):
@@ -194,3 +206,9 @@ class Controller(object):
def leave(self, item, target):
pass
+
+ def key_press(self, keyval):
+ pass
+
+ def key_release(self, keyval):
+ pass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]