[evolution-data-server/cursor-staging: 3/26] EBookBackendSqliteDB: Fix introspect_summary()



commit 8fb12bc079ced10ff18da60dc1fca003348d1700
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Sat Oct 12 20:51:31 2013 +0200

    EBookBackendSqliteDB: Fix introspect_summary()
    
    Fixed introspect_summary() to resolve whether the summary
    configuration has any attribute lists.

 .../libedata-book/e-book-backend-sqlitedb.c        |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c 
b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index 3138319..0898786 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -747,7 +747,7 @@ introspect_summary (EBookBackendSqliteDB *ebsdb,
                     const gchar *folderid,
                     GError **error)
 {
-       gboolean success;
+       gboolean success, have_attr_list;
        gchar *stmt;
        GList *summary_columns = NULL, *l;
        GArray *summary_fields = NULL;
@@ -830,6 +830,7 @@ introspect_summary (EBookBackendSqliteDB *ebsdb,
                goto introspect_summary_finish;
 
        ebsdb->priv->attr_list_indexes = 0;
+       ebsdb->priv->have_attr_list = have_attr_list = FALSE;
 
        if (multivalues) {
                gchar **fields = g_strsplit (multivalues, ":", 0);
@@ -841,7 +842,7 @@ introspect_summary (EBookBackendSqliteDB *ebsdb,
 
                        params = g_strsplit (fields[i], ";", 0);
                        field = e_contact_field_id (params[0]);
-                       iter = append_summary_field (summary_fields, field, NULL, NULL);
+                       iter = append_summary_field (summary_fields, field, &have_attr_list, NULL);
 
                        if (iter) {
                                for (j = 1; params[j]; ++j) {
@@ -860,6 +861,8 @@ introspect_summary (EBookBackendSqliteDB *ebsdb,
                        g_strfreev (params);
                }
 
+               ebsdb->priv->have_attr_list = have_attr_list;
+
                g_strfreev (fields);
        }
 


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