[gnome-boxes/housekeeping-autumn-2021: 8/9] welcome-tutorial: Handle error when failing to load css
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/housekeeping-autumn-2021: 8/9] welcome-tutorial: Handle error when failing to load css
- Date: Wed, 13 Oct 2021 14:02:20 +0000 (UTC)
commit 04c249b9ff97b042ec3e58b738ad12cde784b36f
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Oct 13 15:34:42 2021 +0200
welcome-tutorial: Handle error when failing to load css
src/welcome-tutorial.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/welcome-tutorial.vala b/src/welcome-tutorial.vala
index be920cae..88b853b6 100644
--- a/src/welcome-tutorial.vala
+++ b/src/welcome-tutorial.vala
@@ -41,7 +41,11 @@ private void set_background_color (Gdk.RGBA color) {
}
""".printf (color.to_string ());
- provider.load_from_data (css);
+ try {
+ provider.load_from_data (css);
+ } catch (GLib.Error error) {
+ warning ("Failed to load css for setting background color: %s", error.message);
+ }
}
[GtkCallback]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]