[evolution-patches] patch for calendar (authenitcation.c ) and address book (adressbook.c )
- From: Sivaiah N <snallagatla novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] patch for calendar (authenitcation.c ) and address book (adressbook.c )
- Date: Fri, 21 May 2004 18:54:39 +0530
Hi
Attached are small patches for authenitication.c in calendar and
addressbook.c in addresbook component. These patches make both
components read "auth-domain" property from e-source and use it as
component name instead of hard coded component name. If the property is
not found , we will fall back to respective component names. This is
needed to make the remembered passwords useful across components.
Thanks,
Siva
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2339
diff -u -r1.2339 ChangeLog
--- ChangeLog 20 May 2004 20:49:19 -0000 1.2339
+++ ChangeLog 21 May 2004 13:13:20 -0000
@@ -1,3 +1,9 @@
+2004-05-21 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
+
2004-05-20 JP Rosevear <jpr ximian com>
* gui/e-itip-control.c (find_server): proper look for figuring out
Index: common/authentication.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/common/authentication.c,v
retrieving revision 1.4
diff -u -r1.4 authentication.c
--- common/authentication.c 18 Feb 2004 15:41:32 -0000 1.4
+++ common/authentication.c 21 May 2004 13:13:20 -0000
@@ -31,10 +31,17 @@
{
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);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1721
diff -u -r1.1721 ChangeLog
--- ChangeLog 21 May 2004 00:17:44 -0000 1.1721
+++ ChangeLog 21 May 2004 13:21:13 -0000
@@ -1,3 +1,10 @@
+2004-05-21 Sivaiah Nallagatla <snallagatla novell com>
+
+ * 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-20 Hans Petter Jansson <hpj ximian com>
* importers/evolution-ldif-importer.c (add_to_notes): Add helper
Index: gui/component/addressbook.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook.c,v
retrieving revision 1.235
diff -u -r1.235 addressbook.c
--- gui/component/addressbook.c 20 May 2004 01:16:30 -0000 1.235
+++ gui/component/addressbook.c 21 May 2004 13:21:13 -0000
@@ -96,7 +96,12 @@
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 @@
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 @@
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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]