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

This commit is contained in:
aclist committed 2026-05-29 00:44:00 +09:00
1 parent 1212c09110
commit c0c3ee8c64
1 file changed
+4
+4
View File
@@ -323,8 +323,12 @@ class App(Gtk.Application):
MainController = Controller() MainController = Controller()
try:
theme = Gtk.IconTheme.get_default() theme = Gtk.IconTheme.get_default()
icons = theme.list_icons(None) icons = theme.list_icons(None)
if STEAM_ICON not in icons: if STEAM_ICON not in icons:
logger.warn(strings.steam_icon_missing) logger.warn(strings.steam_icon_missing)
warnings.warn(strings.steam_icon_missing, stacklevel=2) warnings.warn(strings.steam_icon_missing, stacklevel=2)
except Exception as e:
logger.warning(e)
warnings.warn(strings.gtk_theme_missing, stacklevel=2)