diff --git a/src/keystrokeEditor/wx_ui.py b/src/keystrokeEditor/wx_ui.py index 8bd3794d..3f64d32c 100644 --- a/src/keystrokeEditor/wx_ui.py +++ b/src/keystrokeEditor/wx_ui.py @@ -28,6 +28,8 @@ class keystrokeEditorDialog(baseDialog.BaseWXDialog): def put_keystrokes(self, actions, keystrokes): for i in keystrokes: + if actions.has_key(i) == False: + continue action = actions[i] self.actions.append(i) keystroke = keystrokes[i] diff --git a/src/sound.py b/src/sound.py index f96e9570..7709047d 100644 --- a/src/sound.py +++ b/src/sound.py @@ -130,6 +130,10 @@ class URLStream(object): self.stream.play() log.debug("played") + def stop_audio(self): + if hasattr(self, "stream") and self.stream.is_playing == True: + self.stream.stop() + @staticmethod def delete_old_tempfiles(): for f in glob(os.path.join(tempfile.gettempdir(), 'tmp*.wav')):