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
Daniel Johnson
35eea68c32
Correct use of "" for b""
...
I don't know why the compositor-wrangling code is using undecoded bytes, but it needs to do consistently; "" and b"" are not the same.
2023-12-23 07:48:19 -05:00
Daniel Johnson
f18277dd2e
Fix exception for remove inset from a game when it isn't inset.
2023-12-23 07:41:23 -05:00
Daniel Johnson
37bd7929aa
Move the directory size for the uninstall game dialog down to be next to the directory label.
...
Actually, part of that label. This means the 'Delete Files' checkbox can be smaller, leaving more room for the game name.
2023-12-23 07:25:26 -05:00
Daniel Johnson
7b3403bc0c
Add check for existance of the delete-files checkbox.
...
Games that have no directory have no checkbox to delete it either.
2023-12-23 07:21:39 -05:00
Daniel Johnson
9c5de3c999
Add logic to ensure destruction of ModalDialogs
...
We never re-use these but often forget to destroy them. So, this commit schedules an idle-function to destroy them as long as you don't reshow them before them, or destroy them yourself.
The main thing is to defer this until after run() has returned- destroy() resets the result from that function, if it happens first.
2023-12-22 05:04:10 -05:00
Daniel Johnson
9a01bd9d29
Explicitly destroy the UninstallGameDialog
...
I can't seem to make the GtkTemplate stuff work with any base class, so we can't inherit from ModalDialog.
2023-12-22 04:49:23 -05:00
Daniel Johnson
a764179db7
Widen the 'Delete Files' area to handle larger sizes
2023-12-21 19:59:22 -05:00
Daniel Johnson
6f816fb179
And ModalDialog does need to hide itself too!
...
Not destroy()-ed though, that makes run() return NONE. The dialog should be destroyed with its parent at the worst, but we need to hide() it to keep it from locking out the parent dialog.
2023-12-21 19:50:00 -05:00
Daniel Johnson
20f999720b
Add the game directory to each item that has one in the uninstall dialog
2023-12-21 19:42:34 -05:00
Daniel Johnson
4a4cf31a1b
ModalDialogs (with Gtk.Dialog.run()) automatically close, but modeless ones need to call self.destroy() in response to the response signal.
...
Explicitly destroying a modal dialog makes run() return Gtk.ResponseType.NONE.
So, I've moved the self.destroy() call down to ModelessDialog. That should fix it.
2023-12-21 19:36:19 -05:00
ChrisWin22
2f4e1edcf6
Add compton/picom to disable desktop effects: #4725
2023-12-21 16:22:18 -08:00