Merge branch 'comment_out__startup_osc_enabled_check' into UI_2.0

This commit is contained in:
Sakamoto Shiina
2023-10-13 14:26:52 +09:00
4 changed files with 39 additions and 34 deletions

View File

@@ -486,16 +486,17 @@ class Config:
self._ENABLE_SEND_MESSAGE_TO_VRC = value self._ENABLE_SEND_MESSAGE_TO_VRC = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value) saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
@property # [deprecated]
@json_serializable('STARTUP_OSC_ENABLED_CHECK') # @property
def STARTUP_OSC_ENABLED_CHECK(self): # @json_serializable('STARTUP_OSC_ENABLED_CHECK')
return self._STARTUP_OSC_ENABLED_CHECK # def STARTUP_OSC_ENABLED_CHECK(self):
# return self._STARTUP_OSC_ENABLED_CHECK
@STARTUP_OSC_ENABLED_CHECK.setter # @STARTUP_OSC_ENABLED_CHECK.setter
def STARTUP_OSC_ENABLED_CHECK(self, value): # def STARTUP_OSC_ENABLED_CHECK(self, value):
if type(value) is bool: # if type(value) is bool:
self._STARTUP_OSC_ENABLED_CHECK = value # self._STARTUP_OSC_ENABLED_CHECK = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value) # saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
@property @property
@json_serializable('ENABLE_LOGGER') @json_serializable('ENABLE_LOGGER')
@@ -587,7 +588,7 @@ class Config:
self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = True self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = True
self._ENABLE_NOTICE_XSOVERLAY = False self._ENABLE_NOTICE_XSOVERLAY = False
self._ENABLE_SEND_MESSAGE_TO_VRC = True self._ENABLE_SEND_MESSAGE_TO_VRC = True
self._STARTUP_OSC_ENABLED_CHECK = True # self._STARTUP_OSC_ENABLED_CHECK = True # [deprecated]
self._ENABLE_LOGGER = False self._ENABLE_LOGGER = False
self._IS_CONFIG_WINDOW_COMPACT_MODE = False self._IS_CONFIG_WINDOW_COMPACT_MODE = False

View File

@@ -592,9 +592,10 @@ def callbackSetEnableSendMessageToVrc(value):
print("callbackSetEnableSendMessageToVrc", value) print("callbackSetEnableSendMessageToVrc", value)
config.ENABLE_SEND_MESSAGE_TO_VRC = value config.ENABLE_SEND_MESSAGE_TO_VRC = value
def callbackSetStartupOscEnabledCheck(value): # [deprecated]
print("callbackSetStartupOscEnabledCheck", value) # def callbackSetStartupOscEnabledCheck(value):
config.STARTUP_OSC_ENABLED_CHECK = value # print("callbackSetStartupOscEnabledCheck", value)
# config.STARTUP_OSC_ENABLED_CHECK = value
# Advanced Settings Tab # Advanced Settings Tab
def callbackSetOscIpAddress(value): def callbackSetOscIpAddress(value):
@@ -621,9 +622,9 @@ def createMainWindow():
# set word filter # set word filter
model.addKeywords() model.addKeywords()
# check OSC started # check OSC started [deprecated]
if config.STARTUP_OSC_ENABLED_CHECK is True and config.ENABLE_SEND_MESSAGE_TO_VRC is True: # if config.STARTUP_OSC_ENABLED_CHECK is True and config.ENABLE_SEND_MESSAGE_TO_VRC is True:
model.checkOSCStarted(view.printToTextbox_OSCError) # model.checkOSCStarted(view.printToTextbox_OSCError)
# check Software Updated # check Software Updated
if model.checkSoftwareUpdated() is True: if model.checkSoftwareUpdated() is True:
@@ -707,7 +708,7 @@ def createMainWindow():
"callback_set_enable_auto_export_message_logs": callbackSetEnableAutoExportMessageLogs, "callback_set_enable_auto_export_message_logs": callbackSetEnableAutoExportMessageLogs,
"callback_set_message_format": callbackSetMessageFormat, "callback_set_message_format": callbackSetMessageFormat,
"callback_set_enable_send_message_to_vrc": callbackSetEnableSendMessageToVrc, "callback_set_enable_send_message_to_vrc": callbackSetEnableSendMessageToVrc,
"callback_set_startup_osc_enabled_check": callbackSetStartupOscEnabledCheck, # "callback_set_startup_osc_enabled_check": callbackSetStartupOscEnabledCheck, # [deprecated]
# Advanced Settings Tab # Advanced Settings Tab
"callback_set_osc_ip_address": callbackSetOscIpAddress, "callback_set_osc_ip_address": callbackSetOscIpAddress,

11
view.py
View File

@@ -309,10 +309,11 @@ class View():
CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC=None, CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC=None,
VAR_ENABLE_SEND_MESSAGE_TO_VRC=BooleanVar(value=config.ENABLE_SEND_MESSAGE_TO_VRC), VAR_ENABLE_SEND_MESSAGE_TO_VRC=BooleanVar(value=config.ENABLE_SEND_MESSAGE_TO_VRC),
VAR_LABEL_STARTUP_OSC_ENABLED_CHECK=StringVar(value=i18n.t("config_window.startup_osc_enabled_check.label")), # [deprecated]
VAR_DESC_STARTUP_OSC_ENABLED_CHECK=StringVar(value=i18n.t("config_window.startup_osc_enabled_check.desc")), # VAR_LABEL_STARTUP_OSC_ENABLED_CHECK=StringVar(value=i18n.t("config_window.startup_osc_enabled_check.label")),
CALLBACK_SET_STARTUP_OSC_ENABLED_CHECK=None, # VAR_DESC_STARTUP_OSC_ENABLED_CHECK=StringVar(value=i18n.t("config_window.startup_osc_enabled_check.desc")),
VAR_STARTUP_OSC_ENABLED_CHECK=BooleanVar(value=config.STARTUP_OSC_ENABLED_CHECK), # CALLBACK_SET_STARTUP_OSC_ENABLED_CHECK=None,
# VAR_STARTUP_OSC_ENABLED_CHECK=BooleanVar(value=config.STARTUP_OSC_ENABLED_CHECK),
@@ -438,7 +439,7 @@ class View():
self.view_variable.CALLBACK_SET_MESSAGE_FORMAT = config_window_registers.get("callback_set_message_format", None) self.view_variable.CALLBACK_SET_MESSAGE_FORMAT = config_window_registers.get("callback_set_message_format", None)
self.view_variable.CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC = config_window_registers.get("callback_set_enable_send_message_to_vrc", None) self.view_variable.CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC = config_window_registers.get("callback_set_enable_send_message_to_vrc", None)
self.view_variable.CALLBACK_SET_STARTUP_OSC_ENABLED_CHECK = config_window_registers.get("callback_set_startup_osc_enabled_check", None) # self.view_variable.CALLBACK_SET_STARTUP_OSC_ENABLED_CHECK = config_window_registers.get("callback_set_startup_osc_enabled_check", None) #[deprecated]
# Advanced Settings Tab # Advanced Settings Tab
self.view_variable.CALLBACK_SET_OSC_IP_ADDRESS = config_window_registers.get("callback_set_osc_ip_address", None) self.view_variable.CALLBACK_SET_OSC_IP_ADDRESS = config_window_registers.get("callback_set_osc_ip_address", None)

View File

@@ -21,8 +21,9 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v
def checkbox_enable_send_message_to_vrc_callback(checkbox_box_widget): def checkbox_enable_send_message_to_vrc_callback(checkbox_box_widget):
callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC, checkbox_box_widget.get()) callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC, checkbox_box_widget.get())
def checkbox_startup_osc_enabled_check_callback(checkbox_box_widget): # [deprecated]
callFunctionIfCallable(view_variable.CALLBACK_SET_STARTUP_OSC_ENABLED_CHECK, checkbox_box_widget.get()) # def checkbox_startup_osc_enabled_check_callback(checkbox_box_widget):
# callFunctionIfCallable(view_variable.CALLBACK_SET_STARTUP_OSC_ENABLED_CHECK, checkbox_box_widget.get())
def entry_message_format_callback(value): def entry_message_format_callback(value):
callFunctionIfCallable(view_variable.CALLBACK_SET_MESSAGE_FORMAT, value) callFunctionIfCallable(view_variable.CALLBACK_SET_MESSAGE_FORMAT, value)
@@ -81,16 +82,17 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v
command=lambda: checkbox_enable_send_message_to_vrc_callback(config_window.sb__checkbox_enable_send_message_to_vrc), command=lambda: checkbox_enable_send_message_to_vrc_callback(config_window.sb__checkbox_enable_send_message_to_vrc),
variable=view_variable.VAR_ENABLE_SEND_MESSAGE_TO_VRC, variable=view_variable.VAR_ENABLE_SEND_MESSAGE_TO_VRC,
) )
config_window.sb__enable_send_message_to_vrc.grid(row=row) config_window.sb__enable_send_message_to_vrc.grid(row=row, pady=0)
row+=1 row+=1
config_window.sb__startup_osc_enabled_check = createSettingBoxCheckbox( # [deprecated]
for_var_label_text=view_variable.VAR_LABEL_STARTUP_OSC_ENABLED_CHECK, # config_window.sb__startup_osc_enabled_check = createSettingBoxCheckbox(
for_var_desc_text=view_variable.VAR_DESC_STARTUP_OSC_ENABLED_CHECK, # for_var_label_text=view_variable.VAR_LABEL_STARTUP_OSC_ENABLED_CHECK,
checkbox_attr_name="sb__checkbox_startup_osc_enabled_check", # for_var_desc_text=view_variable.VAR_DESC_STARTUP_OSC_ENABLED_CHECK,
command=lambda: checkbox_startup_osc_enabled_check_callback(config_window.sb__checkbox_startup_osc_enabled_check), # checkbox_attr_name="sb__checkbox_startup_osc_enabled_check",
variable=view_variable.VAR_STARTUP_OSC_ENABLED_CHECK, # command=lambda: checkbox_startup_osc_enabled_check_callback(config_window.sb__checkbox_startup_osc_enabled_check),
) # variable=view_variable.VAR_STARTUP_OSC_ENABLED_CHECK,
config_window.sb__startup_osc_enabled_check.grid(row=row, pady=0) # )
row+=1 # config_window.sb__startup_osc_enabled_check.grid(row=row, pady=0)
# row+=1