From c64117579df723a61d6f84cf64b5dbee9dbb89f0 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 18 Feb 2004 15:41:32 +0000 Subject: call first e_passwords_get_password before calling _ask_password. 2004-02-18 Rodrigo Moya * common/authentication.c (auth_func_cb): call first e_passwords_get_password before calling _ask_password. svn path=/trunk/; revision=24777 --- calendar/common/authentication.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'calendar/common/authentication.c') diff --git a/calendar/common/authentication.c b/calendar/common/authentication.c index fa2be5323d..cb6e93e81c 100644 --- a/calendar/common/authentication.c +++ b/calendar/common/authentication.c @@ -30,10 +30,15 @@ static char * auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_data) { gboolean remember; + char *password; - return e_passwords_ask_password (_("Enter password"), "Calendar", key, prompt, TRUE, - E_PASSWORDS_REMEMBER_FOREVER, &remember, - NULL); + password = e_passwords_get_password ("Calendar", key); + if (!password) + password = e_passwords_ask_password (_("Enter password"), "Calendar", key, prompt, TRUE, + E_PASSWORDS_REMEMBER_FOREVER, &remember, + NULL); + + return password; } ECal * -- cgit v1.2.3