From b40c074e4d006bdaf624446dd9626a7c46e233a1 Mon Sep 17 00:00:00 2001 From: misygauziya Date: Wed, 19 Jul 2023 17:56:36 +0900 Subject: [PATCH] =?UTF-8?q?[bugfix]HOST=20API=E5=88=87=E6=9B=BF=E6=99=82?= =?UTF-8?q?=E3=81=ABCHOICE=5FMIC=5FDEVICE=E3=81=ABdevice=E5=90=8D=E3=82=92?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- window_config.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/window_config.py b/window_config.py index edbee71c..61f5ed24 100644 --- a/window_config.py +++ b/window_config.py @@ -272,11 +272,17 @@ class ToplevelWindowConfig(CTkToplevel): def optionmenu_input_mic_host_callback(self, choice): self.optionmenu_input_mic_host.set(choice) - self.parent.CHOICE_MIC_HOST = choice - save_json(self.parent.PATH_CONFIG, "CHOICE_MIC_HOST", self.parent.CHOICE_MIC_HOST) - self.optionmenu_input_mic_device.configure(values=[device["name"] for device in get_input_device_list()[self.parent.CHOICE_MIC_HOST]]) + self.optionmenu_input_mic_device.configure( + values=[device["name"] for device in get_input_device_list()[choice]], + variable=StringVar(value=[device["name"] for device in get_input_device_list()[choice]][0])) + if SCROLLABLE_DROPDOWN: - self.scrollableDropdown_input_mic_device.configure(values=[device["name"] for device in get_input_device_list()[self.parent.CHOICE_MIC_HOST]]) + self.scrollableDropdown_input_mic_device.configure(values=[device["name"] for device in get_input_device_list()[choice]]) + + self.parent.CHOICE_MIC_HOST = choice + self.parent.CHOICE_MIC_DEVICE = [device["name"] for device in get_input_device_list()[choice]][0] + save_json(self.parent.PATH_CONFIG, "CHOICE_MIC_HOST", self.parent.CHOICE_MIC_HOST) + save_json(self.parent.PATH_CONFIG, "CHOICE_MIC_DEVICE", self.parent.CHOICE_MIC_DEVICE) def optionmenu_input_mic_device_callback(self, choice): self.optionmenu_input_mic_device.set(choice)