Commit graph

9502 commits

Author SHA1 Message Date
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
Mathieu Comandon 679259a466 Remove log errors when no nvidia driver is found 2023-12-21 03:17:54 -08:00
Daniel Johnson f3e44ce534 Fix dunderheaded markup/text confusion
I noticed this as soon as I pushed. Isn't that always the way?

The YES/NO stuff is localized, but it's not markup. The label has the markup; I'll fix the naming and use the localized text for the clipboard, since there's actually no reason not to.
2023-12-21 04:57:11 -05:00
Daniel Johnson d75a8f53cd Add the new feature list to the clipboard when "Copy to Clipboard" is used
This duplicates the feature name, which is ugly, but the business of using tabs to line up doesn't work anyway; I hope to replace this with a better layout that won't use tabs soon, and then I can fix the duplication.
2023-12-21 04:49:32 -05:00
Mathieu Comandon 9ba3356959 Remove a tab 2023-12-20 18:03:30 -08:00
Mathieu Comandon e71bcbe539 Put DPI options in advanced settings 2023-12-20 16:19:43 -08:00
Mathieu Comandon 7c004edc0f Change wording about virtual desktop warning 2023-12-20 16:17:46 -08:00
Daniel Johnson a07828cf22 Add a warning when the 'Virtual Desktop' feature is enabled on a 'GE' (Glorious Eggroll' Wine version. 2023-12-20 16:15:44 -08:00
Daniel Johnson 7c57ce3808 Factor out static runner-version fetching code
Move some methods of the runner version dialog into functions, and make others (which seem more tied to the dialog) static-methods.

This, I hope, will prepare for some of this stuff to be separated from the UI code properly.

The static-methods seem more tied to the UI, so I took them half-way - to static-methods instead of functions. At least they can't mess with GTK from the wrong thread this way.
2023-12-20 18:38:17 -05:00
Daniel Johnson ba46cba2c4 Convert the lists in the runner-store to dicts, with names instead of indices.
That is the normal pattern, so I think the older code was using indices just because it was using a Gtk.ListStore.
2023-12-20 18:21:08 -05:00
Daniel Johnson f01428646c Use a normal list instead of a Gtk.ListStore to hold the runner list in the runner versions dialog 2023-12-20 17:57:10 -05:00
Daniel Johnson 536547d044 Restore settings for creating shortcuts from installers.
Since the logic to do it consults the self.config dictionary, we need the value in there.
2023-12-19 18:41:37 -05:00
Daniel Johnson 090736df07 Move last-chance exception handling code to its own file.
This keeps the actual exceptions available to everything without hitting circular imports; very few things should need access to the backstops as such.

Resolves #5194
2023-12-19 16:27:08 -05:00
Daniel Johnson 6a0dd3f31a Fix unnecessary escaping in regex. 2023-12-19 05:07:00 -05:00
Mathieu Comandon 692771d77d Fix executable name for Cemu 2023-12-19 00:41:19 -08:00
Mathieu Comandon 3bb458de6b Start preparing next release 2023-12-18 22:39:24 -08:00
Mathieu Comandon e80de5ddca Fix yet another Wayland crash, this time happening when loading runner versions 2023-12-18 22:38:37 -08:00
Daniel Johnson ddbf87a70c Also handle errors in on_files_prepared()
It is the same special case so we go back to a previous page.
2023-12-18 22:05:19 -08:00
Daniel Johnson 9a4b9a0783 Handle errors when loading extras fails
This way we'll go back to the previous page afterward.
2023-12-18 22:05:19 -08:00
Daniel Johnson 49677b170c Pass the __self__ long in the safe-idle-function wrapper.
We need it to do the exception handling correctly.
2023-12-18 22:05:19 -08:00
Daniel Johnson 634fbcbaf0 Simplify the exception handling in the backstop
We search a bit for the parent of the error dialog, but the error-handler method has to be on the same object as the signal-handler, so let's not search for it.
2023-12-18 22:05:19 -08:00
Daniel Johnson d1e516df26 Add commenting to explain all the swizzling. 2023-12-18 22:05:19 -08:00
Daniel Johnson e6ac83ea5c Move swizzling code to explicit init function
This way we control when it happens, instead of relying on Python module import.
2023-12-18 22:05:19 -08:00
Daniel Johnson 0dad8fbf19 Factor out the common handler-wrapper code into a function. 2023-12-18 22:05:19 -08:00
Daniel Johnson a6cc3ce995 The InstallerWindow needs to handle errors differently once the installation has begun.
In that case, we show no ErrorDialog but instead an error message page, which does not allow you to go back.
2023-12-18 22:05:19 -08:00
Daniel Johnson b50a4bcb97 Remove on_watched_error in favor of more specific, callback-type specific methods.
Still too implicit, but it's just installerwindow.py.
2023-12-18 22:05:19 -08:00
Daniel Johnson aae0444566 Remove on_watched_error() from interpreter.py.
This was being called via AsyncCall, but as the completion function, which is scheduled via GLib.idle_add().

But it's just one method. I'll just slap a try-except on it to send the error to the UI delegate.
2023-12-18 22:05:19 -08:00
Daniel Johnson 379f1b7988 Remove on_watched_error() from application.py.
Instead, we just fall back to the main window if we can't find any other.
2023-12-18 22:05:19 -08:00
Daniel Johnson ebc2f1ea4a Remove most of the on_watched_error() methods.
This is all the ones that just pop an ErrorDialog; that's the default thing anyway.
2023-12-18 22:05:19 -08:00
Daniel Johnson 957eab1c17 Remove watch_errors itself 2023-12-18 22:05:19 -08:00
Daniel Johnson dcd55009a8 Remove all remaining @watch_errors() 2023-12-18 22:05:19 -08:00
Daniel Johnson 8a7d319fe7 Remove @watch_errors() from the sidebar and game-bar. 2023-12-18 22:05:19 -08:00
Daniel Johnson 2e439359b8 Remove @watch_errors() from the configuration dialog 2023-12-18 22:05:19 -08:00
Daniel Johnson b13ab1b29e And also swizzle GLib.idle_add and .timeout_add.
These will return False on error, to disconnect them. We don't want to report the error over and over, and just calling the same code again is likely to trigger it again.

And remove @watch_errors() from addgameswindow.py.
2023-12-18 22:05:19 -08:00
Daniel Johnson 84da6dc12b Swizzle also the GObject.add_emission_hook method too.
Remove @watch_errors() decorations from application.py.
2023-12-18 22:05:19 -08:00
Daniel Johnson 10e8992a54 Use method swizzling to inject error handling into all signals that are connected. Even the GtkTemplate.Callback ones!
Swizzling, because we don't admit to 'monkey patching' around here.

The error handling can still call into on_watched_error(), for now. But at least the @watch_errors() decorators are out of lutriswindow.py
2023-12-18 22:05:19 -08:00
Daniel Johnson 728ee5831b
Merge pull request #5193 from loveisfoss/patch-1
Update el.po
2023-12-18 16:40:42 -05:00
loveisfoss 55378fb2bd
Update el.po
Correct a grammatical error in the greek translation.
2023-12-18 19:12:24 +01:00
Daniel Johnson 08d401bee2 Use the dark wizardry of regexes to make the playtime parser more forgiving
It no longer requires spaces between the elements, and can read fractional hour or minute counts (though we do not include them on formatting)
2023-12-17 19:33:40 -05:00
Daniel Johnson 4b0592c8cd Update unit tests to represent the new rounding behavior
Truncating the minutes part of a playtime was unstable; format(parse(x) didn't result in 'x'; rounding fixes that. But the unit tests were impacted, so let's update them.

Resolves #5191
2023-12-17 17:21:03 -05:00