aboutsummaryrefslogtreecommitdiff
path: root/src/planner-eds.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-02-05 16:52:57 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-02-05 16:52:57 -0600
commit4f27e42b0a517fac386042c67efc721463115bb9 (patch)
tree5783b4a75a101f2b64d34a952ae82b19211a6971 /src/planner-eds.cpp
parent5c91c53c1d56a356e091d6910b8c71e7c139f46a (diff)
downloadayatana-indicator-datetime-4f27e42b0a517fac386042c67efc721463115bb9.tar.gz
ayatana-indicator-datetime-4f27e42b0a517fac386042c67efc721463115bb9.tar.bz2
ayatana-indicator-datetime-4f27e42b0a517fac386042c67efc721463115bb9.zip
revert r400; we can't block alarms by UID because that would hide recurring alarms
Diffstat (limited to 'src/planner-eds.cpp')
-rw-r--r--src/planner-eds.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp
index e9452f0..7d9416c 100644
--- a/src/planner-eds.cpp
+++ b/src/planner-eds.cpp
@@ -77,12 +77,6 @@ public:
g_clear_object(&m_source_registry);
}
- void block_appointment(const Appointment& appointment)
- {
- m_blocked.insert(appointment.uid);
- rebuild_soon(UPCOMING);
- }
-
private:
static void on_source_registry_ready(GObject* /*source*/, GAsyncResult* res, gpointer gself)
@@ -354,13 +348,9 @@ private:
const auto begin = g_date_time_add_minutes(ref.get(),-10);
const auto end = g_date_time_add_months(begin,1);
- get_appointments(begin, end, [this](const std::vector<Appointment>& all) {
- std::vector<Appointment> unblocked;
- for(const auto& a : all)
- if (m_blocked.count(a.uid) == 0)
- unblocked.push_back(a);
- g_debug("got %d upcoming appointments, %d of which are unblocked", (int)all.size(), (int)unblocked.size());
- m_owner.upcoming.set(unblocked);
+ get_appointments(begin, end, [this](const std::vector<Appointment>& appointments) {
+ g_debug("got %d upcoming appointments", (int)appointments.size());
+ m_owner.upcoming.set(appointments);
});
g_date_time_unref(end);
@@ -530,7 +520,6 @@ private:
std::set<ESource*> m_sources;
std::map<ESource*,ECalClient*> m_clients;
std::map<ESource*,ECalClientView*> m_views;
- std::set<std::string> m_blocked;
GCancellable* m_cancellable = nullptr;
ESourceRegistry* m_source_registry = nullptr;
guint m_rebuild_tag = 0;
@@ -542,11 +531,6 @@ PlannerEds::PlannerEds(const std::shared_ptr<Clock>& clock): p(new Impl(*this, c
PlannerEds::~PlannerEds() =default;
-void PlannerEds::block_appointment(const Appointment& appointment)
-{
- p->block_appointment(appointment);
-}
-
} // namespace datetime
} // namespace indicator
} // namespace unity