diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-14 17:37:00 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-03-14 17:37:00 +0000 |
commit | 9f3136ba1c79020c10e58fa53e87a84bcce7dc29 (patch) | |
tree | fa0c19e8e5c7f362b7a04f0ad3e6f57d96c1462c /src/utils.c | |
parent | 39d8fc602053397a3596d6d35afb5738b09b05a6 (diff) | |
parent | 35b0a3601f1d7d9f757467ffc7b909c461c2f49d (diff) | |
download | ayatana-indicator-datetime-9f3136ba1c79020c10e58fa53e87a84bcce7dc29.tar.gz ayatana-indicator-datetime-9f3136ba1c79020c10e58fa53e87a84bcce7dc29.tar.bz2 ayatana-indicator-datetime-9f3136ba1c79020c10e58fa53e87a84bcce7dc29.zip |
When the user clicks on a date in the calendar, update the "Upcoming Events" section to show events starting at that date. Fixes: 1290169, 1290171, 1291468
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index f4eb53f..c9107ce 100644 --- a/src/utils.c +++ b/src/utils.c @@ -159,6 +159,10 @@ getDateProximity(GDateTime* now, GDateTime* time) gint now_year, now_month, now_day; gint time_year, time_month, time_day; + // did it already happen? + if (g_date_time_difference(time, now) < -G_USEC_PER_SEC) + return DATE_PROXIMITY_FAR; + // does it happen today? g_date_time_get_ymd(now, &now_year, &now_month, &now_day); g_date_time_get_ymd(time, &time_year, &time_month, &time_day); |