aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/view-utils.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-17 12:49:37 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-17 12:49:37 +0800
commit541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72 (patch)
treea1eee2c2ff904bb8244e2a3645ecd4027615fde8 /calendar/gui/view-utils.c
parentfe09695939f1d4bcf08b297cf4ade552944514ab (diff)
downloadgsoc2013-evolution-541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72.tar.gz
gsoc2013-evolution-541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72.tar.zst
gsoc2013-evolution-541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72.zip
New event generation api in place -miguel
svn path=/trunk/; revision=146
Diffstat (limited to 'calendar/gui/view-utils.c')
-rw-r--r--calendar/gui/view-utils.c51
1 files changed, 4 insertions, 47 deletions
diff --git a/calendar/gui/view-utils.c b/calendar/gui/view-utils.c
index 1a5322228d..ccbe125291 100644
--- a/calendar/gui/view-utils.c
+++ b/calendar/gui/view-utils.c
@@ -8,50 +8,6 @@
#include <string.h>
#include "view-utils.h"
-
-/* FIXME: remove this function later */
-
-#if 0
-static GList *
-calendar_get_events_in_range (Calendar *cal, time_t start, time_t end, GCompareFunc sort_func)
-{
- static iCalObject objs[24];
- static int ready = 0;
- int i;
- GList *list;
-
- if (!ready) {
- struct tm tm;
- time_t tim;
-
- ready = 1;
-
- for (i = 0; i < 24; i++) {
- tim = time (NULL);
- tm = *localtime (&tim);
-
- tm.tm_hour = i;
- tm.tm_min = 0;
- tm.tm_sec = 0;
- objs[i].dtstart = mktime (&tm);
-
- tm.tm_hour = i;
- tm.tm_min = 30;
- tm.tm_sec = 0;
- objs[i].dtend = mktime (&tm);
-
- objs[i].summary = "Ir a chingar a tu madre";
- }
- }
-
- list = NULL;
-
- for (i = 0; i < 8; i++)
- list = g_list_append (list, &objs[i]);
-
- return list;
-}
-#endif
void
view_utils_draw_events (GtkWidget *widget, GdkWindow *window, GdkGC *gc, GdkRectangle *area,
int flags, GList *events, time_t start, time_t end)
@@ -72,10 +28,11 @@ view_utils_draw_events (GtkWidget *widget, GdkWindow *window, GdkGC *gc, GdkRect
max_y = area->y + area->height - font_height * ((flags & VIEW_UTILS_DRAW_SPLIT) ? 2 : 1);
for (y = area->y, list = events; (y < max_y) && list; y += font_height, list = list->next) {
- ico = list->data;
+ CalendarObject *co = list->data;
+ ico = co->ico;
- tm_start = *localtime (&ico->dtstart);
- tm_end = *localtime (&ico->dtend);
+ tm_start = *localtime (&co->ev_start);
+ tm_end = *localtime (&co->ev_end);
str = ico->summary;
if (flags & VIEW_UTILS_DRAW_END) {