From c9b2de2b43d1575a85b5d0344c4a0bd1eb9f93fa Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 5 May 2023 04:31:30 +0200 Subject: Add missing error handlers --- src/menubar.vala | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/menubar.vala') diff --git a/src/menubar.vala b/src/menubar.vala index d9dab66..00fc862 100644 --- a/src/menubar.vala +++ b/src/menubar.vala @@ -2,6 +2,7 @@ * * Copyright (C) 2011,2012 Canonical Ltd * Copyright (C) 2015-2017 Mike Gabriel + * Copyright (C) 2023 Robert Tari * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -18,6 +19,7 @@ * Authors: Robert Ancell * Michael Terry * Mike Gabriel + * Robert Tari */ private class IndicatorMenuItem : Gtk.MenuItem @@ -176,7 +178,16 @@ public class MenuBar : Gtk.MenuBar /* Add shadow. */ var shadow_style = new Gtk.CssProvider (); - shadow_style.load_from_data ("* { box-shadow: 0px 0px 5px 5px #000000; }", -1); + + try + { + shadow_style.load_from_data ("* { box-shadow: 0px 0px 5px 5px #000000; }", -1); + } + catch (Error pError) + { + error ("Panic: Failed adding shadow: %s", pError.message); + } + this.get_style_context ().add_provider (shadow_style, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); -- cgit v1.2.3