Pause function now works properly

This commit is contained in:
Manuel Cortez 2016-02-22 05:04:30 -06:00
parent ef8f1a86fc
commit 3b2322f56b

View File

@ -60,7 +60,7 @@ class baseBuffer(object):
def get_event(self, ev): def get_event(self, ev):
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown() and ev.ShiftDown(): event = "pause_audio" if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown() and ev.ShiftDown(): event = "pause_audio"
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "play_audio" elif ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "play_audio"
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "open_post" elif ev.GetKeyCode() == wx.WXK_RETURN: event = "open_post"
elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down" elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down"
elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up" elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up"
@ -70,7 +70,7 @@ class baseBuffer(object):
if event != None: if event != None:
try: try:
getattr(self, event)() getattr(self, event)()
except AttributeError: except KeyError:
pass pass
def volume_down(self): def volume_down(self):