evolution-data-server r8679 - in branches/gnome-2-22/addressbook: . backends/groupwise
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8679 - in branches/gnome-2-22/addressbook: . backends/groupwise
- Date: Fri, 25 Apr 2008 12:31:31 +0100 (BST)
Author: sragavan
Date: Fri Apr 25 11:31:30 2008
New Revision: 8679
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8679&view=rev
Log:
2008-04-25 Srinivasa Ragavan <sragavan novell com>
* addressbook/backends/groupwise/e-book-backend-groupwise.c: Load
addressbook conditionally.
Modified:
branches/gnome-2-22/addressbook/ChangeLog
branches/gnome-2-22/addressbook/backends/groupwise/e-book-backend-groupwise.c
Modified: branches/gnome-2-22/addressbook/backends/groupwise/e-book-backend-groupwise.c
==============================================================================
--- branches/gnome-2-22/addressbook/backends/groupwise/e-book-backend-groupwise.c (original)
+++ branches/gnome-2-22/addressbook/backends/groupwise/e-book-backend-groupwise.c Fri Apr 25 11:31:30 2008
@@ -2241,13 +2241,16 @@
g_free (search_string);
}
- if (!gwb->priv->is_writable && !filter) {
- e_data_book_view_notify_complete (book_view, GNOME_Evolution_Addressbook_Success);
- bonobo_object_unref (book_view);
- return NULL;
- }
- else
- status = E_GW_CONNECTION_STATUS_OK;
+ if (!gwb->priv->is_writable && !filter && (g_getenv ("GW_HIDE_SYSBOOK") || (!gwb->priv->is_cache_ready))) {
+
+ e_data_book_view_notify_complete (book_view, GNOME_Evolution_Addressbook_Success);
+ bonobo_object_unref (book_view);
+ if (filter)
+ g_object_unref (filter);
+ return NULL;
+ }
+ else
+ status = E_GW_CONNECTION_STATUS_OK;
/* Check if the data is found on summary */
if (gwb->priv->is_summary_ready &&
@@ -2307,6 +2310,27 @@
g_ptr_array_free (ids, TRUE);
}
else {
+ if (gwb->priv->is_cache_ready) {
+ contacts = e_book_backend_db_cache_get_contacts (gwb->priv->file_db, query);
+ temp_list = contacts;
+ for (; contacts != NULL; contacts = g_list_next(contacts)) {
+ if (!e_flag_is_set (closure->running)) {
+ for (;contacts != NULL; contacts = g_list_next (contacts))
+ g_object_unref (contacts->data);
+ break;
+ }
+ e_data_book_view_notify_update (book_view, E_CONTACT(contacts->data));
+ g_object_unref (contacts->data);
+ }
+ if (e_flag_is_set (closure->running))
+ e_data_book_view_notify_complete (book_view, GNOME_Evolution_Addressbook_Success);
+ if (temp_list)
+ g_list_free (temp_list);
+ bonobo_object_unref (book_view);
+
+ return NULL;
+ }
+
/* no summary information found, read from server */
if (enable_debug)
printf ("summary not found, reading the contacts from server\n");
@@ -2847,7 +2871,6 @@
g_object_unref(contact);
g_object_unref (gw_items->data);
}
-
ebgw->priv->is_cache_ready = TRUE;
ebgw->priv->is_summary_ready = TRUE;
@@ -3581,6 +3604,8 @@
}
e_book_backend_db_cache_set_filename (ebgw->priv->file_db, filename);
+ if (priv->marked_for_offline)
+ ebgw->priv->is_cache_ready = TRUE;
g_free(filename);
g_free(dirname);
g_free (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]