This commit is contained in:
kramo
2023-06-26 11:21:42 +02:00
parent 4f7dc8716a
commit 523aa8a82c
5 changed files with 9 additions and 9 deletions

View File

@@ -5,7 +5,7 @@
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file> <file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
<file preprocess="xml-stripblanks">gtk/game.ui</file> <file preprocess="xml-stripblanks">gtk/game.ui</file>
<file preprocess="xml-stripblanks">gtk/preferences.ui</file> <file preprocess="xml-stripblanks">gtk/preferences.ui</file>
<file preprocess="xml-stripblanks">gtk/details_window.ui</file> <file preprocess="xml-stripblanks">gtk/details-window.ui</file>
<file alias="style.css">gtk/style.css</file> <file alias="style.css">gtk/style.css</file>
<file alias="style-dark.css">gtk/style-dark.css</file> <file alias="style-dark.css">gtk/style-dark.css</file>
<file>library_placeholder.svg</file> <file>library_placeholder.svg</file>

View File

@@ -4,7 +4,7 @@ blueprints = custom_target('blueprints',
'gtk/window.blp', 'gtk/window.blp',
'gtk/game.blp', 'gtk/game.blp',
'gtk/preferences.blp', 'gtk/preferences.blp',
'gtk/details_window.blp' 'gtk/details-window.blp'
), ),
output: '.', output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],

View File

@@ -15,5 +15,5 @@ src/game.py
src/preferences.py src/preferences.py
src/utils/create_dialog.py src/utils/create_dialog.py
src/utils/importer.py src/importer/sources/source.py
src/utils/steamgriddb.py src/store/managers/sgdb_manager.py

View File

@@ -24,15 +24,15 @@ from gi.repository import Adw, Gio, GLib, Gtk
from PIL import Image from PIL import Image
from src import shared from src import shared
from src.errors.friendly_error import FriendlyError
from src.game import Game from src.game import Game
from src.game_cover import GameCover from src.game_cover import GameCover
from src.store.managers.sgdb_manager import SGDBManager from src.store.managers.sgdb_manager import SGDBManager
from src.utils.create_dialog import create_dialog from src.utils.create_dialog import create_dialog
from src.utils.save_cover import resize_cover, save_cover 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): class DetailsWindow(Adw.Window):
__gtype_name__ = "DetailsWindow" __gtype_name__ = "DetailsWindow"
@@ -230,11 +230,11 @@ class DetailsWindow(Adw.Window):
# Handle errors that occured # Handle errors that occured
for error in manager.collect_errors(): for error in manager.collect_errors():
# On auth error, inform the user # On auth error, inform the user
if isinstance(error, SGDBAuthError): if isinstance(error, FriendlyError):
create_dialog( create_dialog(
shared.win, shared.win,
_("Couldn't Connect to SteamGridDB"), error.title,
str(error), error.subtitle,
"open_preferences", "open_preferences",
_("Preferences"), _("Preferences"),
).connect("response", self.update_cover_error_response) ).connect("response", self.update_cover_error_response)