From 13492cb0f8cc36abfbbd2ef95a59a5746be84365 Mon Sep 17 00:00:00 2001 From: Sivaiah Nallagatla Date: Tue, 25 May 2004 15:33:27 +0000 Subject: read the "auth-domain" property from e-source and use it as the component 2004-05-25 Sivaiah Nallagatla * gui/component/addressbook.c (load_source_auth_cb ) (load_source_auth_cb ) : read the "auth-domain" property from e-source and use it as the component name for e_password_* calls if it exists svn path=/trunk/; revision=26078 --- addressbook/ChangeLog | 7 +++++++ addressbook/gui/component/addressbook.c | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index a9eef79892..5f53981e14 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2004-05-25 Sivaiah Nallagatla + + * gui/component/addressbook.c (load_source_auth_cb ) + (load_source_auth_cb ) : read the "auth-domain" property + from e-source and use it as the component name for e_password_* + calls if it exists + 2004-05-25 Jeffrey Stedfast * Makefile.am: Generate the addressbook-errors.xml.h file and diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 83c56e4b6d..7d67863ab9 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -96,7 +96,12 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure) else { gchar *uri = e_source_get_uri (data->source); gchar *stripped_uri = remove_parameters_from_uri (uri); - e_passwords_forget_password ("Addressbook", stripped_uri); + const gchar *auth_domain = e_source_get_property (data->source, "auth-domain"); + const gchar *component_name; + + component_name = auth_domain ? auth_domain : "Addressbook"; + + e_passwords_forget_password (component_name, stripped_uri); addressbook_authenticate (book, TRUE, data->source, load_source_auth_cb, closure); g_free (stripped_uri); @@ -139,11 +144,14 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc const gchar *user; gchar *uri = e_source_get_uri (source); gchar *stripped_uri = remove_parameters_from_uri (uri); - + const gchar *auth_domain = e_source_get_property (source, "auth-domain"); + const gchar *component_name; + + component_name = auth_domain ? auth_domain : "Addressbook"; g_free (uri); uri = stripped_uri; - password = e_passwords_get_password ("Addressbook", uri); + password = e_passwords_get_password (component_name, uri); auth = e_source_get_property (source, "auth"); @@ -172,7 +180,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, "Addressbook", uri, prompt, TRUE, + pass_dup = e_passwords_ask_password (prompt, component_name, uri, prompt, TRUE, E_PASSWORDS_REMEMBER_FOREVER, &remember, NULL); if (remember != get_remember_password (source)) -- cgit v1.2.3