From d1946d5d8d6837ee60a65c555f24be63ba34917a Mon Sep 17 00:00:00 2001 From: Enrico Zini Date: Sat, 7 Nov 2009 00:04:50 +0000 Subject: [PATCH] Skip the empty dates in the next30 --- README | 1 + src/widgets/calendar.vala | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index 1adfde0..a0b4490 100644 --- a/README +++ b/README @@ -153,6 +153,7 @@ TODO list / wish list * Features to add: - calendar: show preview of next 30 days + (not among the notes: it replaces the calendar view; unless we skip the empty dates, which is a good idea) - contacts: show as a fancy focus+context list (see prefuse) - GSM power and network - link to open SHR-dialer diff --git a/src/widgets/calendar.vala b/src/widgets/calendar.vala index cf8a7fc..8f2c662 100644 --- a/src/widgets/calendar.vala +++ b/src/widgets/calendar.vala @@ -234,8 +234,11 @@ public class Calendar : Gtk.VBox text = ""; } } - date.strftime(buffer, "%d %a"); - next_30.add_day((string)buffer, text); + if (text != "") + { + date.strftime(buffer, "%d %a"); + next_30.add_day((string)buffer, text); + } date.add_days(1); } } -- 2.39.5