[Add] Config Window: Auto Export Message Logs(LOGファイル出力機能)を設定項目に追加。カテゴリーはOthersとした。
This commit is contained in:
7
view.py
7
view.py
@@ -219,6 +219,12 @@ class View():
|
||||
CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY=None,
|
||||
VAR_ENABLE_NOTICE_XSOVERLAY=BooleanVar(value=config.ENABLE_NOTICE_XSOVERLAY),
|
||||
|
||||
VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=StringVar(value="Auto Export Message Logs"),
|
||||
VAR_DESC_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=StringVar(value="Automatically export the conversation messages as a text file."),
|
||||
CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=None,
|
||||
VAR_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=BooleanVar(value=config.ENABLE_LOGGER),
|
||||
|
||||
|
||||
VAR_LABEL_MESSAGE_FORMAT=StringVar(value="Message Format"),
|
||||
VAR_DESC_MESSAGE_FORMAT=StringVar(value="You can change the decoration of the message you want to send. (Default: \"[message]([translation])\" )"),
|
||||
CALLBACK_SET_MESSAGE_FORMAT=None,
|
||||
@@ -314,6 +320,7 @@ class View():
|
||||
# Others Tab
|
||||
self.view_variable.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX = config_window["callback_set_enable_auto_clear_chatbox"]
|
||||
self.view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY = config_window["callback_set_enable_notice_xsoverlay"]
|
||||
self.view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS = config_window.get("callback_set_enable_auto_export_message_logs", None)
|
||||
self.view_variable.CALLBACK_SET_MESSAGE_FORMAT = config_window["callback_set_message_format"]
|
||||
|
||||
# Advanced Settings Tab
|
||||
|
||||
@@ -15,6 +15,9 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v
|
||||
def checkbox_notice_xsoverlay_callback(checkbox_box_widget):
|
||||
callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get())
|
||||
|
||||
def checkbox_auto_export_message_logs_callback(checkbox_box_widget):
|
||||
callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, checkbox_box_widget.get())
|
||||
|
||||
def entry_message_format_callback(value):
|
||||
callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, value)
|
||||
|
||||
@@ -44,6 +47,18 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v
|
||||
row+=1
|
||||
|
||||
|
||||
config_window.sb__auto_export_message_logs = createSettingBoxCheckbox(
|
||||
parent_widget=setting_box_wrapper,
|
||||
for_var_label_text=view_variable.VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS,
|
||||
for_var_desc_text=view_variable.VAR_DESC_ENABLE_AUTO_EXPORT_MESSAGE_LOGS,
|
||||
checkbox_attr_name="sb__checkbox_auto_export_message_logs",
|
||||
command=lambda: checkbox_auto_export_message_logs_callback(config_window.sb__checkbox_auto_export_message_logs),
|
||||
variable=view_variable.VAR_ENABLE_AUTO_EXPORT_MESSAGE_LOGS,
|
||||
)
|
||||
config_window.sb__auto_export_message_logs.grid(row=row)
|
||||
row+=1
|
||||
|
||||
|
||||
config_window.sb__message_format = createSettingBoxEntry(
|
||||
parent_widget=setting_box_wrapper,
|
||||
for_var_label_text=view_variable.VAR_LABEL_MESSAGE_FORMAT,
|
||||
|
||||
Reference in New Issue
Block a user