mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-11 16:27:19 +10:00
gui_settings.py: Fix typing for boolean values
This commit is contained in:
@@ -13,7 +13,7 @@ from .detections import device_probe
|
||||
class Constants:
|
||||
def __init__(self) -> None:
|
||||
# Patcher Versioning
|
||||
self.patcher_version: str = "2.1.0" # OpenCore-Legacy-Patcher
|
||||
self.patcher_version: str = "2.1.1" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "1.8.4" # PatcherSupportPkg
|
||||
self.copyright_date: str = "Copyright © 2020-2024 Dortania"
|
||||
self.patcher_name: str = "OpenCore Legacy Patcher"
|
||||
|
||||
@@ -1115,13 +1115,17 @@ Hardware Information:
|
||||
def _update_setting(self, variable, value):
|
||||
logging.info(f"Updating Local Setting: {variable} = {value}")
|
||||
setattr(self.constants, variable, value)
|
||||
tmp_value = value or "PYTHON_NONE_VALUE"
|
||||
tmp_value = value
|
||||
if tmp_value is None:
|
||||
tmp_value = "PYTHON_NONE_VALUE"
|
||||
global_settings.GlobalEnviromentSettings().write_property(f"GUI:{variable}", tmp_value)
|
||||
|
||||
|
||||
def _update_global_settings(self, variable, value, global_setting = None):
|
||||
logging.info(f"Updating Global Setting: {variable} = {value}")
|
||||
tmp_value = value or "PYTHON_NONE_VALUE"
|
||||
tmp_value = value
|
||||
if tmp_value is None:
|
||||
tmp_value = "PYTHON_NONE_VALUE"
|
||||
global_settings.GlobalEnviromentSettings().write_property(variable, tmp_value)
|
||||
if global_setting is not None:
|
||||
self._update_setting(global_setting, value)
|
||||
|
||||
Reference in New Issue
Block a user