aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/common
diff options
context:
space:
mode:
authorSivaiah Nallagatla <snallagatla@novell.com>2004-05-25 19:14:03 +0800
committerSivaiah Nallagatla <siva@src.gnome.org>2004-05-25 19:14:03 +0800
commitbd3aa1b3e7e6d79d016caf34796299e7ab0ae686 (patch)
treeea92e37b667e055dc1b6c2a94ea5a0daf79d3f94 /calendar/common
parentf0374055952ee8530779273c56cdaf904e4624a6 (diff)
downloadgsoc2013-evolution-bd3aa1b3e7e6d79d016caf34796299e7ab0ae686.tar.gz
gsoc2013-evolution-bd3aa1b3e7e6d79d016caf34796299e7ab0ae686.tar.zst
gsoc2013-evolution-bd3aa1b3e7e6d79d016caf34796299e7ab0ae686.zip
read the "auth-domain" property to use as component name for e-password
2004-05-25 Sivaiah Nallagatla <snallagatla@novell.com> * 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
Diffstat (limited to 'calendar/common')
-rw-r--r--calendar/common/authentication.c11
1 files changed, 9 insertions, 2 deletions
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);