[evolution-patches] Exchange connector: fix for listing contacts



Hi,

Attached patch fixes listing Exchange personal contacts in
user selection dialog.
Please review.

Thanks,
Sushma.
Index: addressbook/e-book-backend-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/addressbook/e-book-backend-exchange.c,v
retrieving revision 1.23
diff -u -p -r1.23 e-book-backend-exchange.c
--- addressbook/e-book-backend-exchange.c	10 Mar 2005 06:29:29 -0000	1.23
+++ addressbook/e-book-backend-exchange.c	11 Mar 2005 11:22:10 -0000
@@ -1571,20 +1571,39 @@ func_match (struct _ESExp *f, int argc, 
 		rn = e2k_restriction_or (rns->len, (E2kRestriction **)rns->pdata, TRUE);
 		g_ptr_array_free (rns, TRUE);
 	} else if (!strcmp (propname, "full_name") && flags == E2K_FL_PREFIX) {
-		rn = e2k_restriction_orv (
-			e2k_restriction_content (
-				e_book_backend_exchange_prop_to_exchange ("full_name"),
-				flags, str),
-			e2k_restriction_content (
-				e_book_backend_exchange_prop_to_exchange ("family_name"),
-				flags, str),
-			NULL);
+		if (!*str) {
+			rn = e2k_restriction_orv (
+				e2k_restriction_exist (
+					e_book_backend_exchange_prop_to_exchange ("full_name")),
+				e2k_restriction_exist (
+					e_book_backend_exchange_prop_to_exchange ("family_name")),
+				NULL);
+		}
+		else {
+			rn = e2k_restriction_orv (
+				e2k_restriction_content (
+					e_book_backend_exchange_prop_to_exchange ("full_name"),
+					flags, str),
+				e2k_restriction_content (
+					e_book_backend_exchange_prop_to_exchange ("family_name"),
+					flags, str),
+				NULL);
+		}
 	} else if (!strcmp (propname, "email")) {
-		rn = e2k_restriction_orv (
-			e2k_restriction_content (E2K_PR_MAPI_EMAIL_1_ADDRESS, flags, str),
-			e2k_restriction_content (E2K_PR_MAPI_EMAIL_2_ADDRESS, flags, str),
-			e2k_restriction_content (E2K_PR_MAPI_EMAIL_3_ADDRESS, flags, str),
-			NULL);
+		if (!*str) {
+			rn = e2k_restriction_orv (
+				e2k_restriction_exist (E2K_PR_MAPI_EMAIL_1_ADDRESS),
+				e2k_restriction_exist (E2K_PR_MAPI_EMAIL_2_ADDRESS),
+				e2k_restriction_exist (E2K_PR_MAPI_EMAIL_3_ADDRESS),
+				NULL);
+		}
+		else {	
+			rn = e2k_restriction_orv (
+				e2k_restriction_content (E2K_PR_MAPI_EMAIL_1_ADDRESS, flags, str),
+				e2k_restriction_content (E2K_PR_MAPI_EMAIL_2_ADDRESS, flags, str),
+				e2k_restriction_content (E2K_PR_MAPI_EMAIL_3_ADDRESS, flags, str),
+				NULL);
+		}
 	} else {
 		exchange_prop =
 			e_book_backend_exchange_prop_to_exchange (propname);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.295
diff -u -r1.295 ChangeLog
--- ChangeLog	11 Mar 2005 07:50:21 -0000	1.295
+++ ChangeLog	11 Mar 2005 11:22:23 -0000
@@ -1,4 +1,11 @@
 2005-03-11  Sushma Rai  <rsushma novell com>
+
+	* addressbook/e-book-backend-exchange.c (func_match): Handling the
+	query which beginswith full name or email id without any value.
+	Fixes the problem of listing items of Exchange personal contacts
+	from user selection dialog.
+
+2005-03-11  Sushma Rai  <rsushma novell com>
 	
 	* storage/exchange-account.c (is_password_expired)
 	(exchange_account_set_password): If kerberos calls with windows domain


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]