From 08523fea6f9a0e9a02685cf3d6750973595ff482 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 24 Aug 2000 17:48:28 +0000 Subject: Do not alloc the struct icaltimetype but point to one on the stack. More 2000-08-24 JP Rosevear * gui/e-week-view.c (e_week_view_on_new_appointment): Do not alloc the struct icaltimetype but point to one on the stack. More importantly, set the date.tzid to NULL. svn path=/trunk/; revision=5007 --- calendar/gui/e-week-view.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 4a84aed29e..2bb1ce4e05 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2740,12 +2740,15 @@ e_week_view_on_new_appointment (GtkWidget *widget, gpointer data) EWeekView *week_view; CalComponent *comp; CalComponentDateTime date; + struct icaltimetype itt; + week_view = E_WEEK_VIEW (data); comp = cal_component_new (); cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT); - date.value = g_new0 (struct icaltimetype, 1); + date.value = &itt; + date.tzid = NULL; *date.value = icaltimetype_from_timet (week_view->day_starts[week_view->selection_start_day], @@ -2757,10 +2760,7 @@ e_week_view_on_new_appointment (GtkWidget *widget, gpointer data) FALSE); cal_component_set_dtend (comp, &date); - g_free (date.value); - gnome_calendar_edit_object (week_view->calendar, comp); - gtk_object_unref (GTK_OBJECT (comp)); } -- cgit v1.2.3