Rename to Cartridges

This commit is contained in:
kramo
2023-02-01 16:34:26 +01:00
parent de4fd79144
commit a9a5a1d3c2
28 changed files with 70 additions and 71 deletions

View File

@@ -131,7 +131,6 @@ def create_details_window(parent_widget, game_id = None):
values = {}
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games")
final_name = name.get_buffer().get_text()
final_executable = executable.get_buffer().get_text()

View File

@@ -21,7 +21,7 @@ def get_cover(game, parent_widget):
from gi.repository import GdkPixbuf
import os
cover_path = os.path.join(os.environ.get("XDG_DATA_HOME"), "covers", game["game_id"] + ".dat")
cover_path = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "covers", game["game_id"] + ".dat")
if os.path.isfile(cover_path) == False:
return parent_widget.placeholder_pixbuf

View File

@@ -20,7 +20,7 @@
def get_games():
import os, json
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games")
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games")
games = {}
if os.path.exists(games_dir) == False:

View File

@@ -24,5 +24,5 @@ def run_command(parent_widget, executable):
subprocess.Popen(["flatpak-spawn --host " + executable], shell=True, start_new_session=True)
if Gio.Settings.new("hu.kramo.GameShelf").get_boolean("exit-after-launch") == True:
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch") == True:
sys.exit()

View File

@@ -21,7 +21,7 @@ def save_cover(game, parent_widget, file_path, pixbuf = None, game_id = None):
from gi.repository import GdkPixbuf
import os
covers_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "covers")
covers_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "covers")
if os.path.exists(covers_dir) == False:
os.makedirs(covers_dir)

View File

@@ -19,7 +19,7 @@
def save_games(games):
import os, json
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games")
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games")
existing = []
if os.path.exists(games_dir) == False:

View File

@@ -19,7 +19,7 @@
def toggle_hidden(game):
import os, json
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games")
games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games")
if os.path.exists(games_dir) == False:
return