From f54505942ce2dcc73fcbad79d4f5cdce991bf8cb Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 8 Dec 2017 10:40:44 +0000 Subject: Make the datetime indicator build on non-Ubuntu systems (which mostly lack url-dispatcher and Ubuntu Touch sound schema files. --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 31654c9..fdd84b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,7 +29,9 @@ #include #include #include +#ifdef HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS #include +#endif #include #include #include @@ -90,6 +92,7 @@ namespace return state; } +#ifdef HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS std::shared_ptr create_simple_alarm_queue(const std::shared_ptr& clock, const std::shared_ptr& snooze_planner, const std::shared_ptr& engine, @@ -113,6 +116,7 @@ namespace auto wakeup_timer = std::make_shared(clock); return std::make_shared(clock, planner, wakeup_timer); } +#endif } int @@ -133,9 +137,10 @@ main(int /*argc*/, char** /*argv*/) auto actions = std::make_shared(state); MenuFactory factory(actions, state); +#ifdef HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS // set up the snap decisions auto snooze_planner = std::make_shared(state->settings, state->clock); - auto notification_engine = std::make_shared("indicator-datetime-service"); + auto notification_engine = std::make_shared("ayatana-indicator-datetime-service"); std::unique_ptr snap (new Snap(notification_engine, state->settings)); auto alarm_queue = create_simple_alarm_queue(state->clock, snooze_planner, engine, timezone_); auto on_snooze = [snooze_planner](const Appointment& appointment, const Alarm& alarm) { @@ -147,6 +152,7 @@ main(int /*argc*/, char** /*argv*/) engine->disable_ubuntu_alarm(appointment); }; alarm_queue->alarm_reached().connect(on_alarm_reached); +#endif // create the menus std::vector> menus; -- cgit v1.2.3