Merge main
This commit is contained in:
@@ -24,13 +24,13 @@ import subprocess
|
||||
from pathlib import Path
|
||||
from time import time
|
||||
|
||||
from gi.repository import Adw, Gio, Gtk
|
||||
from gi.repository import Adw, Gtk
|
||||
|
||||
from src import shared
|
||||
from src.game_cover import GameCover
|
||||
|
||||
|
||||
@Gtk.Template(resource_path="/hu/kramo/Cartridges/gtk/game.ui")
|
||||
@Gtk.Template(resource_path=shared.PREFIX + "/gtk/game.ui")
|
||||
class Game(Gtk.Box):
|
||||
__gtype_name__ = "Game"
|
||||
|
||||
@@ -66,6 +66,7 @@ class Game(Gtk.Box):
|
||||
|
||||
self.win = shared.win
|
||||
self.app = self.win.get_application()
|
||||
self.version = shared.SPEC_VERSION
|
||||
|
||||
self.update_values(data)
|
||||
|
||||
@@ -180,7 +181,7 @@ class Game(Gtk.Box):
|
||||
|
||||
args = (
|
||||
"flatpak-spawn --host /bin/sh -c " + shlex.quote(string) # Flatpak
|
||||
if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges"
|
||||
if os.getenv("FLATPAK_ID") == shared.APP_ID
|
||||
else string # Others
|
||||
)
|
||||
|
||||
@@ -192,7 +193,7 @@ class Game(Gtk.Box):
|
||||
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0,
|
||||
)
|
||||
|
||||
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
|
||||
if shared.schema.get_boolean("exit-after-launch"):
|
||||
self.app.quit()
|
||||
|
||||
# The variable is the title of the game
|
||||
|
||||
Reference in New Issue
Block a user