[gnome-boxes/housekeeping-autumn-2021: 7/8] 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: 7/8] welcome-tutorial: Handle error when failing to load css
- Date: Wed, 13 Oct 2021 14:00:05 +0000 (UTC)
commit 19cdd75ae75cd998af18ef506b07d9cc4cda37af
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]