From c61bef657d2e6c8ab82573f6366761000881db9e Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Mon, 8 Sep 2008 04:00:37 +0000 Subject: Milan Crha ** Part of fix for bug #361413 (Print detailed error also for LDAP backends). svn path=/trunk/; revision=36275 --- addressbook/gui/widgets/eab-gui-util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'addressbook/gui') diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index ba236da919..12d6e9cb76 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -98,12 +98,14 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) { char *label_string, *label = NULL, *uri; GtkWidget *dialog; + gboolean can_detail_error = TRUE; g_return_if_fail (source != NULL); uri = e_source_get_uri (source); if (status == E_BOOK_ERROR_OFFLINE_UNAVAILABLE) { + can_detail_error = FALSE; label_string = _("We were unable to open this address book. This either means " "this book is not marked for offline usage or not yet downloaded " "for offline usage. Please load the address book once in online mode " @@ -126,6 +128,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) "means you have entered an incorrect URI, or the LDAP server " "is unreachable."); #else + can_detail_error = FALSE; label_string = _("This version of Evolution does not have LDAP support " "compiled in to it. If you want to use LDAP in Evolution, " @@ -137,7 +140,9 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) _("We were unable to open this address book. This either " "means you have entered an incorrect URI, or the server " "is unreachable."); + } + if (can_detail_error) { /* do not show repository offline message, it's kind of generic error */ if (status != E_BOOK_ERROR_REPOSITORY_OFFLINE && status > 0 && status < G_N_ELEMENTS (status_to_string) && status_to_string [status]) { label = g_strconcat (label_string, "\n\n", _("Detailed error:"), " ", _(status_to_string [status]), NULL); -- cgit v1.2.3