[nautilus/wip/oholy/release-fixes: 4/6] preferences-window: Print error from gtk_builder_add_from_resource
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/release-fixes: 4/6] preferences-window: Print error from gtk_builder_add_from_resource
- Date: Sat, 13 Feb 2021 15:47:18 +0000 (UTC)
commit 50fc39c51ca411d101a1052f396eeb78e0bdf500
Author: Ondrej Holy <oholy redhat com>
Date: Sat Feb 13 16:24:23 2021 +0100
preferences-window: Print error from gtk_builder_add_from_resource
Currently, gtk_builder_add_from_resource silently fails with old libhandy
version which leads to weird crashes. Let's print the returned error to
be obvious what is going on.
src/nautilus-preferences-window.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index 55db3276a..996ba559a 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -390,6 +390,7 @@ static void nautilus_preferences_window_setup(GtkBuilder *builder,
void nautilus_preferences_window_show(GtkWindow *window)
{
GtkBuilder *builder;
+ g_autoptr (GError) error = NULL;
if (preferences_window != NULL)
{
@@ -400,7 +401,11 @@ void nautilus_preferences_window_show(GtkWindow *window)
builder = gtk_builder_new ();
gtk_builder_add_from_resource (
- builder, "/org/gnome/nautilus/ui/nautilus-preferences-window.ui", NULL);
+ builder, "/org/gnome/nautilus/ui/nautilus-preferences-window.ui", &error);
+ if (error != NULL)
+ {
+ g_error ("Failed to add nautilus-preferences-window.ui: %s", error->message);
+ }
nautilus_preferences_window_setup (builder, window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]