commit 2a004d08dfafc161ec9432e8934a8d3b37d27b39 parent fcd5aee103de440e9e77a7a43852baba131cfde6 Author: Daniel Barlow <dan@telent.net> Date: Fri, 25 Mar 2022 11:00:35 +0000 print error message if load-styles fails Diffstat:
| M | blinkenlicht/blinkenlicht.fnl | | | 14 | ++++++++------ |
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/blinkenlicht/blinkenlicht.fnl b/blinkenlicht/blinkenlicht.fnl @@ -12,12 +12,14 @@ (local HEIGHT 48) (fn load-styles [pathname] - (let [style-provider (Gtk.CssProvider)] - (style-provider:load_from_path pathname) - (Gtk.StyleContext.add_provider_for_screen - (Gdk.Screen.get_default) - style-provider - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION))) + (let [style-provider (Gtk.CssProvider) + (success err) (style-provider:load_from_path pathname)] + (if success + (Gtk.StyleContext.add_provider_for_screen + (Gdk.Screen.get_default) + style-provider + Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) + (print "failed to load stylesheet" err)))) (fn resolve [f] (match (type f)