From 4937d7b1f152052ba6d8f8b3649df7cf4bae5838 Mon Sep 17 00:00:00 2001 From: misygauziya Date: Fri, 21 Jul 2023 17:09:16 +0900 Subject: [PATCH] [update] VRCT.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 処理の重複を削除 --- VRCT.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/VRCT.py b/VRCT.py index 84dfcb55..84c72f23 100644 --- a/VRCT.py +++ b/VRCT.py @@ -508,22 +508,16 @@ class App(CTk): self.checkbox_transcription_receive.configure(state="normal") def checkbox_transcription_send_callback(self): + self.checkbox_transcription_send.configure(state="disabled") + self.checkbox_transcription_receive.configure(state="disabled") + self.button_config.configure(state="disabled", fg_color=["gray92", "gray14"]) + self.update() self.ENABLE_TRANSCRIPTION_SEND = self.checkbox_transcription_send.get() if self.ENABLE_TRANSCRIPTION_SEND is True: - self.checkbox_transcription_send.configure(state="disabled") - self.checkbox_transcription_receive.configure(state="disabled") - self.button_config.configure(state="disabled", fg_color=["gray92", "gray14"]) - self.update() - th_transcription_send_start = Thread(target=self.transcription_send_start) th_transcription_send_start.daemon = True th_transcription_send_start.start() else: - self.checkbox_transcription_send.configure(state="disabled") - self.checkbox_transcription_receive.configure(state="disabled") - self.button_config.configure(state="disabled", fg_color=["gray92", "gray14"]) - self.update() - th_transcription_send_stop = Thread(target=self.transcription_send_stop) th_transcription_send_stop.daemon = True th_transcription_send_stop.start() @@ -599,21 +593,16 @@ class App(CTk): self.checkbox_transcription_receive.configure(state="normal") def checkbox_transcription_receive_callback(self): + self.checkbox_transcription_send.configure(state="disabled") + self.checkbox_transcription_receive.configure(state="disabled") + self.button_config.configure(state="disabled", fg_color=["gray92", "gray14"]) + self.update() self.ENABLE_TRANSCRIPTION_RECEIVE = self.checkbox_transcription_receive.get() if self.ENABLE_TRANSCRIPTION_RECEIVE is True: - self.checkbox_transcription_send.configure(state="disabled") - self.checkbox_transcription_receive.configure(state="disabled") - self.button_config.configure(state="disabled", fg_color=["gray92", "gray14"]) - self.update() - th_transcription_receive_start = Thread(target=self.transcription_receive_start) th_transcription_receive_start.daemon = True th_transcription_receive_start.start() else: - self.checkbox_transcription_send.configure(state="disabled") - self.checkbox_transcription_receive.configure(state="disabled") - self.button_config.configure(state="disabled", fg_color=["gray92", "gray14"]) - self.update() th_transcription_receive_stop = Thread(target=self.transcription_receive_stop) th_transcription_receive_stop.daemon = True th_transcription_receive_stop.start()