From 13d47889d71e898ecc52a017c132ca8912e69556 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:00:16 +0100 Subject: [PATCH] fix: paths in config --- app/common/config.py | 14 ++++++++------ app/common/logger.py | 3 --- app/view/main_window.py | 1 + app/view/setting_interface.py | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/common/config.py b/app/common/config.py index 6620d4c..0e88146 100644 --- a/app/common/config.py +++ b/app/common/config.py @@ -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()) diff --git a/app/common/logger.py b/app/common/logger.py index d66f30b..2739898 100644 --- a/app/common/logger.py +++ b/app/common/logger.py @@ -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'''
{line} diff --git a/app/view/main_window.py b/app/view/main_window.py index 0b587a9..c764149 100644 --- a/app/view/main_window.py +++ b/app/view/main_window.py @@ -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 diff --git a/app/view/setting_interface.py b/app/view/setting_interface.py index 221eca2..98d281b 100644 --- a/app/view/setting_interface.py +++ b/app/view/setting_interface.py @@ -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, )