diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-14 17:37:09 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-03-14 17:37:09 +0000 |
commit | 8c4067b5484a81e2bb9158266601e30262bfb119 (patch) | |
tree | 11903c9a14e26e3247e9ad4dc9444db686d32ffe /src/planner-eds.cpp | |
parent | 9f3136ba1c79020c10e58fa53e87a84bcce7dc29 (diff) | |
parent | 462e8e6d8e46475ea3222056f65ff40823e9e0bf (diff) | |
download | ayatana-indicator-datetime-8c4067b5484a81e2bb9158266601e30262bfb119.tar.gz ayatana-indicator-datetime-8c4067b5484a81e2bb9158266601e30262bfb119.tar.bz2 ayatana-indicator-datetime-8c4067b5484a81e2bb9158266601e30262bfb119.zip |
Don't use EDS if we're in the greeter. Fixes: 1256130
Diffstat (limited to 'src/planner-eds.cpp')
-rw-r--r-- | src/planner-eds.cpp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp deleted file mode 100644 index f3f28ee..0000000 --- a/src/planner-eds.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2013 Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Authors: - * Charles Kerr <charles.kerr@canonical.com> - */ - -#include <datetime/planner-eds.h> -#include <datetime/engine-eds.h> - -namespace unity { -namespace indicator { -namespace datetime { - -/*** -**** -***/ - -EdsPlanner::EdsPlanner(const std::shared_ptr<EdsEngine>& engine, - const std::shared_ptr<Timezone>& timezone): - m_engine(engine), - m_timezone(timezone) -{ - m_engine->changed().connect([this](){ - g_debug("EdsPlanner %p rebuilding soon because EdsEngine %p emitted 'changed' signal%p", this, m_engine.get()); - rebuild_soon(); - }); -} - -EdsPlanner::~EdsPlanner() =default; - -void EdsPlanner::rebuild_now() -{ - const auto& r = range().get(); - - auto on_appointments_fetched = [this](const std::vector<Appointment>& a){ - g_debug("EdsPlanner %p got %zu appointments", this, a.size()); - m_appointments.set(a); - }; - - m_engine->get_appointments(r.first, r.second, *m_timezone.get(), on_appointments_fetched); -} - -core::Property<std::vector<Appointment>>& EdsPlanner::appointments() -{ - return m_appointments; -} - -/*** -**** -***/ - -} // namespace datetime -} // namespace indicator -} // namespace unity |