aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-calendar.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-10 02:26:47 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-10 02:26:47 +0800
commit421bff508e5778dd55c7e14554b2994c20517af1 (patch)
treec2ea329beac4b63768037c662507194469925841 /my-evolution/e-summary-calendar.c
parentd6286b4cba3ca6d8596549d4d90a8815e41746f0 (diff)
downloadgsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.tar
gsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.tar.gz
gsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.tar.bz2
gsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.tar.lz
gsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.tar.xz
gsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.tar.zst
gsoc2013-evolution-421bff508e5778dd55c7e14554b2994c20517af1.zip
Fix HTML and show more than 1 days appointments
svn path=/trunk/; revision=10922
Diffstat (limited to 'my-evolution/e-summary-calendar.c')
-rw-r--r--my-evolution/e-summary-calendar.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c
index 71e3e4670b..ef4c108cec 100644
--- a/my-evolution/e-summary-calendar.c
+++ b/my-evolution/e-summary-calendar.c
@@ -143,15 +143,33 @@ generate_html (gpointer data)
GList *uids, *l;
GString *string;
char *tmp;
- time_t t, day_begin, day_end;
+ time_t t, begin, end, f;
t = time (NULL);
- day_begin = time_day_begin (t);
- day_end = time_day_end (t);
+ begin = time_day_begin (t);
+ switch (summary->preferences->days) {
+ case E_SUMMARY_CALENDAR_ONE_DAY:
+ end = time_day_end (t);
+ break;
+
+ case E_SUMMARY_CALENDAR_FIVE_DAYS:
+ f = time_add_day (t, 5);
+ end = time_day_end (f);
+ break;
+
+ case E_SUMMARY_CALENDAR_ONE_WEEK:
+ f = time_add_week (t, 1);
+ end = time_day_end (f);
+ break;
+
+ case E_SUMMARY_CALENDAR_ONE_MONTH:
+ f = time_add_month (t, 1);
+ end = time_day_end (f);
+ break;
+ }
uids = cal_client_get_objects_in_range (calendar->client,
- CALOBJ_TYPE_EVENT, day_begin,
- day_end);
+ CALOBJ_TYPE_EVENT, begin, end);
if (uids == NULL) {
char *s1, *s2;
@@ -219,7 +237,7 @@ generate_html (gpointer data)
}
cal_obj_uid_list_free (uids);
- g_string_append (string, "</ul>");
+ g_string_append (string, "</dd></dl>");
}
if (calendar->html) {