From ee600d916efc5d580959b90f8125ee5dfd99d43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Tue, 5 Nov 2013 19:37:47 +0100 Subject: [PATCH] extracted method Transmitter.stop --- pysstv/examples/gimp-plugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pysstv/examples/gimp-plugin.py b/pysstv/examples/gimp-plugin.py index 12613f8..48fb429 100755 --- a/pysstv/examples/gimp-plugin.py +++ b/pysstv/examples/gimp-plugin.py @@ -56,11 +56,15 @@ class Transmitter(object): if self.tx_enabled.get(): self.audio_thread = AudioThread(self.sstv, self) self.audio_thread.start() - elif self.audio_thread is not None: - self.audio_thread.stop() + else: + self.stop() if self.progress is not None: self.progress.update_image() + def stop(self): + if self.audio_thread is not None: + self.audio_thread.stop() + def audio_thread_ended(self): self.tx_enabled.set(0)