[evolution-patches] Addressbook (groupwise): cache download progress for system address book.
- From: Sushma Rai <rsushma novell com>
- To: Evolution Patches List <evolution-patches lists ximian com>
- Subject: [evolution-patches] Addressbook (groupwise): cache download progress for system address book.
- Date: Sat, 30 Jul 2005 14:43:23 +0530
This patch is to fix the problem of cache download progress was
not getting displayed for GroupWise system address book.
Please review.
Thanks,
-Sushma.
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.299
diff -u -p -r1.299 ChangeLog
--- addressbook/ChangeLog 27 Jul 2005 09:15:07 -0000 1.299
+++ addressbook/ChangeLog 30 Jul 2005 08:46:33 -0000
@@ -1,3 +1,13 @@
+2005-07-30 Sushma Rai <rsushma novell com>
+
+ * backends/groupwise/e-book-backend-groupwise.c
+ (e_book_backend_groupwise_get_static_capabilities): do-initial-query
+ for all the GroupWIse address books, so that we get the book view for
+ notifying cache download progress for all the address books.
+ (func_contains): Ignoring the null query for GroupWise system
+ addressbook, so that we don't download the book while loading.
+ (func_beginswith): Similar.
+
2005-07-26 Sushma Rai <rsushma novell com>
* backends/ldap/e-book-backend-ldap.c (email_ber): Setting the proper
Index: addressbook/backends/groupwise/e-book-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c,v
retrieving revision 1.64
diff -u -p -r1.64 e-book-backend-groupwise.c
--- addressbook/backends/groupwise/e-book-backend-groupwise.c 27 Jul 2005 08:00:33 -0000 1.64
+++ addressbook/backends/groupwise/e-book-backend-groupwise.c 30 Jul 2005 08:46:51 -0000
@@ -1490,6 +1490,15 @@ func_contains (struct _ESExp *f, int arg
char *str = argv[1]->value.string;
char *gw_field_name;
+ if (g_str_equal (propname, "x-evolution-any-field")) {
+ if (!sexp_data->is_personal_book && str && strlen(str) == 0) {
+ /* ignore the NULL query */
+ sexp_data->is_filter_valid = FALSE;
+ r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+ r->value.bool = FALSE;
+ return r;
+ }
+ }
gw_field_name = NULL;
if (g_str_equal (propname, "full_name"))
gw_field_name = "fullName";
@@ -1600,6 +1609,14 @@ func_beginswith(struct _ESExp *f, int ar
char *str = argv[1]->value.string;
char *gw_field_name;
+ if (!sexp_data->is_personal_book && str && strlen(str) == 0) {
+ /* ignore the NULL query */
+ sexp_data->is_filter_valid = FALSE;
+ r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+ r->value.bool = FALSE;
+ return r;
+ }
+
gw_field_name = NULL;
if (g_str_equal (propname, "full_name")) {
gw_field_name = "fullName";
@@ -1896,7 +1913,7 @@ e_book_backend_groupwise_get_contact_lis
NULL);
return;
}
- for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
+ for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
contact = e_contact_new ();
fill_contact_from_gw_item (contact, E_GW_ITEM (gw_items->data), egwb->priv->categories_by_id);
e_contact_set (contact, E_CONTACT_BOOK_URI, egwb->priv->original_uri);
@@ -2025,6 +2042,8 @@ book_view_thread (gpointer data)
g_mutex_unlock (closure->mutex);
query = e_data_book_view_get_card_query (book_view);
+ if (enable_debug)
+ printf ("get view for query %s \n", query);
switch (gwb->priv->mode) {
case GNOME_Evolution_Addressbook_MODE_LOCAL :
@@ -3203,10 +3222,12 @@ e_book_backend_groupwise_get_static_capa
printf ("\ne_book_backend_groupwise_get_static_capabilities...\n");
ebgw = E_BOOK_BACKEND_GROUPWISE (backend);
- if (ebgw->priv->is_writable)
- return g_strdup("net,bulk-removes,do-initial-query,contact-lists");
- else
- return g_strdup("net,bulk-removes,contact-lists");
+
+ /* do-initialy-query is enabled for system address book also, so that we get the
+ * book_view, which is needed for displaying cache update progress.
+ * and null query is handled for system address book.
+ */
+ return g_strdup("net,bulk-removes,do-initial-query,contact-lists");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]