Commit 4493f23c authored by Isaque Galdino de Araujo's avatar Isaque Galdino de Araujo

tracker: Make private store optional

In commit dd4fec2f we have changed the way Notes handle Tracker, to use
it as a library instead of a service.

That is cool for sandbox package where it doesn't need to rely on
anything else.

But it might be interesting, when installed as a standard application,
to use the system service instead of a local one.
parent 2457f680
Pipeline #39837 failed with stage
in 6 minutes and 11 seconds
......@@ -139,6 +139,9 @@
"name" : "bijiben",
"buildsystem" : "meson",
"builddir" : true,
"config-opts" : [
"-Dprivate_store=true"
],
"sources" : [
{
"type" : "git",
......
......@@ -40,6 +40,9 @@ foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
# Tracker
config_h.set('TRACKER_PRIVATE_STORE', get_option('private_store'))
# compiler flags
common_flags = [
'-DHAVE_CONFIG_H',
......@@ -146,4 +149,5 @@ meson.add_install_script(
output = ' Version: ' + bijiben_version + '\n'
output += ' Enable Zeitgeist ' + enable_zeitgeist.to_string() + '\n'
output += ' Use Private Store ' + get_option('private_store').to_string() + '\n'
message(output)
option('zeitgeist', type: 'boolean', value: false, description: 'Enable Zeitgeist')
option('update_mimedb', type: 'boolean', value: true, description: 'update-mime-database after install')
option('private_store', type: 'boolean', value: false, description: 'Use Tracker private store instead of Tracker service')
......@@ -423,6 +423,7 @@ bijiben_shell_search_provider_app_init (BijibenShellSearchProviderApp *self)
char *storage_path;
GFile *storage;
GdkRGBA color = { 0, 0, 0, 0 };
#ifdef TRACKER_PRIVATE_STORE
g_autofree char *filename = NULL;
g_autoptr (GFile) data_location = NULL;
......@@ -436,6 +437,9 @@ bijiben_shell_search_provider_app_init (BijibenShellSearchProviderApp *self)
data_location,
NULL, NULL, NULL,
&error);
#else
self->connection = tracker_sparql_connection_get (NULL, &error);
#endif
if (error)
{
......
......@@ -17,7 +17,7 @@
#include <gtk/gtk.h>
#include "config.h"
#include "libbiji.h"
#include "biji-notebook.h"
#include "biji-error.h"
......@@ -218,6 +218,7 @@ biji_manager_initable_init (GInitable *initable,
GError *local_error = NULL;
GoaClient *client;
ESourceRegistry *registry;
#ifdef TRACKER_PRIVATE_STORE
g_autofree char *filename = NULL;
g_autoptr (GFile) data_location = NULL;
......@@ -233,6 +234,9 @@ biji_manager_initable_init (GInitable *initable,
data_location,
NULL, NULL, NULL,
&local_error);
#else
self->connection = tracker_sparql_connection_get (NULL, &local_error);
#endif
if (local_error)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment