Gtk.Grid is madness on toast, and confuses not just be but GTK's layout engine, which bugs out and places this wrongly when you filter the options. It also mis-sizes the buttons under the grid.
Replace the Gtk.Grid with a couple of Gtk.Box. Caveman brain know Box. Also, size-requests for things.
I've sized the editable grid so that it looks like a nice even number of rows for me. Heavy knows what will happen when your favorite theme though.
Pretty simple; if there's just one platform, and it is Windows or Linux or MS-DOS, we guess 'wine' or 'linux' or 'dosbox'; otherwise we just give up.
Sadly most Lutris service games seem to have multiple platforms. Darn you, portability, darn you to heck!
We can tweak this to be more opinionated later, if desired.
This lets 'Locate Installed Game' provide a runner selected for you.
This does not work for Lutris service games; this seems much trickier then just doing whatever generate_installer() does.
I added a virtual method get_installed_slug() to work out the Lutris slug as generate-script code does. But now we will use 'lutris_slug' if provided, then fall back to whatever else.
The fake 'empty game' used in the game bar now uses this improved slug.
You can delete a category that had a game that has been completely removed and has no ID anymore; we don't need to remove it from the game store (it can't be there anymore) but we ought not crash.
The tray icon class calls Application.get_launch_ui_delegate, which is not defined in Application.
I wasn't sure if it was better to make the icon class use directly Application.launch_ui_delegate or add the getter method. I opted for the getter method so that the field can be treated as an implementation detail.
add_url_tags() isn't correct- it does not handle escaping and can't be safely combined with gtk_safe(), as is done in two places.
But URLs can explicitly contain &, and that must be escaped. Text not inside URLs needs to be escaped, but escaping before or after the anchors breaks the URLs.
This function splits the text up into URLs and not-URLs and handles each case.
I use "..." as an icon to browse because it looks better than using text, I think. I made the icon buttons circular, because that is what Lutris usually does.
This opens the folder via xdg-open which does not seem to let me select the file (if any); not sure how to do better here.
The open-folder button is disable if we can't find a directory that exists to open.
Resolves#5096
This option is undocumented, may not be supported in current GameScope, nobody seems to understand what it does very clearly, and can be activated via the custom flags for GameScope anyway.
Yes, it's ugly and inelegant. But we've got many users with ~ in the paths in their config files.
This plops a bunch of expanduser calls in an effort to make games like that at least work.
It's unlikely this covers everything, but hopefully it will handle the most important cases.
Each env-var value should be a string, if not we skip None and convert all other values to strings. But we also log warnings so we can tell which env-var it was.