diff --git a/main.py b/main.py index cf787652..efba02c8 100644 --- a/main.py +++ b/main.py @@ -164,6 +164,7 @@ def setYourLanguageAndCountry(select): config.SOURCE_COUNTRY = country config.CHOICE_TRANSLATOR = model.findTranslationEngine(config.SOURCE_LANGUAGE, config.TARGET_LANGUAGE) model.authenticationTranslator(callbackSetAuthKeys) + view.printToTextbox_selectedYourLanguages(select) def setTargetLanguageAndCountry(select): languages = config.SELECTED_TAB_TARGET_LANGUAGES @@ -174,6 +175,7 @@ def setTargetLanguageAndCountry(select): config.TARGET_COUNTRY = country config.CHOICE_TRANSLATOR = model.findTranslationEngine(config.SOURCE_LANGUAGE, config.TARGET_LANGUAGE) model.authenticationTranslator(callbackSetAuthKeys) + view.printToTextbox_selectedTargetLanguages(select) def callbackSelectedLanguagePresetTab(selected_tab_no): config.SELECTED_TAB_NO = selected_tab_no @@ -190,6 +192,7 @@ def callbackSelectedLanguagePresetTab(selected_tab_no): config.TARGET_COUNTRY = country config.CHOICE_TRANSLATOR = model.findTranslationEngine(config.SOURCE_LANGUAGE, config.TARGET_LANGUAGE) model.authenticationTranslator(callbackSetAuthKeys) + view.printToTextbox_changedLanguagePresetTab(config.SELECTED_TAB_NO) def callbackSetAuthKeys(keys): config.AUTH_KEYS = keys diff --git a/view.py b/view.py index 135bb6c7..13de0d26 100644 --- a/view.py +++ b/view.py @@ -471,6 +471,26 @@ class View(): self._printToTextbox_Info(f"Detect WordFilter :{detected_message}") + + def printToTextbox_selectedYourLanguages(self, selected_your_language): + your_language = selected_your_language.replace("\n", " ") + self._printToTextbox_Info(f"Your Language has changed : {your_language}") + + def printToTextbox_selectedTargetLanguages(self, selected_target_language): + target_language = selected_target_language.replace("\n", " ") + self._printToTextbox_Info(f"Target Language has changed : {target_language}") + + def printToTextbox_latestSelectedLanguages(self): + your_language = self.view_variable.VAR_YOUR_LANGUAGE.get().replace("\n", " ") + target_language = self.view_variable.VAR_TARGET_LANGUAGE.get().replace("\n", " ") + self._printToTextbox_Info(f"Your Language : {your_language} -- Target Language : {target_language}") + + def printToTextbox_changedLanguagePresetTab(self, tab_no:str): + your_language = config.SELECTED_TAB_YOUR_LANGUAGES[tab_no].replace("\n", " ") + target_language = config.SELECTED_TAB_TARGET_LANGUAGES[tab_no].replace("\n", " ") + self._printToTextbox_Info(f"Switched Language Preset. No.{tab_no}\nYour Language : {your_language} -- Target Language : {target_language}") + + @staticmethod def _printToTextbox_Info(info_message): vrct_gui.printToTextbox( diff --git a/vrct_gui/_CreateSelectableLanguagesWindow.py b/vrct_gui/_CreateSelectableLanguagesWindow.py index e0c8d6ce..5892f7d1 100644 --- a/vrct_gui/_CreateSelectableLanguagesWindow.py +++ b/vrct_gui/_CreateSelectableLanguagesWindow.py @@ -62,8 +62,8 @@ class _CreateSelectableLanguagesWindow(CTkToplevel): callback = self._view_variable.CALLBACK_SELECTED_TARGET_LANGUAGE target_variable = self._view_variable.VAR_TARGET_LANGUAGE - callFunctionIfCallable(callback, value) target_variable.set(value) + callFunctionIfCallable(callback, value) self.vrct_gui.closeSelectableLanguagesWindow() diff --git a/vrct_gui/config_window/widgets/createSettingBoxTopBar/_createSettingBoxCompactModeButton.py b/vrct_gui/config_window/widgets/createSettingBoxTopBar/_createSettingBoxCompactModeButton.py index 7ffc533f..bc61811b 100644 --- a/vrct_gui/config_window/widgets/createSettingBoxTopBar/_createSettingBoxCompactModeButton.py +++ b/vrct_gui/config_window/widgets/createSettingBoxTopBar/_createSettingBoxCompactModeButton.py @@ -3,7 +3,6 @@ from customtkinter import CTkFont, CTkFrame, CTkLabel, CTkSwitch def _createSettingBoxCompactModeButton(parent_widget, config_window, settings, view_variable): def switchConfigWindowCompactMode(): - print(config_window.setting_box_compact_mode_switch_box.get()) if config_window.setting_box_compact_mode_switch_box.get() is True: if callable(view_variable.CALLBACK_ENABLE_CONFIG_WINDOW_COMPACT_MODE) is True: view_variable.CALLBACK_ENABLE_CONFIG_WINDOW_COMPACT_MODE() diff --git a/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py b/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py index 5ed03a2c..24dcd842 100644 --- a/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py +++ b/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py @@ -32,19 +32,16 @@ def createSidebarLanguagesSettings(settings, main_window, view_variable): def switchToPreset1(e): - print("1") callFunctionIfCallable(view_variable.CALLBACK_SELECTED_LANGUAGE_PRESET_TAB, "1") target_active_widget = getattr(main_window, "sls__presets_button_1") switchPresetTabFunction(target_active_widget) def switchToPreset2(e): - print("2") callFunctionIfCallable(view_variable.CALLBACK_SELECTED_LANGUAGE_PRESET_TAB, "2") target_active_widget = getattr(main_window, "sls__presets_button_2") switchPresetTabFunction(target_active_widget) def switchToPreset3(e): - print("3") callFunctionIfCallable(view_variable.CALLBACK_SELECTED_LANGUAGE_PRESET_TAB, "3") target_active_widget = getattr(main_window, "sls__presets_button_3") switchPresetTabFunction(target_active_widget) diff --git a/vrct_gui/main_window/widgets/create_textbox.py b/vrct_gui/main_window/widgets/create_textbox.py index b47d7ac0..404220a4 100644 --- a/vrct_gui/main_window/widgets/create_textbox.py +++ b/vrct_gui/main_window/widgets/create_textbox.py @@ -11,25 +11,21 @@ def createTextbox(settings, main_window, view_variable): main_window.current_active_textbox.grid() def switchToTextboxAll(e): - print("switchToTextboxAll") target_active_widget = getattr(main_window, "textbox_tab_all") switchTextboxTabFunction(target_active_widget) switchTextbox("textbox_all") def switchToTextboxSent(e): - print("switchToTextboxSent") target_active_widget = getattr(main_window, "textbox_tab_sent") switchTextboxTabFunction(target_active_widget) switchTextbox("textbox_sent") def switchToTextboxReceived(e): - print("switchToTextboxReceived") target_active_widget = getattr(main_window, "textbox_tab_received") switchTextboxTabFunction(target_active_widget) switchTextbox("textbox_received") def switchToTextboxSystem(e): - print("switchToTextboxSystem") target_active_widget = getattr(main_window, "textbox_tab_system") switchTextboxTabFunction(target_active_widget) switchTextbox("textbox_system") diff --git a/vrct_gui/ui_managers/ColorThemeManager.py b/vrct_gui/ui_managers/ColorThemeManager.py index f0e5c6d1..9c288b55 100644 --- a/vrct_gui/ui_managers/ColorThemeManager.py +++ b/vrct_gui/ui_managers/ColorThemeManager.py @@ -2,7 +2,6 @@ from types import SimpleNamespace class ColorThemeManager(): def __init__(self, theme): - print(theme) self.main = SimpleNamespace() self.config_window = SimpleNamespace() self.selectable_language_window = SimpleNamespace() diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index 06f5284f..a5769c12 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -3,7 +3,6 @@ from types import SimpleNamespace class UiScalingManager(): def __init__(self, scaling_percentage): scaling_float = int(scaling_percentage.replace("%", "")) / 100 - print(scaling_float) self.SCALING_FLOAT = max(scaling_float, 0.4) self.main = SimpleNamespace() self.config_window = SimpleNamespace()