Merge pull request #139 from kra-mo/store-improvements

Store improvements
This commit is contained in:
kramo
2023-07-07 18:27:42 +02:00
committed by GitHub
43 changed files with 2311 additions and 1744 deletions

View File

@@ -212,10 +212,9 @@ class PreferencesWindow(Adw.PreferencesWindow):
self.toast.dismiss()
def remove_all_games(self, *_args):
for game in shared.store.games.values():
for game in shared.store:
if not game.removed:
self.removed_games.add(game)
game.removed = True
game.save()
game.update()
@@ -343,14 +342,17 @@ class PreferencesWindow(Adw.PreferencesWindow):
# Bad picked location, inform user
else:
if location_name == "cache":
title = _("Invalid Directory")
# The variable is the name of the source
subtitle_format = _("Select the {} cache directory.")
else:
title = _("Invalid Directory")
# The variable is the name of the source
subtitle_format = _("Select the {} installation directory.")
title = _("Invalid Directory")
match location_name:
case "cache":
# The variable is the name of the source
subtitle_format = _("Select the {} cache directory.")
case "config":
# The variable is the name of the source
subtitle_format = _("Select the {} configuration directory.")
case "data":
# The variable is the name of the source
subtitle_format = _("Select the {} data directory.")
dialog = create_dialog(
self,
title,