Improved shortcut behavior

When we successfully execute a shortcut, we shouldn't let anything else
happen in the event path.  Therefore, I stop the key-press-event if it
is successfully handled.

This patch also adds shortcuts for seeking during playback.
This commit is contained in:
Bryan Schumaker 2010-12-16 22:16:39 -05:00
parent f5e21df148
commit 10eafb61b5

View File

@ -34,3 +34,11 @@ def key_press(widget, event):
LS.controls.next()
elif name == "s":
LS.controls.stop()
elif name == "Right":
LS.controls.seek_forward()
elif name == "Left":
LS.controls.seek_backward()
else:
return False
widget.emit_stop_by_name("key-press-event")
return True