Daniel Johnson
0bba2e0986
Add French, Greek, and Polish to the locale dropdown
...
These also have localizations for Lutris, but I overlooked them. So, here there are.
2023-12-30 08:50:27 -05:00
Daniel Johnson
8a2290f8ed
Use @cache_single for get_default_runner_version_info() too!
...
The trick is that we almost always call it with fixed arguments: get_default_runner_version_info("wine", None).
So, I provide a function to do just that at moving the caching there.
The remaining call to get_default_runner_version_info() is from an install() method that does lots of heavy slow things, so the caching there should not be missed.
2023-12-29 19:02:08 -08:00
Daniel Johnson
e93f5e3c8a
Replace every @lru_cache with @cache_single except one.
...
This is all the functions that have no arguments; the one leftover has arguments so @cache_single will not work.
2023-12-29 19:02:08 -08:00
Daniel Johnson
797a5f41bf
Add our very own '@cache_single' decorator that caches a single result for a function with no arguments at all.
...
This can replace '@lru_cache' in most of our usages, and has simpler behavior. No metrics, no caching exceptions, nothing you don't absolutely need.
2023-12-29 19:02:08 -08:00
Daniel Johnson
004ddcc8e5
Fix a duplicate line, and bugged error handling.
...
If an error occurs downloading Lutris media, then image_refresh_cb() gets an error but no image_type, and it crashes. I'll tweak it to not crash.
2023-12-29 17:00:18 -05:00
Mathieu Comandon
6d7a65ac9c
Ok, I sort of see why but we should really consider another solution
2023-12-28 21:20:40 -08:00
Mathieu Comandon
215df1720e
why
2023-12-28 21:12:27 -08:00
Mathieu Comandon
75c9eab9ae
Download media during identifier change in background
2023-12-28 21:08:57 -08:00
Mathieu Comandon
82aadf18fa
Save custom images in background
2023-12-28 20:57:25 -08:00
Mathieu Comandon
5e1a73836b
Rename confusing method:
2023-12-28 20:47:21 -08:00
Mathieu Comandon
2b514989e0
Run media reset in background
2023-12-28 20:41:48 -08:00
Daniel Johnson
ae8f654779
Yeah, I can use AsyncCall. If I have to. I guess.
...
The uninstall-game dialog computes folder sizes one at time. With this commit, it updates the UI for each one as it completes, instead of waiting for the whole set to be done.
Looks nicer this way.
2023-12-28 18:40:40 -05:00
Mathieu Comandon
4e81e3634f
Move Image.BICUBIC to Image.Resampling.BICUBIC
2023-12-28 15:38:09 -08:00
Mathieu Comandon
088c325b29
Formatting
2023-12-28 15:29:59 -08:00
Mathieu Comandon
85444a0b77
Rename common.py to game_common.py
2023-12-28 15:29:42 -08:00
Mathieu Comandon
48affb629b
Use install type in Flathub installer to avoid crashing installers
2023-12-28 15:15:31 -08:00
Mathieu Comandon
8a58717444
Fix condition for binary requirement
2023-12-28 15:15:31 -08:00
Daniel Johnson
dc74685f38
Remove incorrect usage of gtk_safe()
...
We only need to when we are providing markup to GTK; titles aren't markup.
2023-12-28 17:13:34 -05:00
Mathieu Comandon
8758602e08
Filter out 'Bad file descriptor' messages
2023-12-27 16:53:19 -08:00
Daniel Johnson
04577a960e
Remove the generation of generic GameConfigError based on the "error" in the game_info.
...
There should never be such a key in the game_info; it's all exceptions now.
2023-12-27 18:43:20 -05:00
Daniel Johnson
0ce76eed22
And the big one - replace the FILE_NOT_FOUND error code with an exception, MissingGameExecutableError, that provides the custom message.
2023-12-27 18:41:08 -05:00
Daniel Johnson
bc902394b0
Replace DIRECTORY_NOT_FOUND errors with exceptions.
...
We didn't have handing, so this was an "unknown error". I'll borrow the handling from easyrpg so you can get a better message here.
2023-12-27 18:22:33 -05:00
Daniel Johnson
21694376ce
Remove "CUSTOM" error code in favor of raising GameConfigError.
2023-12-27 18:20:01 -05:00
Daniel Johnson
d5de4465f4
Retire "PATH_NOT_SET", "NOT_EXECUTABLE" and "NO_BIOS" in error codes in favor of exceptions.
...
Only NO_BIOS gets its own exception class, as its hte only one raised in more than one place. This way we can avoid repeating the message.
elif error == "NO_BIOS":
message_text = _("A bios file is required to run this game")
2023-12-27 18:07:05 -05:00
Daniel Johnson
284cb0282d
Remove RUNNER_NOT_INSTALLED error handling
...
This error code is never generated; we have exceptions for this instead.
2023-12-27 17:54:28 -05:00
Daniel Johnson
e4c731a074
Repeatedly escaping & to & does not make it better each time.
...
We'll leave this to gtk_safe() at the end of the line, so it happens once.
2023-12-27 17:36:26 -05:00
Daniel Johnson
06edac213b
Comments and type annotations for sysinfo_box.py.
...
Also, fixes extra gtk_safe() calls that could corrupt the data. Oopsie.
2023-12-26 22:59:49 -08:00
Daniel Johnson
69d4522bad
Change the style of the info-frame to look more like a list-box.
...
I really don't like the log view color scheme.
2023-12-26 22:59:49 -08:00
Daniel Johnson
b2d138f5e9
Combine the two frames into one, with scrolling.
...
The "System information" frame was getting very crowded; now all the content scroll together, so can view more than a couple of items in this area at a time.
2023-12-26 22:59:49 -08:00
Daniel Johnson
523e92fe4d
Move the grid loading code to populate() so we do not load it until the user navigates to it.
...
This can be helpful if loading the info would fail; you can at least use the result of the Preferences dialog.
2023-12-26 22:59:49 -08:00
Daniel Johnson
f533f52432
Convert the system-information part over to the grid format, using a CSS style to apply the log view colors to both grids.
2023-12-26 22:59:49 -08:00
Daniel Johnson
f31ad9f2c9
Convert the features box into a Gtk.Grid with labels
2023-12-26 22:59:49 -08:00
Daniel Johnson
7329a82941
Update (rather belatedly) the status text for the new buttons we adopted like a couple of versions ago.
...
Resolves #5203
2023-12-26 16:42:47 -05:00
Daniel Johnson
e104910486
Add tolerance for extra lines in glxinfo output; there can be errors in there.
...
Resolves #5202
2023-12-25 18:40:08 -05:00
Daniel Johnson
8b92dc0243
Mark the messages about not getting GPU information for localization.
2023-12-25 09:01:48 -05:00
Daniel Johnson
3eb8c7d0e4
Do not allow the UI to block on the Vulkan GPU names at all.
...
Instead, we load them in the background, and show 'Not Found' in the UI until the load is complete. It's just cosmetic anyway.
2023-12-25 08:59:44 -05:00
Daniel Johnson
466345c831
Redirect some installer-window responses to the cancel button logic, rather than just destroying the window.
...
This causes ongoing incomplete downloads to be cancelled.
2023-12-25 06:56:10 -05:00
Daniel Johnson
07c7ac6b5c
Fix download-collection box so that if you retry it, it picks up the file it was downloading, instead of moving on to the next one.
2023-12-25 06:44:43 -05:00
Daniel Johnson
1d832691a8
Redirect the errors from the backstop to the special installer window error handling via the ScriptInterpreter.
...
This can make errors appear at the top of the log page, or in a special error page in the window.
2023-12-25 06:15:07 -05:00
Daniel Johnson
138e0bcd5e
Use a set for the folders to size, to avoid measuring the same folder twice
2023-12-24 09:56:43 -05:00
Daniel Johnson
5828ac8a59
Update delete-files warning to count the directories, not the games.
...
This means if you delete two games that share a directory, it tells you the directory.
2023-12-24 09:47:46 -05:00
Daniel Johnson
afd25f2db8
More checking for the flag that protects the checkboxes in the Uninstall Game Dialog from each other.
...
This is ugly and annoying, but it seems to be needed.
2023-12-24 09:27:52 -05:00
Daniel Johnson
2d9a4705a2
Make Uninstall Game dialog modeless
...
The trick here is being able to add games to it, if you open it then go back to the LutrisWindow and remove some more games.
Doing this in turn can cause games already listed to become 'more deletable' since the game-directory that was shared with another game may now be deletable- if you are deleting all the relevant games.
At least this breaks up the big __init__ method we had here.
2023-12-24 09:19:30 -05:00
Daniel Johnson
56d75e92b8
Sort the uninstall-games list by name
...
For some reason Gtk.IconView is not giving the selected items in order- it appears backwards. So we sort.
This uses a natural sort key, so I moved that function to strings.py.
2023-12-24 08:39:20 -05:00
Daniel Johnson
8ae4f0d35d
Remove the timeout that is pulsing the progress bar in the move-game dialog
...
Otherwise, it will keep pulsing forever, even though it's destroyed.
2023-12-23 14:55:24 -05:00
Daniel Johnson
2e555e9525
Improved duplicate game name suggestions;
...
This way, "Big Game 2" duplicates as "Big Game 3" by default.
2023-12-23 12:32:26 -05:00
Daniel Johnson
e7109ec65d
Improved duplicate-game dialog
...
Provide a suggested unique name, and also accept 'enter' to close the dialog and make the duplicate.
2023-12-23 10:21:40 -05:00
Daniel Johnson
6cc69c35d3
Disable "Disable desktop effects" when compositing cannot be detected.
...
You may have a compositor that we can't detect, but if so, we can't disable it anyway.
I don't think you can do this in Wayland _at all_ anyway.
2023-12-23 08:37:59 -05:00
Daniel Johnson
6688d5064e
Satisfy pylint
...
Fix too-many-returns lint by using a data-driven design- a bunch of dicts with the commands needed for each compositor in them.
2023-12-23 08:34:14 -05:00
Daniel Johnson
88781772dc
Whoops; false is not None, and is certainly not Callable. Fix destroy_at_idle() function.
2023-12-23 08:34:08 -05:00