[Update] Config Window: Restore DeepL Auth Key UI

This commit is contained in:
Sakamoto Shiina
2023-10-19 15:36:04 +09:00
parent d6dfd0ae9a
commit 7aefe652e5
5 changed files with 43 additions and 25 deletions

View File

@@ -10,7 +10,7 @@ from .setting_box_containers.setting_box_appearance import createSettingBox_Appe
from .setting_box_containers.setting_box_transcription import createSettingBox_Mic, createSettingBox_Speaker
from .setting_box_containers.setting_box_others import createSettingBox_Others
from .setting_box_containers.setting_box_advanced_settings import createSettingBox_AdvancedSettings
# from .setting_box_containers.setting_box_translation import createSettingBox_Translation
from .setting_box_containers.setting_box_translation import createSettingBox_Translation
def createSideMenuAndSettingsBoxContainers(config_window, settings, view_variable):
@@ -66,18 +66,18 @@ def createSideMenuAndSettingsBoxContainers(config_window, settings, view_variabl
]
},
},
# {
# "side_menu_tab_attr_name": "side_menu_tab_translation",
# "label_attr_name": "label_translation",
# "selected_mark_attr_name": "selected_mark_translation",
# "textvariable": view_variable.VAR_SIDE_MENU_LABEL_TRANSLATION,
# "setting_box_container_settings": {
# "setting_box_container_attr_name": "setting_box_container_translation",
# "setting_boxes": [
# { "var_section_title": None, "setting_box": createSettingBox_Translation },
# ]
# },
# },
{
"side_menu_tab_attr_name": "side_menu_tab_translation",
"label_attr_name": "label_translation",
"selected_mark_attr_name": "selected_mark_translation",
"textvariable": view_variable.VAR_SIDE_MENU_LABEL_TRANSLATION,
"setting_box_container_settings": {
"setting_box_container_attr_name": "setting_box_container_translation",
"setting_boxes": [
{ "var_section_title": None, "setting_box": createSettingBox_Translation },
]
},
},
{
"side_menu_tab_attr_name": "side_menu_tab_transcription",
"label_attr_name": "label_transcription",

View File

@@ -3,4 +3,22 @@ from utils import callFunctionIfCallable
from .._SettingBoxGenerator import _SettingBoxGenerator
def createSettingBox_Translation(setting_box_wrapper, config_window, settings, view_variable):
pass
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
createSettingBoxEntry = sbg.createSettingBoxEntry
def deepl_authkey_callback(value):
callFunctionIfCallable(view_variable.CALLBACK_SET_DEEPL_AUTHKEY, value)
row=0
config_window.sb__deepl_authkey = createSettingBoxEntry(
for_var_label_text=view_variable.VAR_LABEL_DEEPL_AUTH_KEY,
for_var_desc_text=view_variable.VAR_DESC_DEEPL_AUTH_KEY,
entry_attr_name="sb__entry_deepl_authkey",
entry_width=settings.uism.RESPONSIVE_UI_SIZE_INT_300,
entry_bind__Any_KeyRelease=lambda value: deepl_authkey_callback(value),
entry_textvariable=view_variable.VAR_DEEPL_AUTH_KEY,
)
config_window.sb__deepl_authkey.grid(row=row, pady=0)
row+=1