Commit graph

9513 commits

Author SHA1 Message Date
telanus 632ecc065d Added the Supermodel Emulator
Added the Sega Model 3 Emulator: Supermodel. Needs all it's support files in ~/.local/share/supermodel/ (IE Assets) else it won't work
2024-01-19 18:32:58 -08:00
Daniel Johnson 1ca8619959 Clean up status_icon. It will now detect if it is running on X11; if not, we can't use Gtk.StatusIcon, so it won't try.
If neither AppIndicators nor Gtk.StatusIcon can be used, do not offer the status icon in the preferences either.
2024-01-18 19:10:39 -05:00
Daniel Johnson 59172a20dc TrashPortal needs some additional flags to bet set when opening its FD when in flatpak.
O_PATH because we are just pointing at the file, not really opening it. O_NOFOLLOW so we can trash a link not its target. O_CLOEXEC seems unnecessary, but it's what GLib does.

Resolves #5250
Resolves #5251
2024-01-18 17:00:53 -05:00
Daniel Johnson 4338513a67 No, size-request is no good, that enforces a minimum size!
Instead, I'll activate word-wrapped on the labels. If they are too long, they'll wrap instead of scrolling.
2024-01-18 04:43:53 -05:00
Daniel Johnson d660340ad7 Change PreferencesDialog to use a size request instead of default size.
The size can be smaller than required for the localized text; with a default size we get that size and wind up scrolling. Size request will not be honored if we'd have to scroll for that, so the localized text will fit.
2024-01-18 04:36:14 -05:00
Daniel Johnson d6faf75fb3 Add protection against None in steam.match_game()
This is confusing, but it looks like we pass None to match_game() when the Lutris API says some service game you have corresponds to a another service game from the same service you don't have

I don't understand when this would be true, but it's better not to crash over it.

Resolves #5248
2024-01-17 18:47:52 -05:00
Daniel Johnson 8054e6124b
Merge pull request #5245 from spiffeeroo/master
Fix Steam account name gui
2024-01-16 19:26:40 -05:00
Daniel Johnson 9067fb4cc7 Create the loading spinner in the glade UI file, not dynamically.
The spinner does not seem to start always when created dynamically. It seems like if blank_overlay has not been shown to the user yet, it fails - even if it is shown before the spinner starts. Once shown to the user, all is good.

This commit works around this by not putting the spinner inside blank_overlay at all, and just pre-creating it.
2024-01-16 19:23:58 -05:00
spiffeeroo 94d0552c3f
Fix Steam account name gui
Rename account.get=("PersonalName") to account.get("PersonaName").

$STEAMROOT/userdata/<AccountID>/config/localconfig.vdf has "PersonaName" inside of file.
2024-01-16 15:50:09 -08:00
farchord 8b0b21921e One more update to metainfo
Forgot a section.
2024-01-16 05:04:59 -08:00
farchord 95a7ca95db Fix metainfo.xml
There was a syntax error in the metainfo.xml file. Fixed!
2024-01-16 05:04:59 -08:00
Mathieu Comandon 85871982bc Update to 0.5.16 2024-01-15 16:22:10 -08:00
Daniel Johnson 54d950f0c2 Un-indent the file list commit code so it runs even if ther's no service and no installer-id.
Resolves #5238
2024-01-15 09:26:57 -05:00
Daniel Johnson 421f98b6a7 Raise the 'many games' limit to 512; without a debugger attached, the GameStore build code is quite a bit faster.
But it is still several times slower than fetching the games.

It's all still async regardless; this is just about when to show the spinner.
2024-01-14 14:01:14 -05:00
Daniel Johnson cb55b4ee8e Defer the spinner until we have the filtered game list- then we know how big the game store will be.
We can then show the spinner only if there are 'many' games- I find the GameStore construction is by far the slower part of this, so we can avoid UI flicker this way.

The GameStore is built on a thread regardless, to minimize the chance of the infamous Death Waggle bug. It just looks smoother not to flash the spinner.
2024-01-14 13:55:07 -05:00
Daniel Johnson 45d3a53d37 Display a spinner in the LutrisWindow while fetching games and building the GameStore. 2024-01-14 13:42:55 -05:00
Daniel Johnson 4c6a6daa76 Generate the GameStore on a thread; it's surprising how noticeable this is. 2024-01-14 13:23:14 -05:00
Daniel Johnson c2d298cb5f Tolerate missing run-in-background key.
Resolves #5233
2024-01-14 09:33:40 -05:00
Daniel Johnson 40ce354122 The account box should cope if a steam account somehow has no personal name.
We could probably do better than the ID here, but I don't know what we can use. The ID is better than crashing at least.
2024-01-14 09:26:34 -05:00
Daniel Johnson 8e0568ee29 Also use that new method to install dependency games. 2024-01-13 12:18:00 -08:00
Daniel Johnson 4391e98114 Also installed Lutris games via the AddGamesWindow via the new method
So this will also use AsyncCall to fetch the installers.
2024-01-13 12:18:00 -08:00
Daniel Johnson 6609f32229 Convert service client updaters to use AsyncCall.
I've had them all call a common method on the application, and it fetches the installers on a thread.
2024-01-13 12:18:00 -08:00
Daniel Johnson 40c49b0f19 The Lutris service can get its game installers on a thread too! 2024-01-13 12:18:00 -08:00
Daniel Johnson c51ed54f89 Move calls to obtain installers from the service onto AsyncCall. 2024-01-13 12:18:00 -08:00
Daniel Johnson 2b9358e7f2 Use AsyncCall to obtain updates and DLC.
Round-tripping to the GOG servers can take a little while.
2024-01-13 12:18:00 -08:00
Daniel Johnson 2b8703346a Check for the appid before loading extras.
You can have a GOG game off the Lutris website that does not download from GOG - you provide the installer file. "Alient Shooter" is one of these.

In this case, we have no appid and can get no extras, and we should not try to get them.
2024-01-13 08:45:34 -05:00
Daniel Johnson f56f4dd0e4 Work around the 'double files' bug.
If you click Continue fas enough, you can trigger the prepare_game_files() method to run twice, on two threads concurrently. This results in doubled up files and a duplicate files page in the navigation stack.

This is hard to fix simply or without UI ugliness, so this commit tolerates it.

It adjusts prepare_game_files() to be thread-safer (!) by committing its changes only at the end. The GIL should make this atomic, probably, so the last preparation wins instead of being combined with the other.

The navigation stack will now refuse to add a duplicate page; it still exits the old and re-enters but does not put the second entry in the history, so you'll go back further when you click the Back button.

That should hide the problem with minimal code churn and risk.
2024-01-13 06:04:55 -05:00
Daniel Johnson 0c1c8955d0 Even uglier unsafe signal fix
I'm not really sure that this code actually runs - there's dead code here for sure, and I can't prove we can ever match an existing game with an api-provided service installer.

Buuut if it does run it can crash us. We can't emi 'game-updated' on a thread, it absolutely hits GTK.

This commit moves the signal to the main thread and adds some error handling to avoid a NoneType error here too.

Super ugly this. Asyncio could do some much better!
2024-01-13 05:40:02 -05:00
Daniel Johnson 4ec0aeb9ee Fix move-game crash
Now here's a place where asyncio would clearly have helped.

But, the problem is that the move-game logic runs on a thread and changes the game. It saves the game and *that* fires the 'game-updated' signal. Various bits of the UI handle this to update the UI.

But GTK is not thread-safe at all, and updating the UI from a thread will sometimes crash it.

This commit suppresses the signal, and then manually fires it after the moe completes on the main thread in the AsyncCall callback.
2024-01-13 05:26:47 -05:00
Daniel Johnson bf169bc0ef Do not move a game that can't be moved; abort before making any changes instead.
However, we handle the exception here and show a warning dialog about this. The user can choose to just set the location without moving or updating anything - they'll have to fix things up themselves.

Should help with #5223
2024-01-12 19:44:27 -05:00
Daniel Johnson 6f283f21a4 Filter out products that are not installable from the extras list for GOG.
DLCs you do not own are listed by the GOG api but are _not_ installable, and we will get 404s trying to download the extras for them.

So let's not offer them at all.
2024-01-12 17:05:01 -05:00
Daniel Johnson 30b62ab94a Move steam game playtime transfer code down to the steam service.
It makes GOG crash, and probably other services too!
2024-01-12 17:01:37 -05:00
Daniel Johnson 0cca6e1bd5 If the GOG API won't provide download links, we'll skip those files. 2024-01-11 20:00:20 -05:00
Mathieu Comandon 2052ad4d6c Remove messages about 'checking credentials' which are most unhelpful 2024-01-11 15:40:48 -08:00
Daniel Johnson a3e36e1650 Enable download of DLC extras from GOG.
This is a bit painful; to do this we extract the downlink information when we pull the extras, and put that in the extras dict.

Then, InstallerWindow keeps the dict rather than just the ID from it; it passes the entire thing back into the service so that the GOG service can obtain the download subdict and it goes from there.

There are minimal changes for itch.io, the only other service with extras. The new code here just strips the IDs out and proceeds as before.
2024-01-11 15:33:32 -08:00
Mathieu Comandon 37d81a1cd6 Add some entries to the Changelog 2024-01-11 03:05:56 -08:00
Daniel Johnson 460904bb44 Add a visible warning about using Virtual Desktops with Proton or GE versions of Wine.
It's better to let users know this feature isn't going to be used. I'd use 'condition' here, but it does not support dynamic updates baed on config settings like the version.

This isn't perfect - a system provided Wine might not be detected at this point. But I think it is likely to be sufficient; the actual check against the Wine exe path remains anyway.

The rather gruff 'not supported' warning remains in any case.
2024-01-11 04:47:23 -05:00
Daniel Johnson 2c4fd23ed7 Update get_formatted_playtime() to use the same localized strings as parse_playtime()
This way the parse/format roundtrip will not be broken by translators getting creative, or forgetting some of the strings.

This does mean we'll lose the translations for playtimes in the next release. I'd hand-fix this, but @strcore has told me not to do this.
2024-01-11 04:25:24 -05:00
Daniel Johnson 647a4b0494 Simplify find_hours logic. Normalizing does not achieve anything now. 2024-01-11 04:17:05 -05:00
Mathieu Comandon e4cc1d3eaf Disable Wine virtual desktop when used with Wine-GE or Proton 2024-01-10 19:04:49 -08:00
Mathieu Comandon 8c0951fbd3 Sync Steam games playtime to Lutris 2024-01-10 18:47:00 -08:00
Mathieu Comandon a663f8006e Accept more formats in the playtime edit widget, add tests 2024-01-10 18:26:41 -08:00
Daniel Johnson 659bc241da Fix incorrect or inconsistent slug generation.
Only scummvm uses "lutris_slug" but it is provided for Gog too - with stale data.
2024-01-10 19:39:43 -05:00
Daniel Johnson 0e96bed1f7 Also move the SIGTERM and winekill stuff onto a worker thread. 2024-01-09 17:35:16 -05:00
Daniel Johnson 183d80a2d3 Actually SIGKILL processes at the end of force-stop on the worker thread, not the main thread. 2024-01-09 17:26:17 -05:00
Daniel Johnson 9f2888172a
Update changelog
Oops! Media are not going to the trash. That's still in an outstanding PR.
2024-01-09 10:13:59 -05:00
Daniel Johnson 04be24351c Duplicate @strcore's prophylactic code for the special lutris.py game service game lookup code too. 2024-01-09 04:33:32 -05:00
Mathieu Comandon af8d00c029 Unmurder the caching feature 2024-01-08 22:40:16 -08:00
Mathieu Comandon 81b756e3d9 Remove deprecated scaler option in Dosbox 2024-01-08 22:09:49 -08:00
Mathieu Comandon 10c0aacfe2 Allow AntimicroX to work from Flatpak 2024-01-08 21:51:59 -08:00