aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-24 15:12:31 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-24 15:12:31 +0800
commitc2e1047f7e8af005efce52dbdd5bb41fb502db7f (patch)
tree7bd81378e207d9197dc853e995d0c00958969d17 /calendar
parentbdd1f5a2f8ceb517d735f92dd0bf56b0f1a80847 (diff)
downloadgsoc2013-evolution-c2e1047f7e8af005efce52dbdd5bb41fb502db7f.tar.gz
gsoc2013-evolution-c2e1047f7e8af005efce52dbdd5bb41fb502db7f.tar.zst
gsoc2013-evolution-c2e1047f7e8af005efce52dbdd5bb41fb502db7f.zip
Do not alloc the struct icaltimetype but point to one on the stack. More
2000-08-24 Federico Mena Quintero <federico@helixcode.com> * gui/e-day-view.c (e_day_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=5003
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/e-day-view.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 823e851ab3..958b8c52dd 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-24 Federico Mena Quintero <federico@helixcode.com>
+
+ * gui/e-day-view.c (e_day_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/event-editor-dialog.glade: Remove owner field
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 800278e7fd..91c7d77ff9 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -2404,6 +2404,7 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
CalComponent *comp;
CalComponentDateTime date;
time_t dtstart, dtend;
+ struct icaltimetype itt;
day_view = E_DAY_VIEW (data);
@@ -2411,12 +2412,14 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
- date.value = g_new (struct icaltimetype, 1);
+ date.value = &itt;
+ date.tzid = NULL;
+
*date.value = icaltimetype_from_timet (dtstart, FALSE);
cal_component_set_dtstart (comp, &date);
+
*date.value = icaltimetype_from_timet (dtend, FALSE);
cal_component_set_dtend (comp, &date);
- g_free (date.value);
cal_component_commit_sequence (comp);