aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2004-12-02 21:14:21 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2004-12-02 21:14:21 +0800
commit2f70359db9a97a8e3f13d0ee9970d93a139f839e (patch)
treeada1e1d9f6106339b1f852b911ccdaf14ecbf23f /calendar/gui
parente403b9e4391b3ee6d40d6806dbb880937d335658 (diff)
downloadgsoc2013-evolution-2f70359db9a97a8e3f13d0ee9970d93a139f839e.tar.gz
gsoc2013-evolution-2f70359db9a97a8e3f13d0ee9970d93a139f839e.tar.zst
gsoc2013-evolution-2f70359db9a97a8e3f13d0ee9970d93a139f839e.zip
Free the string day_view->last_edited_comp_string before changing
2004-12-02 Chenthill Palanisamy <pchenthill@novell.com> * gui/e-day-view.c (e_day_view_finish_resize), (e_day_view_reshape_day_event) (e_day_view_change_event_time): Free the string day_view->last_edited_comp_string before changing assigning it another value. * gui/e-week-view.c (e_week_view_change_event_time): Free the string week_view->last_edited_comp_string for the same reason above. svn path=/trunk/; revision=28042
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c13
-rw-r--r--calendar/gui/e-week-view.c6
2 files changed, 19 insertions, 0 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index f7ee8adcb0..970fe8a325 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -3965,6 +3965,12 @@ e_day_view_finish_resize (EDayView *day_view)
}
e_cal_component_commit_sequence (comp);
+
+ if (day_view->last_edited_comp_string != NULL) {
+ g_free (day_view->last_edited_comp_string);
+ day_view->last_edited_comp_string == NULL;
+ }
+
day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
gnome_canvas_item_hide (day_view->resize_rect_item);
@@ -4441,6 +4447,7 @@ e_day_view_reshape_day_events (EDayView *day_view,
continue;
if (strncmp (current_comp_string, day_view->last_edited_comp_string,50) == 0) {
e_canvas_item_grab_focus (event->canvas_item, TRUE);
+ g_free (day_view->last_edited_comp_string);
day_view-> last_edited_comp_string = NULL;
}
}
@@ -5831,6 +5838,12 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
e_cal_component_set_dtend (comp, &date);
e_cal_component_commit_sequence (comp);
+
+ if (day_view->last_edited_comp_string != NULL) {
+ g_free (day_view->last_edited_comp_string);
+ day_view->last_edited_comp_string = NULL;
+ }
+
day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
gnome_canvas_item_hide (day_view->resize_rect_item);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 644ec850c5..3844c1a041 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3228,6 +3228,12 @@ e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end
e_cal_component_set_dtend (comp, &date);
e_cal_component_commit_sequence (comp);
+
+ if (week_view->last_edited_comp_string != NULL) {
+ g_free (week_view->last_edited_comp_string);
+ week_view->last_edited_comp_string = NULL;
+ }
+
week_view->last_edited_comp_string = e_cal_component_get_as_string (comp);