Commit graph

9502 commits

Author SHA1 Message Date
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
Daniel Johnson 263a1bd602 Remove use of @lru_cache()
We don't really need it, and *someone* is lru_cache_o_phobic or something.
2023-12-04 17:24:19 -05:00
Daniel Johnson 42e51f79fc @strycore is right, stashing gpu_infos in the application object is lame and unpythonic
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.
2023-12-04 17:13:17 -05:00
Daniel Johnson 0d1732aa1f Turn implicit-optionals on explicitly until we figure out what to do about optional parameters. 2023-12-03 20:14:33 -05:00
Daniel Johnson 709e891299 Fix incorrect type annotation 2023-12-03 19:18:46 -05:00
Daniel Johnson 55c346ba9e Whoops, gpu_info is not pci_ids
Let's always pass gpu_info RuntimeUpdater can convert it.
2023-12-03 19:16:01 -05:00
Daniel Johnson a4081138a3 Restore "Check for Updates" button for the runners (well, really just Wine) 2023-12-03 18:30:26 -05:00
Daniel Johnson 27cbd7d84a Improve compatibility with old GLib by using 0 for MarketParseContext.DEFAULT_FLAGS. 2023-12-03 16:44:54 -05:00
Daniel Johnson f16f70aa27 Add a tool tip on the 'delete files' check-box to indicate which files are intended. 2023-12-03 16:27:24 -05:00
Daniel Johnson bd63998020 Add more execption handling in places where maybe we might want to tolerate a missing executable.
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.
2023-12-03 13:23:23 -05:00
Daniel Johnson bf8132c923 Another missed if->except replacement; this bug prevented running flatpak-based runners 2023-12-03 12:59:49 -05:00
Daniel Johnson a9855070c4 Fix installation check for vice and flatpak
They need to verify that the executable is really there. Also, I've added a backup check in Runner.is_installed() as well.
2023-12-03 12:56:42 -05:00
Daniel Johnson 1b2e798895 Whoops, I got a test backwards; returning paths that don't exist is nonsense. 2023-12-03 12:29:33 -05:00
Daniel Johnson f9ff409129 Use the new UpdatesButtonBox to do the same progress/error UI for 'Check for Updates' and 'Download Missing Media'
I think it's a really nice UI for that, so of course I'm going to steal it.

The 'can't start downloading' already error is still an ErrorDialog since that keeps the button available for when the existing download ends.
2023-12-03 10:03:11 -05:00
Daniel Johnson effc078a8a Factor the 'Check for Updates' spinner-message UI into a class for reuse. 2023-12-03 09:47:31 -05:00
Daniel Johnson b1a4548097 Avoid resetting the 'wine-update-channel' settings by accident
Freudian bug, this.

It would reset to the 'Stable' channel whenever you visit the preferences, because 'toggled' would fire during the initialization code.
2023-12-03 09:29:09 -05:00
Daniel Johnson 704d9f60b6 Apply wine_update_channel properly
That is, so that if you go to 'self-maintained', we stop auto-downloading.
2023-12-03 09:23:30 -05:00
Daniel Johnson a219b48578 Remove an Optional[T] from download_queue.py
I was over-thinking this; we can just separate the completion and error functions, and then we never pass None to the error function at all.

Doing this to AsyncCall can wait, but I think it would work.
2023-12-03 09:12:25 -05:00
Daniel Johnson e2677158ed Queue a redraw of the main window when media have downloaded
This way you can see the new banners.
2023-12-03 09:02:33 -05:00
Daniel Johnson 2aa748a68c Fix capitalization of buttons to the GNOME standard
That's title case for buttons (but sentence case for radio buttons)

"Sentence case almost everywhere" is the Windows Vista standard. You don't want to be Vista, do you?
2023-12-03 08:57:51 -05:00