Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Select Support for 'Categories' #5376

Merged
merged 8 commits into from Apr 4, 2024
Merged

Conversation

danieljohnson2
Copy link
Contributor

This PR adds the Categories command to the game-actions when selecting multiple games. This makes it easier to categorize a bunch of games. You can use Lutris's filtering features to find the games, then select games and categorize them in bunches.

Previously you could do the changes one game at a time, or use the edit-category dialog- but with no filtering or anything, just a big stack of check-boxes.

Here's what it looks like when you multi-select and use the 'Categories' command.

Screenshot from 2024-03-23 09-26-34

Check 'em off an go! But if some games were in categories already, you might see this:

Screenshot from 2024-03-23 09-25-44

The 'inconsistent' check-boxes can be checked and unchecked, but if left inconsistent then those categories are not updated when you save.

When you do save (with a multi-select) you get a warning dialog:

Screenshot from 2024-03-23 09-26-01

This is mainly to warn you that this is more than a single game's categories, but the count is accurate- it works out which games require changes, which may not be all you have selected.

Finally, this isn't like 'uninstall games'- you can still get a 'Categories' window for one game at a time, to view side by side say. This means it's possible to get overlapping dialogs, where you are editing the same game in more than one dialog. But that was possible anyway, because you can show the edit dialog for the category itself at the same time.

Resolves #5372

When a category is applied to some but not all selected games, an indeterminate checkbox shows. Click it and it becomes determinate (and checked).

On save, any remaining indeterminate categories are skipped, but we work out what categories are to be added or removed for each game in turn.

Resolves #5372
This way if you try to use the Categories command while the window is open, it can just adopt additional games.

Though without a game list, it's hard to know what the dialog will actually do.
…hown, to avoid the checkbox checking animation.

Still can't be an __init__ argument with the games- we need to add games to an already open window.
This is in case you do not realize the dialog is for >1 game; it will warn even if only one is being changed. If you are viewing 1 game and change it, no warning since that is the expected case.
…compare side by side).

If you multi-select, we will have a single common multi-category dialog. This can lead to overlap, where a game categories are in two windows. This doesn't seem to cause any real problems.

Also, move the game count into a subtitle so it fits better.
…ialog, and also in the sidebar. Also, natural sorting for games in the category-games dialog.

Some more commenting too.
@strycore strycore merged commit 7b67e62 into master Apr 4, 2024
4 checks passed
@danieljohnson2 danieljohnson2 deleted the dj/multi_select_categories branch April 4, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Option to add/remove Multiple games from a category
2 participants