From bd3aa1b3e7e6d79d016caf34796299e7ab0ae686 Mon Sep 17 00:00:00 2001 From: Sivaiah Nallagatla Date: Tue, 25 May 2004 11:14:03 +0000 Subject: read the "auth-domain" property to use as component name for e-password 2004-05-25 Sivaiah Nallagatla * common/authentication.c (auth_func_cb) : read the "auth-domain" property to use as component name for e-password calls instead of hard coded component name svn path=/trunk/; revision=26074 --- calendar/ChangeLog | 6 ++++++ calendar/common/authentication.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0b6c7bba74..506134211b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2004-05-25 Sivaiah Nallagatla + + * common/authentication.c (auth_func_cb) : read the "auth-domain" + property to use as component name for e-password calls instead of + hard coded component name + 2004-05-25 Trent Lloyd Fixes: #57472 diff --git a/calendar/common/authentication.c b/calendar/common/authentication.c index cb6e93e81c..235c37e91f 100644 --- a/calendar/common/authentication.c +++ b/calendar/common/authentication.c @@ -31,10 +31,17 @@ auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_dat { gboolean remember; char *password; + ESource *source; + gchar *auth_domain; + gchar *component_name; - password = e_passwords_get_password ("Calendar", key); + source = e_cal_get_source (ecal); + auth_domain = e_source_get_property (source, "auth-domain"); + component_name = auth_domain ? auth_domain : "Calendar"; + password = e_passwords_get_password (component_name, key); + if (!password) - password = e_passwords_ask_password (_("Enter password"), "Calendar", key, prompt, TRUE, + password = e_passwords_ask_password (_("Enter password"), component_name, key, prompt, TRUE, E_PASSWORDS_REMEMBER_FOREVER, &remember, NULL); -- cgit v1.2.3