ocarina: remove old shortcut code

The new code is more generic and easier to maintain / add new shortcuts
This commit is contained in:
Bryan Schumaker 2011-04-24 09:20:04 -04:00
parent a4d27d0b0f
commit 0aa618ee5a
1 changed files with 0 additions and 36 deletions

View File

@ -1,36 +0,0 @@
# Bryan Schumaker (10/4/2010)
import ocarina
gtk = ocarina.gtk
LS = ocarina.libsaria
def key_press(widget, event):
name = gtk.gdk.keyval_name(event.keyval)
if name == "Escape":
ocarina.window.window.set_focus(None)
return
if filter.is_focus():
return
if name == "space":
LS.controls.toggle_play()
elif name == "slash":
filter.grab_focus()
elif name == "Left":
LS.controls.seek_backward()
elif name == "Right":
LS.controls.seek_forward()
elif name == "d":
ocarina.footer.down_button()
elif name == "g":
ocarina.body.cur_page_goto()
elif name == "n":
LS.controls.next()
elif name == "s":
LS.controls.stop()
elif name == "u":
ocarina.footer.up_button()
else:
#print name
return False
widget.emit_stop_by_name("key-press-event")
return True