From 19b2cbb010efff8e6627f3577f2b3a036e550aab Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Fri, 1 Sep 2023 03:29:33 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=89=E6=95=B0=E5=90=8D=20=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E5=90=8D=E5=A4=89=E6=9B=B4:=20chatbox=20->=20message?= =?UTF-8?q?=20box.=20=E3=83=A1=E3=82=A4=E3=83=B3=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E5=85=A5=E5=8A=9B?= =?UTF-8?q?=E6=AC=84=E3=81=AE=E4=BA=8B=E3=81=AFmessage=20box.=20chatbox?= =?UTF-8?q?=E3=81=AFvrc=E5=86=85=E3=81=AEchatbox=E3=82=82=E3=81=82?= =?UTF-8?q?=E3=82=8B=E3=81=AE=E3=81=A7=E5=91=BC=E3=81=B3=E6=96=B9=E3=82=92?= =?UTF-8?q?=E5=88=86=E3=81=91=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 12 ++++++------ main.py | 10 +++++----- view.py | 2 +- vrct_gui/config_window/ConfigWindow.py | 2 +- .../setting_box_others/createSettingBox_Others.py | 14 +++++++------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config.py b/config.py index a66921a4..1e86fa4a 100644 --- a/config.py +++ b/config.py @@ -359,13 +359,13 @@ class Config: saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value) @property - def ENABLE_AUTO_CLEAR_CHATBOX(self): - return self._ENABLE_AUTO_CLEAR_CHATBOX + def ENABLE_AUTO_CLEAR_MESSAGE_BOX(self): + return self._ENABLE_AUTO_CLEAR_MESSAGE_BOX - @ENABLE_AUTO_CLEAR_CHATBOX.setter - def ENABLE_AUTO_CLEAR_CHATBOX(self, value): + @ENABLE_AUTO_CLEAR_MESSAGE_BOX.setter + def ENABLE_AUTO_CLEAR_MESSAGE_BOX(self, value): if type(value) is bool: - self._ENABLE_AUTO_CLEAR_CHATBOX = value + self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = value saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value) @property @@ -493,7 +493,7 @@ class Config: "Google(web)": None, } self._MESSAGE_FORMAT = "[message]([translation])" - self._ENABLE_AUTO_CLEAR_CHATBOX = False + self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = False self._ENABLE_NOTICE_XSOVERLAY = False self._ENABLE_OSC = False self._UPDATE_FLAG = False diff --git a/main.py b/main.py index 17eb02b8..c939d26b 100644 --- a/main.py +++ b/main.py @@ -90,7 +90,7 @@ def sendChatMessage(message): view.printToTextbox_SentMessage(message, translation) # delete message in entry message box - if config.ENABLE_AUTO_CLEAR_CHATBOX is True: + if config.ENABLE_AUTO_CLEAR_MESSAGE_BOX is True: view.clearMessageBox() def messageBoxPressKeyEnter(e): @@ -344,9 +344,9 @@ def callbackSetSpeakerMaxPhrases(value): # Others Tab -def callbackSetEnableAutoClearChatbox(value): - print("callbackSetEnableAutoClearChatbox", value) - config.ENABLE_AUTO_CLEAR_CHATBOX = value +def callbackSetEnableAutoClearMessageBox(value): + print("callbackSetEnableAutoClearMessageBox", value) + config.ENABLE_AUTO_CLEAR_MESSAGE_BOX = value def callbackSetEnableNoticeXsoverlay(value): print("callbackSetEnableNoticeXsoverlay", value) @@ -446,7 +446,7 @@ view.register( "callback_set_speaker_max_phrases": callbackSetSpeakerMaxPhrases, # Others Tab - "callback_set_enable_auto_clear_chatbox": callbackSetEnableAutoClearChatbox, + "callback_set_enable_auto_clear_chatbox": callbackSetEnableAutoClearMessageBox, "callback_set_enable_notice_xsoverlay": callbackSetEnableNoticeXsoverlay, "callback_set_message_format": callbackSetMessageFormat, diff --git a/view.py b/view.py index 56132574..975921f8 100644 --- a/view.py +++ b/view.py @@ -102,7 +102,7 @@ class View(): vrct_gui.config_window.CALLBACK_SET_SPEAKER_MAX_PHRASES = config_window["callback_set_speaker_max_phrases"] # Others Tab - vrct_gui.config_window.CALLBACK_SET_ENABLE_AUTO_CLEAR_CHATBOX = config_window["callback_set_enable_auto_clear_chatbox"] + vrct_gui.config_window.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX = config_window["callback_set_enable_auto_clear_chatbox"] vrct_gui.config_window.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY = config_window["callback_set_enable_notice_xsoverlay"] vrct_gui.config_window.CALLBACK_SET_MESSAGE_FORMAT = config_window["callback_set_message_format"] diff --git a/vrct_gui/config_window/ConfigWindow.py b/vrct_gui/config_window/ConfigWindow.py index f561a370..25e03688 100644 --- a/vrct_gui/config_window/ConfigWindow.py +++ b/vrct_gui/config_window/ConfigWindow.py @@ -51,7 +51,7 @@ class ConfigWindow(CTkToplevel): self.CALLBACK_SET_SPEAKER_MAX_PHRASES = None # Others Tab - self.CALLBACK_SET_ENABLE_AUTO_CLEAR_CHATBOX = None + self.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX = None self.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY = None self.CALLBACK_SET_MESSAGE_FORMAT = None diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py index c5cb4fb2..b0d77325 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py @@ -14,9 +14,9 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings): createSettingBoxEntry = sbg.createSettingBoxEntry - # 関数名 chatbox から messagebox に変える予定 config.ENABLE_AUTO_CLEAR_CHATBOX も MESSAGEBOXに変えるかな。 - def checkbox_auto_clear_chatbox_callback(checkbox_box_widget): - callFunctionIfCallable(config_window.CALLBACK_SET_ENABLE_AUTO_CLEAR_CHATBOX, checkbox_box_widget.get()) + # 元 checkbox_auto_clear_chatbox_callback + def checkbox_auto_clear_message_box_callback(checkbox_box_widget): + callFunctionIfCallable(config_window.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX, checkbox_box_widget.get()) def checkbox_notice_xsoverlay_callback(checkbox_box_widget): callFunctionIfCallable(config_window.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get()) @@ -26,15 +26,15 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings): row=0 - config_window.sb__auto_clear_chatbox = createSettingBoxCheckbox( + config_window.sb__auto_clear_message_box = createSettingBoxCheckbox( parent_widget=setting_box_wrapper, label_text="Auto Clear The Message Box", desc_text="Clear the message box after sending your message.", - checkbox_attr_name="sb__checkbox_auto_clear_chatbox", - command=lambda: checkbox_auto_clear_chatbox_callback(config_window.sb__checkbox_auto_clear_chatbox), + checkbox_attr_name="sb__checkbox_auto_clear_message_box", + command=lambda: checkbox_auto_clear_message_box_callback(config_window.sb__checkbox_auto_clear_message_box), is_checked=False ) - config_window.sb__auto_clear_chatbox.grid(row=row) + config_window.sb__auto_clear_message_box.grid(row=row) row+=1