Config Window: Transcription Tab Thresholdチェック(Mic, Speaker)のCallback関数をmain.pyから呼べるように。

各設定項目がちゃんとmain.pyで呼ばれているか確認するためにprint文追加。おかげで指定し忘れなどが分かったのでその修正。
起動時OSCチェック処理のコメントアウト戻すのを忘れていたのを修正(開発上しいながよくやる)
This commit is contained in:
Sakamoto Shiina
2023-09-01 03:10:43 +09:00
parent 799a1a27bb
commit f3f549494e
6 changed files with 59 additions and 33 deletions

View File

@@ -16,7 +16,7 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings):
# 関数名 chatbox から messagebox に変える予定 config.ENABLE_AUTO_CLEAR_CHATBOX も MESSAGEBOXに変えるかな。
def checkbox_auto_clear_chatbox_callback(checkbox_box_widget):
callFunctionIfCallable(config_window.CALLBACK_SET_DEEPL_AUTHKEY, checkbox_box_widget.get())
callFunctionIfCallable(config_window.CALLBACK_SET_ENABLE_AUTO_CLEAR_CHATBOX, checkbox_box_widget.get())
def checkbox_notice_xsoverlay_callback(checkbox_box_widget):
callFunctionIfCallable(config_window.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get())

View File

@@ -16,8 +16,8 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings):
createSettingBoxEntry = sbg.createSettingBoxEntry
def checkbox_input_speaker_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on):
print("is_turned_on", is_turned_on)
def checkbox_input_mic_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on):
callFunctionIfCallable(config_window.CALLBACK_CHECK_MIC_THRESHOLD, is_turned_on)
if is_turned_on is True:
passive_button_widget = passive_button_wrapper_widget.children["!ctklabel"]
@@ -112,14 +112,14 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings):
progressbar_attr_name="sb__progressbar_x_slider__progressbar_mic_energy_threshold",
passive_button_attr_name="sb__progressbar_x_slider__passive_button_mic_energy_threshold",
passive_button_command=lambda e: checkbox_input_speaker_threshold_check_callback(
passive_button_command=lambda e: checkbox_input_mic_threshold_check_callback(
e,
config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold,
config_window.sb__progressbar_x_slider__active_button_mic_energy_threshold,
is_turned_on=True,
),
active_button_attr_name="sb__progressbar_x_slider__active_button_mic_energy_threshold",
active_button_command=lambda e: checkbox_input_speaker_threshold_check_callback(
active_button_command=lambda e: checkbox_input_mic_threshold_check_callback(
e,
config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold,
config_window.sb__progressbar_x_slider__active_button_mic_energy_threshold,

View File

@@ -17,7 +17,7 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings):
def checkbox_input_speaker_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on):
print("is_turned_on", is_turned_on)
callFunctionIfCallable(config_window.CALLBACK_CHECK_SPEAKER_THRESHOLD, is_turned_on)
if is_turned_on is True:
passive_button_widget = passive_button_wrapper_widget.children["!ctklabel"]