[glide] Die gracefully if we cant find the glide-window ui file
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Die gracefully if we cant find the glide-window ui file
- Date: Thu, 29 Apr 2010 11:50:44 +0000 (UTC)
commit e802aaf098f74e88a5a6a9b5c5c532f799170507
Author: Robert Carr <racarr Valentine localdomain>
Date: Thu Apr 29 07:51:00 2010 -0400
Die gracefully if we cant find the glide-window ui file
src/glide-window.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/glide-window.c b/src/glide-window.c
index 0994f2b..9afeebb 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -1482,11 +1482,15 @@ glide_window_load_ui (GlideWindow *w)
GtkWidget *main_box;
gchar *ui_dir = glide_dirs_get_glide_ui_dir ();
gchar *ui_path = g_strconcat (ui_dir, "/glide-window.ui", NULL);
+ GError *e = NULL;
w->priv->builder = b;
- // Todo: Error checking
- gtk_builder_add_from_file (b, ui_path, NULL);
+ gtk_builder_add_from_file (b, ui_path, &e);
+ if (e)
+ {
+ g_error ("Failed to load glide-window.ui (%s): %s", ui_path, e->message);
+ }
g_free (ui_dir);
g_free (ui_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]