fix: catch error if no GTK theme is available (headless installs)

This commit is contained in:
aclist 2026-05-29 00:44:00 +09:00
parent 1212c09110
commit c0c3ee8c64

View File

@ -323,8 +323,12 @@ class App(Gtk.Application):
MainController = Controller() MainController = Controller()
theme = Gtk.IconTheme.get_default() try:
icons = theme.list_icons(None) theme = Gtk.IconTheme.get_default()
if STEAM_ICON not in icons: icons = theme.list_icons(None)
logger.warn(strings.steam_icon_missing) if STEAM_ICON not in icons:
warnings.warn(strings.steam_icon_missing, stacklevel=2) logger.warn(strings.steam_icon_missing)
warnings.warn(strings.steam_icon_missing, stacklevel=2)
except Exception as e:
logger.warning(e)
warnings.warn(strings.gtk_theme_missing, stacklevel=2)