From 6a6112ff6a93f8b82588a754d1df2a04eeeb0dd6 Mon Sep 17 00:00:00 2001 From: Sivaiah Nallagatla Date: Thu, 12 Aug 2004 05:30:56 +0000 Subject: when user cancels auth dialog send the anonoymous query only in case of 2004-08-12 Sivaiah Nallagatla * gui/component/addresbook.c (load_source_auth_cb) : when user cancels auth dialog send the anonoymous query only in case of ldap *gui/component/addresbook-view.c (book_open_cb) : no need to display the error dialog when user cancels that svn path=/trunk/; revision=26876 --- addressbook/gui/component/addressbook.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'addressbook/gui/component/addressbook.c') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 32363c66be..44c68420bc 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -79,9 +79,18 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure) } if (status != E_BOOK_ERROR_OK) { + + /* the user clicked cancel in the password dialog */ if (status == E_BOOK_ERROR_CANCELLED) { - /* the user clicked cancel in the password dialog */ + + if (e_book_check_static_capability (book, "anon-access")) { + GtkWidget *dialog; + + /* XXX "LDAP" has to be removed from the folowing message + so that it wil valid for other servers which provide + anonymous access*/ + dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_WARNING, @@ -92,6 +101,7 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure) data->cb (book, E_BOOK_ERROR_OK, data->closure); free_load_source_data (data); return; + } } else { gchar *uri = e_source_get_uri (data->source); @@ -180,7 +190,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc failed_auth, e_source_peek_name (source), user); remember = get_remember_password (source); - pass_dup = e_passwords_ask_password (prompt, component_name, uri, prompt, TRUE, + pass_dup = e_passwords_ask_password (prompt, component_name, uri, prompt, E_PASSWORDS_REMEMBER_FOREVER, &remember, NULL); if (remember != get_remember_password (source)) -- cgit v1.2.3