diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-22 10:01:20 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-01-22 10:01:20 -0600 |
commit | 2db8f6e7c4b7148377800400c72bb2e59b793d3a (patch) | |
tree | 2f5d1b1bfdd1f6886c74ac24fb0b1eeb7787cafd | |
parent | 47ab9adad438b137b5e7e9b33ce503e184e019f8 (diff) | |
download | ayatana-indicator-datetime-2db8f6e7c4b7148377800400c72bb2e59b793d3a.tar.gz ayatana-indicator-datetime-2db8f6e7c4b7148377800400c72bb2e59b793d3a.tar.bz2 ayatana-indicator-datetime-2db8f6e7c4b7148377800400c72bb2e59b793d3a.zip |
remove the State.timezones property. Timezones is a helper class for LiveClock and doesn't need to be public in State.
-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; |