summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-09-05 07:53:12 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2016-09-05 07:53:12 +0200
commite2c440fd9c30995598492e1eaa576adad854b2f0 (patch)
treecad313ea066a2fe274972d6282a19337e9b103f5
parentaf01242af3419df119bd066f2db96cedf9af31c7 (diff)
downloadzeitgeist-e2c440fd9c30995598492e1eaa576adad854b2f0.tar.gz
datahub: Use proper compile-flag to enable DownloadsDirectoryMonitor
-rw-r--r--config.vapi2
-rw-r--r--configure.ac9
-rw-r--r--datahub/Makefile.am6
-rw-r--r--datahub/zeitgeist-datahub.vala5
4 files changed, 10 insertions, 12 deletions
diff --git a/config.vapi b/config.vapi
index bcb18952..1322a8dd 100644
--- a/config.vapi
+++ b/config.vapi
@@ -4,6 +4,4 @@ namespace Config
public const string GETTEXT_PACKAGE;
public const string VERSION;
public const string DATADIR;
-
- public const bool DOWNLOADS_MONITOR_ENABLED;
}
diff --git a/configure.ac b/configure.ac
index 1970f39e..f045edf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,13 +196,7 @@ AM_CONDITIONAL(ENABLE_TELEPATHY, test "x$enable_telepathy" = "xyes" -a "x$enable
AC_ARG_ENABLE([downloads-monitor],
AS_HELP_STRING([--disable-downloads-monitor], [Disables the XDG_DOWNLOAD_DIRECTORY file monitor]),
[enable_downloads_monitor=$enableval],[enable_downloads_monitor="yes"])
-
-if test "x$enable_downloads_monitor" = "xyes" -a "x$enable_datahub" = "xyes"; then
- AC_DEFINE([DOWNLOADS_MONITOR_ENABLED], [1], [Is the XDG_DOWNLOAD_DIRECTORY file monitor enabled?])
-else
- AC_DEFINE([DOWNLOADS_MONITOR_ENABLED], [0], [Is the XDG_DOWNLOAD_DIRECTORY file monitor enabled?])
-fi
-AM_CONDITIONAL(DOWNLOADS_MONITOR_ENABLED, test "x$enable_downloads_monitor" = "xyes" -a "x$enable_datahub" = "xyes")
+AM_CONDITIONAL(ENABLE_DOWNLOADS_MONITOR, test "x$enable_downloads_monitor" = "xyes" -a "x$enable_datahub" = "xyes")
#################################################
@@ -307,6 +301,7 @@ ${PACKAGE}-${VERSION}
Other build options:
DataHub: ${enable_datahub}
Telepathy provider: ${enable_telepathy}
+ Downloads monitor: ${enable_downloads_monitor}
SQL debugging: ${explain_queries}
libzeitgeist docs: ${enable_docs}
GObject Introspection: ${enable_introspection}
diff --git a/datahub/Makefile.am b/datahub/Makefile.am
index c391219f..8cf136b4 100644
--- a/datahub/Makefile.am
+++ b/datahub/Makefile.am
@@ -28,7 +28,6 @@ BUILT_SOURCES = \
zeitgeist_datahub_VALASOURCES = \
data-provider.vala \
desktop-launch-listener.vala \
- downloads-directory-provider.vala \
kde-recent-document-provider.vala \
recent-manager-provider.vala \
utils.vala \
@@ -40,6 +39,11 @@ AM_VALAFLAGS += --define ENABLE_TELEPATHY --pkg telepathy-glib
zeitgeist_datahub_VALASOURCES += telepathy-observer.vala
endif
+if ENABLE_DOWNLOADS_MONITOR
+AM_VALAFLAGS += --define ENABLE_DOWNLOADS_MONITOR
+zeitgeist_datahub_VALASOURCES += downloads-directory-provider.vala
+endif
+
nodist_zeitgeist_datahub_SOURCES = \
$(BUILT_SOURCES) \
$(zeitgeist_datahub_VALASOURCES:.vala=.c) \
diff --git a/datahub/zeitgeist-datahub.vala b/datahub/zeitgeist-datahub.vala
index 1b24f247..5b6ee845 100644
--- a/datahub/zeitgeist-datahub.vala
+++ b/datahub/zeitgeist-datahub.vala
@@ -116,8 +116,9 @@ public class DataHub : Object, DataHubService
providers.prepend (new TelepathyObserver (this));
#endif
- if (Config.DOWNLOADS_MONITOR_ENABLED)
- providers.prepend (new DownloadsDirectoryMonitor (this));
+#if ENABLE_DOWNLOADS_MONITOR
+ providers.prepend (new DownloadsDirectoryMonitor (this));
+#endif
providers.prepend (new DesktopLaunchListener (this));