fix: paths in config

This commit is contained in:
RedDeadDepresso
2024-07-25 15:00:16 +01:00
parent be99cd3ff0
commit 13d47889d7
4 changed files with 13 additions and 13 deletions

View File

@@ -37,13 +37,15 @@ class Config(QConfig):
# core
gamePath = ConfigItem("Core", "GamePath", "C:/Program Files (x86)/Steam/steamapps/common/Koikatsu Party", FolderValidator())
documentsPath = os.path.join(os.path.expanduser('~'), 'Documents')
downloadsPath = os.path.join(os.path.expanduser('~'), 'Downloads')
# createBackup
backupEnable = ConfigItem(
"CreateBackup", "Enable", False, BoolValidator()
)
backupPath = ConfigItem(
"CreateBackup", "OutputPath", "C:/Backup", FolderValidator()
"CreateBackup", "OutputPath", documentsPath, FolderValidator()
)
filename = ConfigItem(
"CreateBackup", "Filename", "koikatsu_backup",
@@ -63,7 +65,7 @@ class Config(QConfig):
"FilterConvertKKS", "Enable", False, BoolValidator()
)
fccksPath = ConfigItem(
"FilterConvertKKS", "InputPath", "", FolderValidator()
"FilterConvertKKS", "InputPath", downloadsPath, FolderValidator()
)
convert = ConfigItem(
"FilterConvertKKS", "Convert", False, BoolValidator()
@@ -74,12 +76,12 @@ class Config(QConfig):
"InstallChara", "Enable", False, BoolValidator()
)
installPath = ConfigItem(
"InstallChara", "InputPath", "", FolderValidator())
"InstallChara", "InputPath", downloadsPath, FolderValidator())
fileConflicts = OptionsConfigItem(
"InstallChara", "FileConflicts", "Skip", OptionsValidator(["Skip", "Replace", "Rename"])
)
archivePassword = OptionsConfigItem(
"InstallChara", "FileConflicts", "Skip", OptionsValidator(["Skip", "Request Password"])
"InstallChara", "Password", "Skip", OptionsValidator(["Skip", "Request Password"])
)
# removeChara
@@ -87,7 +89,7 @@ class Config(QConfig):
"RemoveChara", "Enable", False, BoolValidator()
)
removePath = ConfigItem(
"RemoveChara", "InputPath", "", FolderValidator())
"RemoveChara", "InputPath", downloadsPath, FolderValidator())
# main window
micaEnabled = ConfigItem("MainWindow", "MicaEnabled", isWin11(), BoolValidator())

View File

@@ -69,11 +69,8 @@ class Logger:
def colorize(self, line):
adding = line
print(line)
for i, s in enumerate(self.text):
if s in line:
print(s)
print(self.statusColor[i])
adding = (f'''
<div style="font-family: Consolas, monospace;color:{self.statusColor[i]};">
{line}

View File

@@ -44,6 +44,7 @@ class MainWindow(FluentWindow):
signalBus.micaEnableChanged.connect(self.setMicaEffectEnabled)
signalBus.switchToSettingGroup.connect(self.switchToSetting)
signalBus.supportSignal.connect(self.onSupport)
signalBus.startSignal.connect(lambda: self.stackedWidget.setCurrentWidget(self.loggerInterface, False))
def initNavigation(self):
# add navigation items

View File

@@ -45,7 +45,7 @@ class SettingInterface(ScrollArea):
self.tr('Choose folder'),
FIF.ZIP_FOLDER,
self.tr("Backup directory"),
cfg.get(cfg.gamePath),
cfg.get(cfg.backupPath),
self.backupGroup
)
self.filenameCard = LineEditSettingCard(
@@ -84,7 +84,7 @@ class SettingInterface(ScrollArea):
self.tr('Choose folder'),
FIF.DOWNLOAD,
self.tr("Input directory"),
cfg.get(cfg.gamePath),
cfg.get(cfg.fccksPath),
self.fckksGroup
)
self.convertCard = SwitchSettingCard(
@@ -102,7 +102,7 @@ class SettingInterface(ScrollArea):
self.tr('Choose folder'),
FIF.DOWNLOAD,
self.tr("Input directory"),
cfg.get(cfg.gamePath),
cfg.get(cfg.installPath),
self.installGroup,
)
self.fileConflictsCard = ComboBoxSettingCard(
@@ -128,7 +128,7 @@ class SettingInterface(ScrollArea):
self.tr('Choose folder'),
FIF.DOWNLOAD,
self.tr("Input directory"),
cfg.get(cfg.gamePath),
cfg.get(cfg.removePath),
self.removeGroup,
)