[evolution-data-server/openismus-work-master] EBookBackendFile: Updated to use the new constructor for e_book_backend_sqlitedb_new_full
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master] EBookBackendFile: Updated to use the new constructor for e_book_backend_sqlitedb_new_full
- Date: Tue, 20 Nov 2012 08:15:14 +0000 (UTC)
commit c5e79e33a15665631c656466baee22887189f828
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Tue Nov 20 16:47:03 2012 +0900
EBookBackendFile: Updated to use the new constructor for e_book_backend_sqlitedb_new_full
addressbook/backends/file/e-book-backend-file.c | 55 ++--------------------
1 files changed, 5 insertions(+), 50 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index c405580..6ba4562 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1241,12 +1241,7 @@ e_book_backend_file_open (EBookBackendSync *backend,
ESource *source;
GError *local_error = NULL;
gboolean populated;
- ESourceAddressBookConfig *config;
- EContactField *summary_fields = NULL;
- gint n_summary_fields = 0;
- EContactField *indexed_fields = NULL;
- EBookIndexType *index_types = NULL;
- gint n_indexed_fields = 0;
+ ESourceBackendSummarySetup *setup;
source = e_backend_get_source (E_BACKEND (backend));
registry = e_book_backend_get_registry (E_BOOK_BACKEND (backend));
@@ -1255,11 +1250,8 @@ e_book_backend_file_open (EBookBackendSync *backend,
filename = g_build_filename (dirname, "addressbook.db", NULL);
backup = g_build_filename (dirname, "addressbook.db.old", NULL);
- g_type_ensure (E_TYPE_SOURCE_ADDRESS_BOOK_CONFIG);
-
- config = e_source_get_extension (source, E_SOURCE_EXTENSION_ADDRESS_BOOK_CONFIG);
- summary_fields = e_source_address_book_config_get_summary_fields (config, &n_summary_fields);
- indexed_fields = e_source_address_book_config_get_indexed_fields (config, &index_types, &n_indexed_fields);
+ g_type_ensure (E_TYPE_SOURCE_BACKEND_SUMMARY_SETUP);
+ setup = e_source_get_extension (source, E_SOURCE_EXTENSION_BACKEND_SUMMARY_SETUP);
/* The old BDB exists, lets migrate that to sqlite right away
*/
@@ -1269,12 +1261,7 @@ e_book_backend_file_open (EBookBackendSync *backend,
SQLITEDB_EMAIL_ID,
SQLITEDB_FOLDER_ID,
SQLITEDB_FOLDER_NAME,
- TRUE,
- summary_fields,
- n_summary_fields,
- indexed_fields,
- index_types,
- n_indexed_fields,
+ TRUE, setup,
&local_error);
if (!bf->priv->sqlitedb) {
@@ -1283,9 +1270,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
return;
}
@@ -1301,9 +1285,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
g_object_unref (bf->priv->sqlitedb);
bf->priv->sqlitedb = NULL;
@@ -1326,9 +1307,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
bf->priv->sqlitedb = NULL;
return;
}
@@ -1348,9 +1326,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
return;
}
@@ -1360,12 +1335,7 @@ e_book_backend_file_open (EBookBackendSync *backend,
SQLITEDB_EMAIL_ID,
SQLITEDB_FOLDER_ID,
SQLITEDB_FOLDER_NAME,
- TRUE,
- summary_fields,
- n_summary_fields,
- indexed_fields,
- index_types,
- n_indexed_fields,
+ TRUE, setup,
&local_error);
if (!bf->priv->sqlitedb) {
@@ -1374,9 +1344,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
return;
}
@@ -1393,9 +1360,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
g_object_unref (bf->priv->sqlitedb);
bf->priv->sqlitedb = NULL;
@@ -1408,9 +1372,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
g_object_unref (bf->priv->sqlitedb);
bf->priv->sqlitedb = NULL;
g_propagate_error (perror, EDB_ERROR (NO_SUCH_BOOK));
@@ -1440,9 +1401,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
g_object_unref (bf->priv->sqlitedb);
bf->priv->sqlitedb = NULL;
return;
@@ -1453,9 +1411,6 @@ e_book_backend_file_open (EBookBackendSync *backend,
g_free (dirname);
g_free (filename);
g_free (backup);
- g_free (summary_fields);
- g_free (index_types);
- g_free (indexed_fields);
/* Resolve the photo directory here */
dirname = e_book_backend_file_extract_path_from_source (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]