aboutsummaryrefslogtreecommitdiff
path: root/src/actions.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-24 16:17:21 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-24 16:17:21 +0000
commit9ff3ab160cdded60e26d9f7f67d04d383fa16674 (patch)
tree0d87b42515e1fccd6af27df1b8dfefaafd2e0636 /src/actions.cpp
parent6b2a90208aefc44ae35d4515ebf851f533550a09 (diff)
parent006e75bc144bba5062aa5897fec1949d3dc85ce6 (diff)
downloadayatana-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/actions.cpp')
-rw-r--r--src/actions.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index c9c6286..87adb96 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -129,7 +129,10 @@ void on_calendar_activated(GSimpleAction * /*action*/,
g_return_if_fail(t != 0);
- static_cast<Actions*>(gself)->set_calendar_date(DateTime(t));
+ // the client gave us a date; remove the HMS component from the resulting DateTime
+ auto dt = DateTime(t);
+ dt = dt.add_full (0, 0, 0, -dt.hour(), -dt.minute(), -dt.seconds());
+ static_cast<Actions*>(gself)->set_calendar_date(dt);
}
GVariant* create_default_header_state()