[evolution-data-server/openismus-work-master: 6/8] Make relocatable addressbooks work with direct access.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 6/8] Make relocatable addressbooks work with direct access.
- Date: Thu, 17 Jan 2013 03:10:05 +0000 (UTC)
commit 1830c1fc4459de2e82b2a85f9a133d387620a1f4
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Fri Dec 14 20:06:12 2012 +0900
Make relocatable addressbooks work with direct access.
addressbook/backends/file/e-book-backend-file.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 4527f77..62b89a8 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1646,13 +1646,20 @@ e_book_backend_file_get_direct_book (EBookBackend *backend)
ESource *source;
gchar *backend_path;
gchar *dirname;
+ const gchar *modules_env = NULL;
+ modules_env = g_getenv (EDS_ADDRESS_BOOK_MODULES);
+
source = e_backend_get_source (E_BACKEND (backend));
registry = e_book_backend_get_registry (backend);
dirname = e_book_backend_file_extract_path_from_source (
registry, source, GET_PATH_DB_DIR);
- backend_path = g_build_filename (BACKENDDIR, "libebookbackendfile.so", NULL);
+ /* Support in-tree testing / relocated modules */
+ if (modules_env)
+ backend_path = g_build_filename (modules_env, "libebookbackendfile.so", NULL);
+ else
+ backend_path = g_build_filename (BACKENDDIR, "libebookbackendfile.so", NULL);
direct = e_data_book_direct_new (backend_path, "EBookBackendFileFactory", dirname);
g_free (backend_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]