aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-08-25 01:48:28 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-08-25 01:48:28 +0800
commit08523fea6f9a0e9a02685cf3d6750973595ff482 (patch)
treeb47efa4b9541c78ef0f2bf6de0b33c66904b1435 /calendar
parent152d68ee68e875f9290742380dc1433ca18e8d91 (diff)
downloadgsoc2013-evolution-08523fea6f9a0e9a02685cf3d6750973595ff482.tar.gz
gsoc2013-evolution-08523fea6f9a0e9a02685cf3d6750973595ff482.tar.zst
gsoc2013-evolution-08523fea6f9a0e9a02685cf3d6750973595ff482.zip
Do not alloc the struct icaltimetype but point to one on the stack. More
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. svn path=/trunk/; revision=5007
Diffstat (limited to 'calendar')
-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));
}