[Refactor] Remove the code that is no longer in use.

This commit is contained in:
Sakamoto Shiina
2023-10-12 17:03:26 +09:00
parent 67611af116
commit f185b2f475
3 changed files with 2 additions and 44 deletions

View File

@@ -1,8 +1,8 @@
from customtkinter import CTkImage
def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, status, target_names):
if target_names == "All":
target_names = ["mic_energy_threshold_check_button", "speaker_energy_threshold_check_button"]
# if target_names == "All":
# target_names = []
def disableOptionmenuWidget(target_widget):
@@ -17,25 +17,6 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
for target_name in target_names:
match target_name:
case "mic_energy_threshold_check_button":
if status == "disabled":
config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
elif status == "normal":
config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR)
config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR)
case "speaker_energy_threshold_check_button":
if status == "disabled":
config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
elif status == "normal":
config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR)
config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR)
case "sb__optionmenu_mic_host":
if status == "disabled":
target_widget = config_window.sb__widgets["sb__optionmenu_mic_host"]