[Update/Refactor] 設定画面にて「翻訳機能を使用する」のオンオフで、メイン画面翻訳エンジン選択Widgetの表示非表示を切り替え。

「翻訳機能を使用する」オンオフをprocessとして切り出してviewで管理。
This commit is contained in:
Sakamoto Shiina
2024-01-17 18:17:46 +09:00
parent 6e64edb1c6
commit a067bfa733
3 changed files with 21 additions and 14 deletions

View File

@@ -487,12 +487,9 @@ def callbackSetUseTranslationFeature(value):
print("callbackSetUseTranslationFeature", value)
config.USE_TRANSLATION_FEATURE = value
if config.USE_TRANSLATION_FEATURE is True:
view.setLatestCTranslate2WeightType()
view.openCtranslate2WeightTypeWidget()
view.setTranslationSwitchStatus("normal", release_locked_state=True)
view.useTranslationFeatureProcess("Normal")
else:
view.closeCtranslate2WeightTypeWidget()
view.setTranslationSwitchStatus("disabled", to_lock_state=True)
view.useTranslationFeatureProcess("Disable")
def callbackSetCtranslate2WeightType(value):
print("callbackSetCtranslate2WeightType", value)