Commit graph

9933 commits

Author SHA1 Message Date
Mathieu Comandon 24f8fee432 Re-enable imports sorting 2024-02-24 21:14:32 -08:00
Mathieu Comandon b9ae42fd9b Add a #noqa 2024-02-24 21:07:29 -08:00
Mathieu Comandon 395d8a03f0 Ruff fixes 2024-02-24 21:05:10 -08:00
Mathieu Comandon 38fbe9f05e Ruff reformat 2024-02-24 21:02:06 -08:00
Mathieu Comandon 2c9d12337d Update Makefile 2024-02-24 21:01:38 -08:00
Mathieu Comandon 1a96ec822c Update ruff.toml 2024-02-24 20:58:42 -08:00
Mathieu Comandon 7ec328131b Merge branch 'qarmin-ruff' 2024-02-24 20:56:00 -08:00
Mathieu Comandon 2b9b89d068 Start making xrandr logs more noisy so we eventually reduce their calls 2024-02-23 16:24:25 -08:00
Mathieu Comandon c8b4fc1332 Add environment variable to be able to bypass all vkquery calls 2024-02-23 14:56:31 -08:00
Daniel Johnson 4345d044de More extensive commenting for GameActions 2024-02-23 13:44:22 -08:00
Daniel Johnson 4559073cde Remove the games list from all GameActions but MultiGameActions; SingleGameActions.game can just be an ordinary field. 2024-02-23 13:44:22 -08:00
Daniel Johnson 720cb63863 Remove all the game loops from SingleGameAction, using a property for now 2024-02-23 13:44:22 -08:00
Daniel Johnson f3dae5b119 Merge BaseGameActions and GameActions. 2024-02-23 13:44:22 -08:00
Daniel Johnson 57e9263e84 Split GameActions into separate subclasses for the single and multi game cases, moving single-game-only methods down into it. 2024-02-23 13:44:22 -08:00
Daniel Johnson a3b3f44387 Add explanatory comments about destroying the VKInstance. 2024-02-23 13:44:22 -08:00
Daniel Johnson c5fb590d1e Never destroy a VKInstance; just allocate on demand and keep it while Lutris runs.
For some reason, destroy the VKInstance cause some users to crash. I can't see why. But how about we don't do that?

Resolve #5222
2024-02-23 13:44:22 -08:00
Daniel Johnson 1c59619b58 Block the game actions for multi-selections that contain service games.
These offer a non-functional 'Add to favorites' command. There are no actions that work on multiple service games, or mixes of service and library games.
2024-02-23 13:44:22 -08:00
Mathieu Comandon aed2b064d7 Increment version to get ULWGL in the Runtime API 2024-02-23 13:44:22 -08:00
Mathieu Comandon 083c6b8373 Seems like this should use launch_config_name like the other methods 2024-02-23 13:44:22 -08:00
Daniel Johnson aac64a99b1 Treat a missing or None category as "all", so Runner and Platform views work again. 2024-02-23 13:44:22 -08:00
Mathieu Comandon 26c9621bbb Remove Lutris service from defaults and hide it behind an environment variable 2024-02-23 13:44:22 -08:00
Mathieu Comandon 05e55dfe79 Sync library on launch and game install 2024-02-23 13:44:22 -08:00
Mathieu Comandon 4566f02b25 Run initial sync when first enabled 2024-02-23 13:44:22 -08:00
Mathieu Comandon 84b6d9aefd Add login/logout button to account section 2024-02-23 13:44:22 -08:00
Daniel Johnson 330ef613bc Provide message for the hidden row when it is empty, but also disable 'Show Hidden Games' when there are no hidden games. 2024-02-23 13:44:21 -08:00
Daniel Johnson 20d354232e Hide the hidden row when it is not selected, that is, when you switch away from it. 2024-02-23 13:44:21 -08:00
Daniel Johnson 5aa976e3fa Avoid selected hidden rows when starting up.
This means you won't return to the hidden row *or* the running row; instead you will go to the 'Games' view on start-up.
2024-02-23 13:44:21 -08:00
Daniel Johnson b840c1389f Fix bugs in the filtering so hidden games are hidden, except in the hidden view, and update as soon as you hide them or unhide them. 2024-02-23 13:44:21 -08:00
Daniel Johnson fefbb38d12 Adjust hidden and favorites code for consistency, also add some commenting. 2024-02-23 13:44:21 -08:00
Daniel Johnson 87db808be2 Remove old 'hidden' column from schema, add migration to category
This only works because we don't remove the column from existing databases, but we won't create it in new ones.

There's a bit of error handling so we silently skip the migration if the column's not there.

Also fix broken migration code, so migrations are applied with no init dialog.
2024-02-23 13:44:21 -08:00
Daniel Johnson e0c77de925 Make the 'Hidden' sidebar row itself hidden initially; convert the Show Hidden Games from a toggle to a command.
It shows the hidden sidebar row and selects it.
2024-02-23 13:44:21 -08:00
Daniel Johnson 95e8c95cd9 Make a '.hidden' category and convert Lutris 'hidden' flag to work with it, like with favorites. 2024-02-23 13:44:21 -08:00
Daniel Johnson bcede06990 Fix rebase whoopsie! I did that that import. 2024-02-23 13:44:21 -08:00
Daniel Johnson 1b7cbd7043 Check for whether we got an image file extensions; if not we'll have to transcode and hope. 2024-02-23 13:44:21 -08:00
Daniel Johnson 274524a081 Correct rebase whoopsie! 2024-02-23 13:44:21 -08:00
Daniel Johnson e3b6c03031 Convert the pick-a-custom image to using the trash too, which involves a lot of callback spaghetti.
However, it also avoids a usage of GTK on a worker thread, which was a bug.
2024-02-23 13:44:21 -08:00
Daniel Johnson c8c6c0c756 Trash the media files on refresh, don't just delete them. 2024-02-23 13:44:21 -08:00
Daniel Johnson 76ecd7ba83 Handle possible-path resolution separately at each call site
This means we now delete all media when you click the refresh button.
2024-02-23 13:44:21 -08:00
Daniel Johnson efa543083b Do not try to use empty files as media. 2024-02-23 13:44:21 -08:00
Daniel Johnson d7bde7ce15 Pass multiple paths to the cell renderer.
This way it can update the display immediately without an updated GameStore.
2024-02-23 13:44:21 -08:00
Daniel Johnson 236f0c9999 Replace the single file pattern for service-media with a list
It's a list of one element except for Lutris banners and cover-art; these now support both .jpg and .png, where the user can assign either file type without transcoding.

This, in turn, allow transparency to be used in banners and cover-art via PNG files.

We still transcode any other file types into JPEG files here.
2024-02-23 13:44:21 -08:00
Mathieu Comandon 08466f2258 Send delete payload as an array 2024-02-23 13:44:21 -08:00
Daniel Johnson bd9c4327b6 Apply sorting to category-views also.
I think this code-path was relying on database sorting, which was a bug.
2024-02-23 13:44:21 -08:00
Daniel Johnson 921ec55c72 Remove the view-updated signal in favor of just calling update_store(). 2024-02-23 13:44:21 -08:00
Daniel Johnson 3722426941 Add the flag for multiple-runner-versions to Wine; this allows the right version to download during game installation.
Resolves #5302
2024-02-23 13:44:21 -08:00
Daniel Johnson 9d5ad0d674 Correct changed type information for UninstallGameDialog
The parent window was optional before, but now it is required, so it can be notified about game-removal.

Strictly speaking it needs to be a LutrisWindow, but I can't see how to statically test that with mypy.
2024-02-23 13:44:21 -08:00
Daniel Johnson 45fd28856b Fix my derpy type annotation errors. 2024-02-23 13:44:21 -08:00
Daniel Johnson fbbcf2dff7 Also require the delegate for Game.install(), and we are already providing it. 2024-02-23 13:44:21 -08:00
Daniel Johnson 342a1cb24f Switch the install_updates and install_dlc to use the InstallUIDelegate, and always provide it.
Also, increase pylint max-parents. This thing is not measuring the depth of the hierarchy- we're being penalized for multiple inheritance here.
2024-02-23 13:44:19 -08:00
Daniel Johnson 172e524ba7 Pass in the launch UI delegate explicitly for launch()
This would be better with asyncio; we could keep the InstallWindow or whatnot visible until the game starts.

As it is, we'll just use the LutrisWindow for this.
2024-02-23 13:43:46 -08:00