From 523aa8a82c562515666a292b75c9054fad80cdab Mon Sep 17 00:00:00 2001
From: kramo <93832451+kra-mo@users.noreply.github.com>
Date: Mon, 26 Jun 2023 11:21:42 +0200
Subject: [PATCH] Cleanups
---
data/cartridges.gresource.xml.in | 2 +-
data/gtk/{details_window.blp => details-window.blp} | 0
data/meson.build | 2 +-
po/POTFILES | 4 ++--
src/details_window.py | 10 +++++-----
5 files changed, 9 insertions(+), 9 deletions(-)
rename data/gtk/{details_window.blp => details-window.blp} (100%)
diff --git a/data/cartridges.gresource.xml.in b/data/cartridges.gresource.xml.in
index 90d5c3b..472f6fb 100644
--- a/data/cartridges.gresource.xml.in
+++ b/data/cartridges.gresource.xml.in
@@ -5,7 +5,7 @@
gtk/help-overlay.ui
gtk/game.ui
gtk/preferences.ui
- gtk/details_window.ui
+ gtk/details-window.ui
gtk/style.css
gtk/style-dark.css
library_placeholder.svg
diff --git a/data/gtk/details_window.blp b/data/gtk/details-window.blp
similarity index 100%
rename from data/gtk/details_window.blp
rename to data/gtk/details-window.blp
diff --git a/data/meson.build b/data/meson.build
index 071fb69..20512b3 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -4,7 +4,7 @@ blueprints = custom_target('blueprints',
'gtk/window.blp',
'gtk/game.blp',
'gtk/preferences.blp',
- 'gtk/details_window.blp'
+ 'gtk/details-window.blp'
),
output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
diff --git a/po/POTFILES b/po/POTFILES
index 271d33c..b835079 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -15,5 +15,5 @@ src/game.py
src/preferences.py
src/utils/create_dialog.py
-src/utils/importer.py
-src/utils/steamgriddb.py
+src/importer/sources/source.py
+src/store/managers/sgdb_manager.py
\ No newline at end of file
diff --git a/src/details_window.py b/src/details_window.py
index c226a3b..dd7267b 100644
--- a/src/details_window.py
+++ b/src/details_window.py
@@ -24,15 +24,15 @@ from gi.repository import Adw, Gio, GLib, Gtk
from PIL import Image
from src import shared
+from src.errors.friendly_error import FriendlyError
from src.game import Game
from src.game_cover import GameCover
from src.store.managers.sgdb_manager import SGDBManager
from src.utils.create_dialog import create_dialog
from src.utils.save_cover import resize_cover, save_cover
-from src.utils.steamgriddb import SGDBAuthError
-@Gtk.Template(resource_path=shared.PREFIX + "/gtk/details_window.ui")
+@Gtk.Template(resource_path=shared.PREFIX + "/gtk/details-window.ui")
class DetailsWindow(Adw.Window):
__gtype_name__ = "DetailsWindow"
@@ -230,11 +230,11 @@ class DetailsWindow(Adw.Window):
# Handle errors that occured
for error in manager.collect_errors():
# On auth error, inform the user
- if isinstance(error, SGDBAuthError):
+ if isinstance(error, FriendlyError):
create_dialog(
shared.win,
- _("Couldn't Connect to SteamGridDB"),
- str(error),
+ error.title,
+ error.subtitle,
"open_preferences",
_("Preferences"),
).connect("response", self.update_cover_error_response)