diff options
author | Sivaiah Nallagatla <snallagatla@novell.com> | 2004-08-12 13:30:56 +0800 |
---|---|---|
committer | Sivaiah Nallagatla <siva@src.gnome.org> | 2004-08-12 13:30:56 +0800 |
commit | 6a6112ff6a93f8b82588a754d1df2a04eeeb0dd6 (patch) | |
tree | 6df9f4b9a717f0dccfce27ad44e80ea6a6e542c9 /addressbook/gui/component | |
parent | 1b7b864689cda8258e766734bcb798bd3b4eb9a1 (diff) | |
download | gsoc2013-evolution-6a6112ff6a93f8b82588a754d1df2a04eeeb0dd6.tar.gz gsoc2013-evolution-6a6112ff6a93f8b82588a754d1df2a04eeeb0dd6.tar.zst gsoc2013-evolution-6a6112ff6a93f8b82588a754d1df2a04eeeb0dd6.zip |
when user cancels auth dialog send the anonoymous query only in case of
2004-08-12 Sivaiah Nallagatla <snallagatla@novell.com>
* 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
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 14 |
2 files changed, 13 insertions, 3 deletions
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)) |