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.
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
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.
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.
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.
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.
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.
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.
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.
We can use @lru_cache to make the relevant get_gpu_info() cache the gpu data, and then call that when we need the data. It need not be passed through 4 stack frames and an object.
I still call get_drivers() for the logging it does, but its result does not seem to be used anywhere.
Mostly this is to make flatpak work, but better to be on the safe side here. These are often things that would have crashed on NoneType, but could be made to tolerate the condition.