diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-24 16:17:21 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-03-24 16:17:21 +0000 |
commit | 9ff3ab160cdded60e26d9f7f67d04d383fa16674 (patch) | |
tree | 0d87b42515e1fccd6af27df1b8dfefaafd2e0636 /src/planner-upcoming.cpp | |
parent | 6b2a90208aefc44ae35d4515ebf851f533550a09 (diff) | |
parent | 006e75bc144bba5062aa5897fec1949d3dc85ce6 (diff) | |
download | ayatana-indicator-datetime-9ff3ab160cdded60e26d9f7f67d04d383fa16674.tar.gz ayatana-indicator-datetime-9ff3ab160cdded60e26d9f7f67d04d383fa16674.tar.bz2 ayatana-indicator-datetime-9ff3ab160cdded60e26d9f7f67d04d383fa16674.zip |
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. Fixes: 1293646
Diffstat (limited to 'src/planner-upcoming.cpp')
-rw-r--r-- | src/planner-upcoming.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<RangePlanner>& 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<DateTime,DateTime>(b,e)); }); |