From 7facb9b02098c659326e73b7527594d51045c130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Tue, 14 Apr 2015 09:41:12 -0500 Subject: [PATCH] Keystroke editor dialog is showed even if config has changed --- src/keystrokeEditor/wx_ui.py | 2 ++ src/sound.py | 4 ++++ 2 files changed, 6 insertions(+) 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')):