diff options
-rw-r--r-- | include/datetime/planner-eds.h | 4 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/planner-eds.cpp | 12 |
3 files changed, 11 insertions, 9 deletions
diff --git a/include/datetime/planner-eds.h b/include/datetime/planner-eds.h index 32ea57a..3d558df 100644 --- a/include/datetime/planner-eds.h +++ b/include/datetime/planner-eds.h @@ -22,7 +22,7 @@ #include <datetime/clock.h> #include <datetime/planner.h> -#include <datetime/timezones.h> +#include <datetime/timezone.h> #include <memory> // shared_ptr, unique_ptr @@ -37,7 +37,7 @@ class PlannerEds: public Planner { public: PlannerEds(const std::shared_ptr<Clock>& clock, - const std::shared_ptr<Timezones>& timezones); + const std::shared_ptr<Timezone>& timezone); virtual ~PlannerEds(); private: diff --git a/src/main.cpp b/src/main.cpp index 762795f..24a9409 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,6 +27,7 @@ #include <datetime/settings-live.h> #include <datetime/snap.h> #include <datetime/state.h> +#include <datetime/timezone-file.h> #include <datetime/timezones-live.h> #include <glib/gi18n.h> // bindtextdomain() @@ -56,10 +57,11 @@ main(int /*argc*/, char** /*argv*/) std::shared_ptr<Settings> live_settings(new LiveSettings); std::shared_ptr<Timezones> live_timezones(new LiveTimezones(live_settings, TIMEZONE_FILE)); std::shared_ptr<Clock> live_clock(new LiveClock(live_timezones)); + std::shared_ptr<Timezone> file_timezone(new FileTimezone(TIMEZONE_FILE)); state->settings = live_settings; state->clock = live_clock; state->locations.reset(new SettingsLocations(live_settings, live_timezones)); - state->planner.reset(new PlannerEds(live_clock, live_timezones)); + state->planner.reset(new PlannerEds(live_clock, file_timezone)); state->planner->time = live_clock->localtime(); std::shared_ptr<Actions> actions(new LiveActions(state)); MenuFactory factory(actions, state); diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp index 8eeca43..f47c2e9 100644 --- a/src/planner-eds.cpp +++ b/src/planner-eds.cpp @@ -44,10 +44,10 @@ public: Impl(PlannerEds& owner, const std::shared_ptr<Clock>& clock, - const std::shared_ptr<Timezones>& timezones): + const std::shared_ptr<Timezone>& timezone): m_owner(owner), m_clock(clock), - m_timezones(timezones), + m_timezone(timezone), m_cancellable(g_cancellable_new()) { e_source_registry_new(m_cancellable, on_source_registry_ready, this); @@ -394,7 +394,7 @@ private: **/ icaltimezone * default_timezone = nullptr; - const auto tz = m_timezones->timezone.get().c_str(); + const auto tz = m_timezone->timezone.get().c_str(); if (tz && *tz) { default_timezone = icaltimezone_get_builtin_timezone(tz); @@ -546,7 +546,7 @@ private: PlannerEds& m_owner; std::shared_ptr<Clock> m_clock; - std::shared_ptr<Timezones> m_timezones; + std::shared_ptr<Timezone> m_timezone; std::set<ESource*> m_sources; std::map<ESource*,ECalClient*> m_clients; std::map<ESource*,ECalClientView*> m_views; @@ -558,8 +558,8 @@ private: }; PlannerEds::PlannerEds(const std::shared_ptr<Clock>& clock, - const std::shared_ptr<Timezones>& timezones): - p(new Impl(*this, clock, timezones)) {} + const std::shared_ptr<Timezone>& timezone): + p(new Impl(*this, clock, timezone)) {} PlannerEds::~PlannerEds() =default; |