aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/e-week-view.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d47461bc47..5f6b7ab8f6 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2000-08-24 JP Rosevear <jpr@helixcode.com>
+ * 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.
+
+2000-08-24 JP Rosevear <jpr@helixcode.com>
+
* gui/gnome-cal.c (save_event_object_cb): Make signal
names saner
(released_event_object_cb): ditto
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));
}