[Remove] Config Window: Speaker Device自動設定により、UIから選択項目を削除。また、config.CHOICE_SPEAKER_DEVICE が "NoDevice"だったときの初期処理も必要なくなったのでview.pyからも削除。
This commit is contained in:
@@ -4,7 +4,6 @@ from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu
|
||||
createSettingBoxSwitch = sbg.createSettingBoxSwitch
|
||||
createSettingBoxProgressbarXSlider = sbg.createSettingBoxProgressbarXSlider
|
||||
createSettingBoxEntry = sbg.createSettingBoxEntry
|
||||
@@ -14,9 +13,6 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_
|
||||
callFunctionIfCallable(view_variable.CALLBACK_CHECK_SPEAKER_THRESHOLD, is_turned_on)
|
||||
|
||||
|
||||
def optionmenu_input_speaker_device_callback(value):
|
||||
callFunctionIfCallable(view_variable.CALLBACK_SET_SPEAKER_DEVICE, value)
|
||||
|
||||
def slider_input_speaker_energy_threshold_callback(value):
|
||||
callFunctionIfCallable(view_variable.CALLBACK_SET_SPEAKER_ENERGY_THRESHOLD, value)
|
||||
|
||||
@@ -36,18 +32,6 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_
|
||||
|
||||
|
||||
row=0
|
||||
config_window.sb__speaker_device = createSettingBoxDropdownMenu(
|
||||
for_var_label_text=view_variable.VAR_LABEL_SPEAKER_DEVICE,
|
||||
for_var_desc_text=view_variable.VAR_DESC_SPEAKER_DEVICE,
|
||||
optionmenu_attr_name="sb__optionmenu_speaker_device",
|
||||
dropdown_menu_values=view_variable.LIST_SPEAKER_DEVICE,
|
||||
dropdown_menu_width=settings.uism.RESPONSIVE_UI_SIZE_INT_500,
|
||||
command=lambda value: optionmenu_input_speaker_device_callback(value),
|
||||
variable=view_variable.VAR_SPEAKER_DEVICE,
|
||||
)
|
||||
config_window.sb__speaker_device.grid(row=row)
|
||||
row+=1
|
||||
|
||||
config_window.sb__speaker_dynamic_energy_threshold = createSettingBoxSwitch(
|
||||
for_var_label_text=view_variable.VAR_LABEL_SPEAKER_DYNAMIC_ENERGY_THRESHOLD,
|
||||
for_var_desc_text=view_variable.VAR_DESC_SPEAKER_DYNAMIC_ENERGY_THRESHOLD,
|
||||
|
||||
Reference in New Issue
Block a user