Commit graph

10378 commits

Author SHA1 Message Date
Daniel Johnson 80fdb19c02 Change default 'Installed Games Only' to show those games in a new install.
I think default was flipped by commit 01340c3499, and it looks like it's just a bug.

But with the new library-sync feature, which we guide users towards, the Lutris service is now gone, so 'Installed Games Only' effectively hides what used to be the Lutris service. I see this confusing users on Discord at least.

This only affects new installations of Lutris; the saved setting is still respected.
2024-05-11 05:56:13 -04:00
nierozec c833cd8853 Added foot terminal support 2024-05-08 14:14:01 -07:00
Daniel Johnson 6fc1684afb Keep an extra file in ~/.cache/lutris when in the process of logging in with WebConnectDialog; is_authenticated() is then false when this file is present, so even though we have cookies at this time, Lutris won't think we're already authenticated.
This means if you just close out of the WebConnectDialog, you are not considered to be logged in anyway- this extra file remains in that case.

Should help with #5406
2024-05-04 08:57:54 -04:00
Daniel Johnson f3218bddc8 When you click Refresh on a source but are no longer connected, let's log you out and back in; this will ask for new credentials and then reload anyway.
Should help with #5406
2024-05-04 08:21:02 -04:00
Daniel Johnson 59ed0335f0 Turns out pefile leaves attributes off entirely if the data wasn't found in the PE file; I'll add a check for that.
Also, index() does not return None, it raises an exception. I'll add handling for that case too.

Resolves #5460
2024-05-01 17:16:54 -04:00
Frost Core 31dfcd281d Fixed incorrect package manager in the OpenSUSE Note 2024-04-29 16:54:36 -07:00
Daniel Johnson cce8ef7ef0 Make SteamInstaller not a GObject and change it to use NotificationSource instead of signals. 2024-04-29 19:37:17 -04:00
Daniel Johnson 070d1f0837 BaseService is no longer a GObject. 2024-04-29 19:37:17 -04:00
Daniel Johnson f61df62c0a Replace BaseService signals with NotificationSource objects.
Also, extend NotificationSource to pass through arguments from the fire method.

This way, we can have global notifications and pass the service as an argument.
2024-04-29 19:37:17 -04:00
Mathieu Comandon f213290c89 Fix Steam Flatpak check 2024-04-29 16:21:38 -07:00
Daniel Johnson f7a47ffecd Use display_error() instead of ErrorDialog whenever handling an exception.
This will also special cases like KeyError to be handled specially.
2024-04-28 19:16:47 -04:00
Daniel Johnson bcbb95ff3f Move the error handlers dict into the dialogs module, so we can just use it wherever we had been using ErrorDialog.
This lets us display special dialogs (or at least special messages) for particular exceptions.
2024-04-28 19:12:46 -04:00
Daniel Johnson 8b6654a62a Fix KeyError handler so that it reports the traceback. 2024-04-28 18:54:22 -04:00
Daniel Johnson 245959c492 Move some of the idle_add() calls to scheduled_at_idle to simplify unscheduling. 2024-04-28 09:51:55 -04:00
Daniel Johnson 094fe7ad3f Update remaining timeout_add() calls to schedule_*_at_idle, except for Game.py where there's an outstanding PR I don't want to break. 2024-04-28 08:13:33 -04:00
Daniel Johnson 79ea234e35 Use word wrap on the results of updates in the preferences dialog
The actual list of updates is just too long for one line.
2024-04-28 07:26:23 -04:00
Daniel Johnson 3e42e79413 Use the IdleTask for the ProgressBox, using during runtime updates.
Also, fix a race in the IdleTask initialization, in case idle_add winds up running its idle function immediately- in this case the task is completed before it can be connected to its source.
2024-04-28 07:20:13 -04:00
Daniel Johnson 409397894a Rename "Unscheduler" to "IdleTask"
This isn't a function anymore, and can do a bit more than just unscheduling the things.
2024-04-28 07:03:03 -04:00
Daniel Johnson 4bc0f830e8 Use schedule_repeating_ functions for progress reporting and such. 2024-04-27 15:03:20 -04:00
Daniel Johnson b3b748cf32 Make remove_unused_categories() more thorough.
This will now delete any game_categories row that are orphaned - that is, are for a game or category that is not there. This will then allow the category itself to go, if all its games have been deleted.
2024-04-27 09:52:55 -04:00
Daniel Johnson 4061105d87 Use schedule_repeating_at_idle() for the heartbeat for installer commands.
Better to use it so it can be tested.
2024-04-27 09:32:29 -04:00
Daniel Johnson 1c231c16f7 Beef up the schedule_at_idle stuff to be more robust and simpler to use, and to avoid using None.
It now supports delay and has a version fo repeating tasks.

It returns an Unscheduler that can stop it from running, but this has interlocks so it is safer to use- it becomes disconnected and harmless after being used or if the task completes, so you can just unschedule all you want - no need to clear out source_id fields.

There's also a COMPLETED_UNSCHEDULER to use instead of None- already disconnected, this can be used when there's nothing to unschedule.

All this, and using this moves away from a direct dependency on GLib.
2024-04-27 09:23:05 -04:00
Daniel Johnson 760b99e708 Fix the fix! Made a type-o in the fix I just did. 2024-04-27 07:54:06 -04:00
Daniel Johnson 807507ee0c Add checks for missing API fields when fetching media URLs for the EA App.
Resolves #5456
2024-04-27 07:49:46 -04:00
Daniel Johnson 93856b5689 Provide type annotations for get_media_url() and get_media_urls(). 2024-04-27 07:43:43 -04:00
Daniel Johnson dec35e4522 Copy the categories of a game over when it is duplicated.
This is part of #5447
2024-04-22 18:27:25 -04:00
Daniel Johnson 5fe5c156fb Can't tread dict keys as attribute- we need to use get() here. 2024-04-22 16:32:56 -04:00
Daniel Johnson 854a84569a Fix the fix- localizable string need to use %s not {x} because they can't be f-strings.
ax#5446
2024-04-21 07:27:55 -04:00
Daniel Johnson 47dfafff88 Add some handling, logging, and fallback logic for failures in driver.py.
This can blow up pretty easily if '/proc/driver/nvidia/version' contains something unexpected, and that seems to happen pretty easily.

Resolves #5444 as well as we can for now.
2024-04-21 05:02:22 -04:00
Daniel Johnson 83b55721ec Better tolerance for broken Vulkan installs.
If vulkaninfo is present but fails to work or fails to find a GPUs we'll fall back on lspci to try to find something.
2024-04-20 09:34:37 -04:00
Daniel Johnson b32828f664 Adjust the error message when the default Wine is not found; this is likely because that Wine versions found were not compatible (ie, you are on 32-bit Linux) 2024-04-20 08:58:35 -04:00
Daniel Johnson 7b8c9ff33a Make sure the "Check Now" buttons will actually download and updated 'versions.json' again. 2024-04-20 08:16:12 -04:00
Daniel Johnson 16760cc09f Oops, I replaced one NoneType bug with another. Let's try that again. 2024-04-20 07:57:29 -04:00
Daniel Johnson 9ec54f5ecb Add more type annotations and fix a NoneType bug or two.
Resolves #5441
2024-04-20 07:14:52 -04:00
R1kaB3rN e2f35f5fcd Update umu environment variable
- ULWGL_LOG has been deprecated since the rename of the project, so debug statements will not be displayed in the console
2024-04-18 12:50:57 -07:00
R1kaB3rN db1869b3e0 Remove PROTON_LATEST 2024-04-18 12:50:46 -07:00
Mathieu Comandon 9558525728 Remove umu-proton 2024-04-18 11:31:59 -07:00
R1kaB3rN 0857b2b91e Add UMU-Proton to dropdown menu 2024-04-18 11:28:28 -07:00
R1kaB3rN d1afd68767 Return none for STORE instead of empty string
- When STORE is empty, protonfixes will fail to reference to the umu database for a game fix. This effects umu fixes for games such as starcitizen
2024-04-18 11:28:28 -07:00
Daniel Johnson 17ea62819e Do not try to set accepted_return_code if it is not going to be used.
It's only used by _monitor_task anyway.

Resolves #5429
2024-04-15 16:56:34 -04:00
Daniel Johnson b239c824d6
Merge pull request #5425 from CKolle/LC_ALL_translation
Ensure that LC_ALL gets treated as HOST_LC_ALL for proton compatibility
2024-04-14 17:04:32 -04:00
Christopher Liebich Kolle 98805414a1 Ensures that wineexec treats LC_ALL as HOST_LC_ALL 2024-04-14 13:21:12 +02:00
Christopher Liebich Kolle 14c839bf33 Set HOST_LC_ALL if LC_ALL is defined for Proton compatibility 2024-04-14 12:35:58 +02:00
Christopher Liebich Kolle 690ef051d7 Don't set HOST_LC_ALL if locale is not set 2024-04-14 12:32:08 +02:00
Christopher Liebich Kolle 3356b3189a Fixes spelling in comment 2024-04-14 12:28:27 +02:00
Daniel Johnson 323270975f Add None check when deciding whether to parse playtimes.
Resolves flathub/net.lutris.Lutris#421
2024-04-14 06:08:19 -04:00
Daniel Johnson 051908f686
Merge pull request #5423 from CKolle/bug_fix_proton_env
Fix NoneType error in get_game_id function
2024-04-13 17:27:44 -04:00
Christopher Liebich Kolle 26ed58349e Fix NoneType error in get_game_id function 2024-04-13 23:03:45 +02:00
Christopher Liebich Kolle b3914c6be7 Using is_proton_path instead 2024-04-13 07:37:49 -07:00
Christopher Liebich Kolle 164c148abd Adds support for HOST_LC_ALL for proton versions of the wine runner. 2024-04-13 07:37:49 -07:00