diff options
-rw-r--r-- | include/datetime/state.h | 11 | ||||
-rw-r--r-- | src/state-live.cpp | 1 | ||||
-rw-r--r-- | tests/state-mock.h | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/include/datetime/state.h b/include/datetime/state.h index e735b6f..b14908e 100644 --- a/include/datetime/state.h +++ b/include/datetime/state.h @@ -52,11 +52,20 @@ namespace datetime { */ struct State { + /** \brief The current time. Used by the header, by the date menuitem, + and by the locations for relative timestamp */ std::shared_ptr<Clock> clock; + + /** \brief The locations to be displayed in the Locations + section of the #Menu */ std::shared_ptr<Locations> locations; + + /** \brief The appointments to be displayed in the Calendar and + Appointments sections of the #Menu */ std::shared_ptr<Planner> planner; + + /** \brief Configuration options that modify the view */ std::shared_ptr<Settings> settings; - std::shared_ptr<Timezones> timezones; core::Property<DateTime> calendar_day; }; diff --git a/src/state-live.cpp b/src/state-live.cpp index f4690b3..8ee663b 100644 --- a/src/state-live.cpp +++ b/src/state-live.cpp @@ -41,7 +41,6 @@ LiveState::LiveState() std::shared_ptr<Clock> live_clock(new LiveClock(live_timezones)); settings = live_settings; - timezones = live_timezones; clock = live_clock; locations.reset(new SettingsLocations(live_settings, live_timezones)); planner.reset(new PlannerEds); diff --git a/tests/state-mock.h b/tests/state-mock.h index 2104aa0..f2e58e6 100644 --- a/tests/state-mock.h +++ b/tests/state-mock.h @@ -18,10 +18,8 @@ */ #include <datetime/clock-mock.h> -#include <datetime/locations.h> #include <datetime/planner-mock.h> #include <datetime/state.h> -#include <datetime/timezones.h> using namespace unity::indicator::datetime; @@ -35,7 +33,6 @@ public: const DateTime now = DateTime::NowLocal(); mock_clock.reset(new MockClock(now)); settings.reset(new Settings); - timezones.reset(new Timezones); clock = std::dynamic_pointer_cast<Clock>(mock_clock); planner.reset(new MockPlanner); planner->time = now; |