aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-05 14:54:57 -0500
committerTed Gould <ted@gould.cx>2011-04-05 14:54:57 -0500
commit4b281e9a5dc3414fd55cb0621ab2a62d11989c01 (patch)
tree6dc6ad838c6126780b094b60110bf332396a3a54
parentc6d23b37d9833948e9286f849c12cea0061e2a95 (diff)
downloadayatana-indicator-datetime-4b281e9a5dc3414fd55cb0621ab2a62d11989c01.tar.gz
ayatana-indicator-datetime-4b281e9a5dc3414fd55cb0621ab2a62d11989c01.tar.bz2
ayatana-indicator-datetime-4b281e9a5dc3414fd55cb0621ab2a62d11989c01.zip
Detect a full day event and print it differently
-rw-r--r--src/datetime-service.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 6458ae9..eff3cfa 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -860,6 +860,9 @@ update_appointment_menu_items (gpointer user_data)
g_free (summary);
// Due text
+ if (time_add_day(ci->start, 1) == ci->end) {
+ strftime(right, 20, "%A", due);
+ } else {
if (apt_output == SETTINGS_TIME_12_HOUR) {
if ((mday == dmday) && (mon == dmon) && (year == dyear))
strftime(right, 20, _(DEFAULT_TIME_12_FORMAT), due);
@@ -871,6 +874,7 @@ update_appointment_menu_items (gpointer user_data)
else
strftime(right, 20, _(DEFAULT_TIME_24_FORMAT_WITH_DAY), due);
}
+ }
g_debug("Appointment time: %s, for date %s", right, asctime(due));
dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_RIGHT, right);