1
0
mirror of https://github.com/lutris/lutris synced 2024-07-08 11:35:50 +00:00
Commit Graph

9004 Commits

Author SHA1 Message Date
Mathieu Comandon
e43cae9715 Add env var to allow using local packages 2023-11-12 05:59:19 -08:00
Daniel Johnson
fe55eda11f Do editable-grids (environment vars) in options with boxes, not Gtk.Grid.
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.
2023-11-12 05:56:14 -05:00
Daniel Johnson
3462c5ec59 Service games aren't removable, so let's not include that command in their actions.
The code stays in the base class so the the view base class can call it, though.
2023-11-12 04:32:25 -05:00
Daniel Johnson
d0a45f17bf Add heuristics to predict the runner for Lutris service games
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.
2023-11-10 07:30:17 -05:00
Daniel Johnson
fc4753464a Add code to predict the runner to use for service games, when installed.
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.
2023-11-10 07:23:09 -05:00
Daniel Johnson
616b96f310 Fix for wrong slugs in "Locate Installed Game" and "View on Lutris.net"
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.
2023-11-10 06:52:06 -05:00
Daniel Johnson
0de22a0733 Actually add ServiceGameActions
Only a few actions, and 'View on Lutris.net' does not quite work.
2023-11-10 06:23:52 -05:00
Daniel Johnson
e0e741c1b8 Break out a base class for game actions, and use it for service games.
We want a real service games menu, but this blocks access to inappropriate commands at least.
2023-11-10 06:08:25 -05:00
Daniel Johnson
2f69520f03 Add missing None check for empty context menus.
This looks ugly, but is better than crashing.
2023-11-10 05:58:11 -05:00
Daniel Johnson
1ea895ad34 Add 'activate' handler for the new-category entry.
This way you can hit enter to add a category; 'Save' was already control-S here, not enter, so it's not ambiguous.
2023-11-10 05:27:21 -05:00
Mathieu Comandon
c48a7d2f09 Show category / favorite menu entries even for uninstalled games (Closes #5123) 2023-11-10 02:13:22 -08:00
Daniel Johnson
4c1c6a5eab Add a check for the "id" fields
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.
2023-11-09 16:33:26 -05:00
Daniel Johnson
ff9aa683f6
Merge pull request #5126 from daniele-bondi/patch-1
Fix launching games from tray icon
2023-11-09 16:21:35 -05:00
daniele-bondi
b18955e014
Fix launching games from tray icon
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.
2023-11-09 22:09:43 +01:00
Mathieu Comandon
05a301e769 Remove agignore 2023-11-08 14:36:04 -08:00
Daniel Johnson
f3465f45f2 Oops, missed a spot! I need to check for None before using expanduser().
Resolves #5120
2023-11-07 16:33:37 -05:00
Daniel Johnson
2eec736fd9 Replace add_url_tags() with gtk_safe_urls(), which does both conversion and escaping.
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.
2023-11-04 07:36:28 -04:00
Daniel Johnson
e84f78dcdf Some cleanup. Also use the actual GLib function to escape markup.
It does escape control characters, which we didn't used to do, but I don't think that'll be a problem.
2023-11-04 07:08:02 -04:00
Daniel Johnson
43c23d7cdc Detect when installer text is not valid markup and treat it as text.
Installer scripts can contain whatever some dude pasted into them, and if we can detect that it is not markup, we can display it as plain text.
2023-11-04 06:49:36 -04:00
Daniel Johnson
c17a6abb7a The installer again recognizes the first N/A as the 'true' installer file request, not the last.
Resolves #5119
2023-11-04 06:19:07 -04:00
Daniel Johnson
b77cf2dc25 Switch to using icons instead of text to save space.
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
2023-10-31 19:20:24 -04:00
Daniel Johnson
b9eeda1a19 Add an "Open" button to open the directory in a file browser.
These are just textual buttons for now.
2023-10-31 19:02:46 -04:00
Daniel Johnson
9de31af32e Download more media when reloading Lutris.
Specifically, games that are missing media, have Lutris slugs, and are not in your Lutris library can get media here.
2023-10-30 17:19:23 -04:00
K900
1f1d554df3 scummvm: handle runner not being available in get_command, add/fix test 2023-10-29 15:51:53 -07:00
Daniel Johnson
e9b8d199f4 Fix one more setting-change call to include the state. 2023-10-29 18:44:50 -04:00
Daniel Johnson
f08fb5271a Fix for app-indicator tray icon hiding.
The opposite of ACTIVE is PASSIVE, not more ACTIVE.
2023-10-29 18:43:11 -04:00
Daniel Johnson
9e9053418d Fix what looks like a messed up merge
Make sure all the settings-changed handlers are actually hooked up and are in the right places.
2023-10-29 18:40:14 -04:00
Daniel Johnson
e25c9811ee Hide the Lutris window instead of deleting it on close, when the tray icon is turned on.
Resolves #5109
2023-10-29 18:31:10 -04:00
Mathieu Comandon
58aa2de6f7 Remove unused directories 2023-10-29 15:12:09 -07:00
Mathieu Comandon
f156d15f73 Fix flatpak list command 2023-10-29 15:10:43 -07:00
Mathieu Comandon
aa53962550 Make output of flatpak list consistent 2023-10-29 14:59:03 -07:00
Daniel Johnson
f2ed457c4e Remove support for '--force-grab-cursor' in GameScope
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.
2023-10-29 13:41:55 -04:00
Daniel Johnson
0da16b08d6 Handle flatpak output that provides the architecture. 2023-10-28 11:50:22 -04:00
Daniel Johnson
10d64c5dc2 Supply missing import for 'logger'. 2023-10-28 10:54:43 -04:00
Mathieu Comandon
53464a4be8 Add quotes around passphrase 2023-10-27 22:56:19 -07:00
Mathieu Comandon
d1e84424ea Add error handler when not able to parse Flatpak output 2023-10-27 12:50:49 -07:00
Mathieu Comandon
d17b4583b5 Add check for missing Itch.io appids 2023-10-27 12:21:29 -07:00
NorwayFun
4b7b4c0e12 po: Update Georgian translation 2023-10-27 11:58:43 -07:00
Daniel Johnson
5c7e2bc945 Sprinkle os.path.expanduser all over
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.
2023-10-25 19:34:38 -04:00
Daniel Johnson
9965b9de60 Add exception handling so if desktop integration fails, the game may still be run.
The integration isn't critical; we'll log the exception and continue, and hope Wine can still start.

Resolves #5101
2023-10-25 18:41:52 -04:00
Daniel Johnson
f557e1c486 Prophylactically expand ~ for wine prefix access.
It should be expanded, but just in case it is not.
2023-10-25 18:37:13 -04:00
Quinn64
c09097491f
Added support for Flatpak custom commands (#5090) 2023-10-25 15:22:14 -07:00
Adi Efendic
b870d29241 Add additional validation for playtime input 2023-10-25 14:37:30 -07:00
Adi Efendic
38af68261e Add input field for playtime in edit game dialog 2023-10-25 14:37:30 -07:00
Daniel Johnson
11d728f524 Use spawn to start a terminal
This way, Lutris does not lock up until the terminal exits.

Resolves #5093
2023-10-23 16:27:12 -04:00
Daniel Johnson
6568fe4bd8 Add check that the prefix can be found before giving it to Steam via env-var.
Resolves #5091
2023-10-22 13:13:31 -04:00
Daniel Johnson
ed4e4c32ba Add prophylactic code for bogus environment variables.
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.
2023-10-22 11:53:16 -04:00
Daniel Johnson
85e63862f6
Merge pull request #5087 from NorwayFun/master
po: Add Georgian translation
2023-10-21 07:47:36 -04:00
NorwayFun
6f280a0429
po: Add Georgian translation 2023-10-21 12:45:44 +02:00
NorwayFun
89f31ed5fd
Update LINGUAS: Add Georgian 2023-10-21 12:45:05 +02:00