aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1534777..3c17923 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -21,11 +21,13 @@
#include <datetime/actions-live.h>
#include <datetime/clock.h>
+#include <datetime/clock-watcher.h>
#include <datetime/exporter.h>
#include <datetime/locations-settings.h>
#include <datetime/menu.h>
#include <datetime/planner-eds.h>
#include <datetime/settings-live.h>
+#include <datetime/snap.h>
#include <datetime/state.h>
#include <datetime/timezones-live.h>
@@ -67,6 +69,13 @@ main(int /*argc*/, char** /*argv*/)
std::shared_ptr<Actions> actions(new LiveActions(state));
MenuFactory factory(actions, state);
+ // snap decisions
+ ClockWatcherImpl clock_watcher(state);
+ Snap snap(state->clock);
+ clock_watcher.alarm_reached().connect([&snap](const Appointment& appt){
+ snap(appt);
+ });
+
// create the menus
std::vector<std::shared_ptr<Menu>> menus;
for(int i=0, n=Menu::NUM_PROFILES; i<n; i++)