From a18ab0ca18189635cd4b8d774a69d920f3dabd15 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Mon, 29 Jan 2024 18:12:43 +0000 Subject: [PATCH 1/4] CtInfo: Update CtInfo Game List After Batch Update --- pupgui2/pupgui2ctinfodialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pupgui2/pupgui2ctinfodialog.py b/pupgui2/pupgui2ctinfodialog.py index 301df3fc..d21904a7 100644 --- a/pupgui2/pupgui2ctinfodialog.py +++ b/pupgui2/pupgui2ctinfodialog.py @@ -137,7 +137,7 @@ def list_games_cell_double_clicked(self, row): def btn_batch_update_clicked(self): steam_config_folder = self.install_loc.get('vdf_dir') ctbu_dialog = PupguiCtBatchUpdateDialog(parent=self.ui, current_ctool_name=self.ctool.displayname, games=self.games, steam_config_folder=steam_config_folder) - ctbu_dialog.batch_update_complete.connect(self.update_game_list_steam) + ctbu_dialog.batch_update_complete.connect(lambda: self.update_game_list(cached=False)) def btn_refresh_games_clicked(self): self.update_game_list(cached=False) From 2448f7b8093a5e8cee606ef581204714f5549a26 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Mon, 29 Jan 2024 18:15:21 +0000 Subject: [PATCH 2/4] CtInfo: Emit batch_update_complete in update_game_list --- pupgui2/pupgui2ctinfodialog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pupgui2/pupgui2ctinfodialog.py b/pupgui2/pupgui2ctinfodialog.py index d21904a7..e643bc6c 100644 --- a/pupgui2/pupgui2ctinfodialog.py +++ b/pupgui2/pupgui2ctinfodialog.py @@ -74,6 +74,7 @@ def update_game_list(self, cached=True): self.ui.listGames.setEnabled(False) self.update_game_list_ui() + self.batch_update_complete.emit(True) def update_game_list_steam(self, cached=True): if self.install_loc.get('launcher') == 'steam' and 'vdf_dir' in self.install_loc: @@ -90,8 +91,6 @@ def update_game_list_steam(self, cached=True): self.ui.listGames.setItem(i, 0, dataitem_appid) self.ui.listGames.setItem(i, 1, QTableWidgetItem(game.game_name)) - self.batch_update_complete.emit(True) - def update_game_list_lutris(self): self.games = [game for game in get_lutris_game_list(self.install_loc) if game.runner == 'wine' and game.get_game_config().get('wine', {}).get('version') == self.ctool.displayname] From c0d469fb738eec58cfbe647dc2c57d1b4af8a6aa Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Mon, 29 Jan 2024 18:19:18 +0000 Subject: [PATCH 3/4] CtInfo: Call btn_refresh_games_clicked for batch_update_complete signal instead --- pupgui2/pupgui2ctinfodialog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pupgui2/pupgui2ctinfodialog.py b/pupgui2/pupgui2ctinfodialog.py index e643bc6c..67987eae 100644 --- a/pupgui2/pupgui2ctinfodialog.py +++ b/pupgui2/pupgui2ctinfodialog.py @@ -74,7 +74,6 @@ def update_game_list(self, cached=True): self.ui.listGames.setEnabled(False) self.update_game_list_ui() - self.batch_update_complete.emit(True) def update_game_list_steam(self, cached=True): if self.install_loc.get('launcher') == 'steam' and 'vdf_dir' in self.install_loc: @@ -136,7 +135,7 @@ def list_games_cell_double_clicked(self, row): def btn_batch_update_clicked(self): steam_config_folder = self.install_loc.get('vdf_dir') ctbu_dialog = PupguiCtBatchUpdateDialog(parent=self.ui, current_ctool_name=self.ctool.displayname, games=self.games, steam_config_folder=steam_config_folder) - ctbu_dialog.batch_update_complete.connect(lambda: self.update_game_list(cached=False)) + ctbu_dialog.batch_update_complete.connect(self.btn_refresh_games_clicked) def btn_refresh_games_clicked(self): self.update_game_list(cached=False) From 5e5fd9de054992bc15f9202c427f405a89bcd78c Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Mon, 29 Jan 2024 18:20:07 +0000 Subject: [PATCH 4/4] CtInfo: Move batch_update_complete emit back to update_game_list --- pupgui2/pupgui2ctinfodialog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pupgui2/pupgui2ctinfodialog.py b/pupgui2/pupgui2ctinfodialog.py index 67987eae..e6e20137 100644 --- a/pupgui2/pupgui2ctinfodialog.py +++ b/pupgui2/pupgui2ctinfodialog.py @@ -74,6 +74,7 @@ def update_game_list(self, cached=True): self.ui.listGames.setEnabled(False) self.update_game_list_ui() + self.batch_update_complete.emit(True) def update_game_list_steam(self, cached=True): if self.install_loc.get('launcher') == 'steam' and 'vdf_dir' in self.install_loc: