mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-01 11:28:10 +03:00
Added "AutoUpdateAssetFiles" settings
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Vendored
+8
@@ -1083,6 +1083,14 @@ TRANSLATION = {
|
||||
"ZH": "开机启动",
|
||||
"isReviewed": "True"
|
||||
},
|
||||
"Automatically Update Asset Files": {
|
||||
"source": [
|
||||
"Furious.TrayActions.Settings"
|
||||
],
|
||||
"RU": "Автоматически обновлять файлы активов",
|
||||
"ZH": "自动更新资源文件",
|
||||
"isReviewed": "True"
|
||||
},
|
||||
"Show Progress Bar When Connecting": {
|
||||
"source": [
|
||||
"Furious.TrayActions.Settings"
|
||||
|
||||
@@ -296,9 +296,12 @@ class ConnectAction(AppQAction):
|
||||
if SystemRuntime.appImagePath():
|
||||
logger.info('skipped auto assets update due to running from Linux AppImage')
|
||||
else:
|
||||
# Automatically update assets
|
||||
self.assetDownloadManager.configureHttpProxy(connectedHttpProxy)
|
||||
self.assetDownloadManager.download()
|
||||
if AppSettings.isStateON_('AutoUpdateAssetFiles'):
|
||||
# Automatically update assets
|
||||
self.assetDownloadManager.configureHttpProxy(connectedHttpProxy)
|
||||
self.assetDownloadManager.download()
|
||||
else:
|
||||
logger.info('skipped auto assets update due to settings')
|
||||
|
||||
def callActionFromQueue(self):
|
||||
try:
|
||||
|
||||
@@ -33,6 +33,9 @@ if PLATFORM == 'Darwin':
|
||||
|
||||
registerAppSettings('StartupOnBoot', isBinary=True, default=AppBinarySettings.ON_)
|
||||
registerAppSettings('PowerSaveMode', isBinary=True, default=AppBinarySettings.ON_)
|
||||
registerAppSettings(
|
||||
'AutoUpdateAssetFiles', isBinary=True, default=AppBinarySettings.ON_
|
||||
)
|
||||
registerAppSettings(
|
||||
'ShowProgressBarWhenConnecting', isBinary=True, default=AppBinarySettings.ON_
|
||||
)
|
||||
@@ -128,6 +131,11 @@ class SettingsChildAction(AppQAction):
|
||||
AppSettings.turnOFF('PowerSaveMode')
|
||||
|
||||
showNewChangesNextTimeMBox()
|
||||
elif self.textCompare('Automatically Update Asset Files'):
|
||||
if checked:
|
||||
AppSettings.turnON_('AutoUpdateAssetFiles')
|
||||
else:
|
||||
AppSettings.turnOFF('AutoUpdateAssetFiles')
|
||||
elif self.textCompare('Show Progress Bar When Connecting'):
|
||||
if checked:
|
||||
AppSettings.turnON_('ShowProgressBarWhenConnecting')
|
||||
@@ -161,7 +169,7 @@ class SettingsAction(AppQAction):
|
||||
AppQSeperator(),
|
||||
]
|
||||
else:
|
||||
tunActions = [None]
|
||||
tunActions = []
|
||||
|
||||
if PLATFORM == 'Darwin':
|
||||
hideDockIconAction = [
|
||||
@@ -172,7 +180,18 @@ class SettingsAction(AppQAction):
|
||||
)
|
||||
]
|
||||
else:
|
||||
hideDockIconAction = [None]
|
||||
hideDockIconAction = []
|
||||
|
||||
if SystemRuntime.appImagePath():
|
||||
autoUpdateAssetFilesAction = []
|
||||
else:
|
||||
autoUpdateAssetFilesAction = (
|
||||
SettingsChildAction(
|
||||
_('Automatically Update Asset Files'),
|
||||
checkable=True,
|
||||
checked=AppSettings.isStateON_('AutoUpdateAssetFiles'),
|
||||
),
|
||||
)
|
||||
|
||||
super().__init__(
|
||||
_('Settings'),
|
||||
@@ -202,6 +221,7 @@ class SettingsAction(AppQAction):
|
||||
checked=AppSettings.isStateON_('PowerSaveMode'),
|
||||
),
|
||||
AppQSeperator(),
|
||||
*autoUpdateAssetFilesAction,
|
||||
SettingsChildAction(
|
||||
_('Show Progress Bar When Connecting'),
|
||||
checkable=True,
|
||||
|
||||
@@ -42,7 +42,7 @@ class XrayAssetViewerWindow(AppQMainWindow):
|
||||
self.setCentralWidget(self.xrayAssetViewerWidget)
|
||||
|
||||
if versionToValue(PYSIDE6_VERSION) <= versionToValue('6.1.3'):
|
||||
openAssetDirectoryActions = [None]
|
||||
openAssetDirectoryActions = []
|
||||
else:
|
||||
# openUrl will crash on PySide6 6.1.3, probably a Qt bug
|
||||
openAssetDirectoryActions = [
|
||||
|
||||
Reference in New Issue
Block a user