From f09e561c4181f4c03a496f70c1f6cecc0f838419 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 20 Mar 2014 16:17:37 -0500 Subject: when clicking onto a different calendar date on the Desktop, show the events for that calendar day starting at the beginning of the day, rather than the current time of day. --- src/planner-upcoming.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/planner-upcoming.cpp') diff --git a/src/planner-upcoming.cpp b/src/planner-upcoming.cpp index 4e5af6f..ed45955 100644 --- a/src/planner-upcoming.cpp +++ b/src/planner-upcoming.cpp @@ -33,8 +33,8 @@ UpcomingPlanner::UpcomingPlanner(const std::shared_ptr& range_plan { date().changed().connect([this](const DateTime& dt){ // set the range to the upcoming month - const auto b = dt.add_full(0, 0, -1, 0, 0, 0); - const auto e = dt.add_full(0, 1, 0, 0, 0, 0); + const auto b = dt.add_full(0, 0, -1, -dt.hour(), -dt.minute(), -dt.seconds()); + const auto e = b.add_full(0, 1, 0, 0, 0, 0); g_debug("%p setting date range to [%s..%s]", this, b.format("%F %T").c_str(), e.format("%F %T").c_str()); m_range_planner->range().set(std::pair(b,e)); }); -- cgit v1.2.3