[krb5-auth-dialog] enhance error message for UI xml loading
- From: Guido Günther <guidog src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] enhance error message for UI xml loading
- Date: Sun, 30 Aug 2009 17:11:57 +0000 (UTC)
commit 3c780a0aaa80b1a13684592f0bcda802116ea289
Author: Guido Günther <agx sigxcpu org>
Date: Sun Aug 30 19:04:41 2009 +0200
enhance error message for UI xml loading
preferences/krb5-auth-dialog-preferences.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/preferences/krb5-auth-dialog-preferences.c b/preferences/krb5-auth-dialog-preferences.c
index fc37580..5b22db7 100644
--- a/preferences/krb5-auth-dialog-preferences.c
+++ b/preferences/krb5-auth-dialog-preferences.c
@@ -735,10 +735,18 @@ ka_preferences_dialog_destroyed (GtkWidget *widget G_GNUC_UNUSED,
static gboolean
ka_preferences_dialog_init(KaPreferencesDialog* dialog)
{
+ GError *error = NULL;
+ gboolean ret;
+
dialog->xml = gtk_builder_new ();
- g_assert(gtk_builder_add_from_file(dialog->xml, KA_DATA_DIR G_DIR_SEPARATOR_S
- PACKAGE "-preferences.xml", NULL));
+ ret = gtk_builder_add_from_file(dialog->xml, KA_DATA_DIR G_DIR_SEPARATOR_S
+ PACKAGE "-preferences.xml", &error);
+ if (!ret) {
+ g_assert (error);
+ g_assert (error->message);
+ g_error ("Failed to load UI XML: %s", error->message);
+ }
dialog->dialog = GTK_WIDGET(gtk_builder_get_object (dialog->xml, "krb5_auth_dialog_prefs"));
g_assert (dialog->dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]