Commit graph

9471 commits

Author SHA1 Message Date
Daniel Johnson fa70bb9c6b Add code to filter the sidebar based on the configuration of the runner. 2023-12-14 12:01:56 -08:00
Daniel Johnson f7832ffdde Add a system-level option for runners only to toggle visibility in the sidebar.
I'd make more sense in the "Lutris" section, but I promised to hide it so no-one would ever find it. So it's at the bottom and advanced as well.
2023-12-14 12:01:56 -08:00
Daniel Johnson f26120db3a Enable processing default values for various option types.
Notably, for 'bool' values. This did seem to work, as sometimes defaults got preloaded into the config. But not always, so let's consistently handle defaults for all option types.
2023-12-14 04:54:45 -05:00
Daniel Johnson e072ce8fdc Remove dynamically hidden configuration frames.
The frames around config options no longer disappear when they contain only one options; instead options appear in frames if they have a "section" option set for them, and not if they don't.

Some things don't, but if we want to put every option in a frame, we can do that now.
2023-12-14 04:22:21 -05:00
Daniel Johnson 87f6706a44 Instead of animating a certain amount on each call to animate(), we'll measure the time since the animation started - that should be stabler.
This also means I do not need to use nonlocal, since we don't keep mutable state in captured variables. Hope that makes this code clearer.
2023-12-13 16:29:44 -08:00
Daniel Johnson 58b1401774 Continue the bounciness so long as we're in the STATE_LAUNCHING state.
This is really while the prelaunch stuff is happening; there's no obvious way to wait until the game is really up and running.

Since this is often very quick, the animation will always perform one cycle, even if it goes directly to STATE_RUNNING.
2023-12-13 16:29:44 -08:00
Daniel Johnson a54fab130f First cut at a bouncy animation when a game starts. 2023-12-13 16:29:44 -08:00
Daniel Johnson 8ad4f16e18 Add function signature for prctl() 2023-12-13 16:54:21 -05:00
Daniel Johnson 23ff0e4082 Provide function signatures explicitly for libvulkan.
Without these, ctypes tries to go with var args, which is either sometimes or always broken, depending on the platform.
2023-12-13 16:49:40 -05:00
Daniel Johnson f4f9a12d47 No wait, & is more pythonic than intersection_update! Let's use that! 2023-12-12 20:03:29 -05:00
Daniel Johnson 13c07bd378 Mark section names in sysoptions.py for localization, just like other sections for runners and games. 2023-12-12 18:56:17 -05:00
Daniel Johnson 382d5681d5 Fix "scope" option and restore "Default installation folder"
This was the only option to use the 'scope' feature, and in 0.5.14 it was available in system and runner options, but not games.

This fix restores that behavior.

The trick is to pass the config_level through to the various option boxes, not just the config_section. The first is which dialog you are in (roughly) and the second is which tab.
2023-12-12 18:47:46 -05:00
Daniel Johnson f444a30a19 Make the pid list for a game stricter, so Stop doesn't get innocent processes.
We'll stop the game process (lutris-watcher, I think that is) and also any new process started since the game started, but those are counted only if they have the magic LUTRIS_GAME_UUID env var and also mention the game directory in the command line for the process.

Resolves #5181
2023-12-12 18:34:31 -05:00
Mathieu Comandon 087e235c36 Reverting 0c2d4bb1c3 should stop the crashes on Wayland if my bisect is correct 2023-12-12 02:21:39 -08:00
Mathieu Comandon 5ecfb95717 Remove remaining reference to InstallingDrivers 2023-12-11 20:27:53 -08:00
Daniel Johnson e5e1c64c17 Add two new sizes for itch.io banners
"banner_med" is 60% size (189, 150)
"banner_small" is 30% size (95, 75)

The original (315, 250) is still "banner" for compatibility.
2023-12-11 17:41:20 -08:00
marcin mikołajczak efba4a7a53 Update LINGUAS
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-11 16:18:48 -08:00
Marcin Mikołajczak abdbfbe630 po: Add Polish translation
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-11 16:18:48 -08:00
Daniel Johnson 9826f8a5fb Beef up the checks on the multi-game game-actions.
Yeah, some of these should not be available for multiple games at once, but better safe than sorry.
2023-12-11 17:05:36 -05:00
Daniel Johnson 2ca2d2f797 Do not allow removing games if none have been chosen.
If you hit the delete key with no selection, you got an unsightly empty dialog. This change will suppress that.
2023-12-11 16:51:45 -05:00
Daniel Johnson 24c04719e1 Restrict the warning about non-writable directories to those paths you will be writing to.
Or at least my best guess at this.

Resolves #5180
2023-12-11 16:46:05 -05:00
Daniel Johnson 37fc312800 Clean up dialog 'response' handling - ensure dialogs can be closed.
This fixes the bug where the Wine app-usage dialog can't be closed with its 'OK' button.

This commit moves on_response() up to the 'Dialog' base class and override it in a few places where this is required.

 'response' is how dialogs close,  'delete-event' doesn't even fire for them, so I've removed this event handler from the dialogs.
2023-12-09 08:57:55 -05:00
Daniel Johnson b9970ff33d Limit the split when parsing the selected category from the settings.
Everything after the first colon is part of the category name.

Resolves #5176
2023-12-08 19:01:48 -05:00
Daniel Johnson 80969a8bcd Whoops, that previous commit was off; we can install a native runner to take the place of a flatpak- so we can install when already installed, as long as it's not a flatpak install.
But we still can't install flatpak itself.
2023-12-08 17:17:56 -05:00
Daniel Johnson b75c800d43 Disable the 'install' button for the Linux runner.
You probably don't need to do this.
2023-12-08 05:32:21 -05:00
Daniel Johnson fb7600318b Emit the runner-removed signal via a callback
This is a bit baroque, and maybe we should just not just the TrashPortal for runners. But it is an 'uninstall' and I don't want to be too much of a crazy axe murderer with deletions.

The problem is that the UI updates must wait until the runner folder is gone, because that is was triggers self.is_installed to become false; if we emit early the UI see no change and does not change itself.

So, this defers the signal via a callback given to TrashPortal. The UI does not try to update until the folder is gone, and all is well.
2023-12-08 04:59:56 -05:00
Daniel Johnson 7d3e1642e5 Implement self.directory for libretro, like with fs-uae. 2023-12-08 04:48:08 -05:00
Daniel Johnson 0710be1179 Back off the log message for Battle.net load failure- it can just be a warning with no traceback.
I'd use logger.debug, but this happens before the command line options are handled, so '--debug' is not yet in effect.
2023-12-07 17:01:59 -05:00
Daniel Johnson 96b4211ea1 Add logging for when Battle.Net can't be loaded.
This log message is excessive, but may help with troubleshooting #5174. Need to back this off before release. I'd use the debug flag here, but it's not initialized soon enough.
2023-12-07 16:25:44 -05:00
Daniel Johnson 160e678725 Update uninstall_game.py message to say moved-to-the-trash instead. 2023-12-05 18:19:12 -05:00
Daniel Johnson edbd32b24c Re-introduce old remove_folder as delete_folder
There are several places where we need the directory deleted now, not asynchronously, because we are about to replace it. I think these are in places where deletion is okay - stuff like installing runtime updates.

Also, I put deletion of temp directories back on the deletion plan. I don't think anyone wants to see our temp files in the trash.
2023-12-05 18:18:04 -05:00
Daniel Johnson ae8be8ecfe Make system.remove_folder explicitly asynchronous
It can't tell if the folder was deleted without blocking for it, but no users of it actually care about this.

Also, beef of TrashPortal error handling so exceptions (from say opening the file) don't crash Lutris.

Also, also, add callback functions so if we do need to do something with errors or after deletion is complete, it's possible to do that.
2023-12-05 18:09:40 -05:00
Daniel Johnson d45ab667c2 Fix up spacing around options areas for consistency
There's a spacing of 12 px from the base class, we'll use that alone, and it all lines up nicely. It also makes it a little bit tighter; not a bad thing since the updates box doesn't fit vertically.

Also some spelling and warnings.
2023-12-05 16:53:49 -05:00
Mathieu Comandon 8809920565 Put games in trash instead of deleting them 2023-12-05 04:45:33 -08:00
Mathieu Comandon 63b88c715d Functional implementation of TrashPortal
:
2023-12-05 04:34:16 -08:00
Daniel Johnson d9f53d34cc Another @strycore request - more fine-grained running-update tracking
By tracking the names of the updaters that are running, we can make sure we never enqueue any one twice at the same time.

But you can start checking for Wine updates while runtime updates are running, if it's not in the queue already. Or vice versa.
2023-12-05 05:04:14 -05:00
Mathieu Comandon 9236f12a9e Attempt at explaining relative mouse mode 2023-12-05 01:11:27 -08:00
Mathieu Comandon 8e7c9b3413 Adjust some margins 2023-12-05 01:06:32 -08:00
Mathieu Comandon c2ac59e2d4 Remove DXVK specific error message. URL provided can result in more confusion 2023-12-05 00:55:35 -08:00
Mathieu Comandon c9f18d7fa4 Add portals module (experimental) 2023-12-05 00:26:32 -08:00
Mathieu Comandon b382705492 Add storage tab to preferences 2023-12-05 00:25:57 -08:00
Mathieu Comandon 543ba6b367 i18n for time_ago 2023-12-04 21:38:19 -08:00
Mathieu Comandon f902be27a4 Better feedback for Wine updates 2023-12-04 21:08:15 -08:00
Mathieu Comandon 799a194908 Add system features to system box 2023-12-04 20:27:04 -08:00
Mathieu Comandon eb8b3ff1af Rename SystemBox to SystemConfigBox and SysInfoBox to SystemBox 2023-12-04 19:37:48 -08:00
Mathieu Comandon e6cd5f7a73 Fix typo 2023-12-04 18:53:25 -08:00
Mathieu Comandon 9fc4ad0e64 Provide more details about the installed Wine version 2023-12-04 18:18:32 -08:00
Mathieu Comandon bc8d3ff5dc Use read_bool_setting for installer checkboxes 2023-12-04 17:00:45 -08:00
Mathieu Comandon 2212bd3ab8 Add label to Wine update section 2023-12-04 17:00:43 -08:00
Mathieu Comandon 2e46d984bf Put Wine update button in a separate frame. Move UpdateButtonBox outside of UpdatesBox 2023-12-04 16:57:04 -08:00