diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-20 16:17:37 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-20 16:17:37 -0500 |
commit | f09e561c4181f4c03a496f70c1f6cecc0f838419 (patch) | |
tree | 6abb32958b9549f18d070f31af51660ff38a7c9f /src/actions.cpp | |
parent | 75729a4dda25141e860128ef3547c5946f7c4a5d (diff) | |
download | ayatana-indicator-datetime-f09e561c4181f4c03a496f70c1f6cecc0f838419.tar.gz ayatana-indicator-datetime-f09e561c4181f4c03a496f70c1f6cecc0f838419.tar.bz2 ayatana-indicator-datetime-f09e561c4181f4c03a496f70c1f6cecc0f838419.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.
Diffstat (limited to 'src/actions.cpp')
-rw-r--r-- | src/actions.cpp | 5 |
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() |