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