[evolution-data-server/openismus-work-3-8: 43/118] Customize the default system addressbook
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-3-8: 43/118] Customize the default system addressbook
- Date: Wed, 2 Oct 2013 21:19:20 +0000 (UTC)
commit 137a9c03655a9b0da4b8498da7749fb0e36891cd
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Tue May 28 17:36:27 2013 +0900
Customize the default system addressbook
This patch modifies data/sources/system-address-book.source.in
so that it has a customized summary optimized for person names
and phone numbers.
This customization adds the following fields to the summary
with prefix indexes (for optimized SQLite queries):
E_CONTACT_FULL_NAME, E_CONTACT_FAMILY_NAME, E_CONTACT_NICKNAME,
E_CONTACT_GIVEN_NAME, E_CONTACT_TEL
Additionally, the E_CONTACT_TEL field is configured to store the
normalized phone number data in SQLite in order to optimize the
phone number queries such as E_BOOK_QUERY_EQUALS_PHONE_NUMBER.
The code to achieve the same configuration is as follows:
e_source_backend_summary_setup_set_summary_fields (
setup,
E_CONTACT_FULL_NAME,
E_CONTACT_FAMILY_NAME,
E_CONTACT_NICKNAME,
E_CONTACT_GIVEN_NAME,
E_CONTACT_TEL,
0);
e_source_backend_summary_setup_set_indexed_fields (
setup,
E_CONTACT_FULL_NAME, E_BOOK_INDEX_PREFIX,
E_CONTACT_FAMILY_NAME, E_BOOK_INDEX_PREFIX,
E_CONTACT_NICKNAME, E_BOOK_INDEX_PREFIX,
E_CONTACT_GIVEN_NAME, E_BOOK_INDEX_PREFIX,
E_CONTACT_TEL, E_BOOK_INDEX_PREFIX,
E_CONTACT_TEL, E_BOOK_INDEX_PHONE,
0);
.../builtin/system-address-book.source.in | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/services/evolution-source-registry/builtin/system-address-book.source.in
b/services/evolution-source-registry/builtin/system-address-book.source.in
index f1cea75..d218c11 100644
--- a/services/evolution-source-registry/builtin/system-address-book.source.in
+++ b/services/evolution-source-registry/builtin/system-address-book.source.in
@@ -7,3 +7,7 @@ Parent=local-stub
[Address Book]
BackendName=local
Color=#becedd
+
+[Backend Summary Setup]
+SummaryFields=full_name:family_name:nickname:given_name:phone
+IndexedFields=full_name,prefix:family_name,prefix:nickname,prefix:given_name,prefix:phone,prefix:phone,phone
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]