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/ChangeLog | 9 +++++++++ addressbook/gui/component/addressbook-view.c | 2 +- addressbook/gui/component/addressbook.c | 14 ++++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index d7cbe96647..2d73e66270 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,12 @@ +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 + + 2004-08-04 Rodney Dawes * gui/widgets/eab-popup-control.c: #include diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 9b3db0c3b2..bf1e5fff0a 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -1213,7 +1213,7 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) if (view->model) eab_model_force_folder_bar_message (view->model); } - else { + else if (status != E_BOOK_ERROR_CANCELLED) { eab_load_error_dialog (NULL /* XXX */, source, status); } 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