[evolution] Bug #720542 - Crash on calendar view's tooltip timeout
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #720542 - Crash on calendar view's tooltip timeout
- Date: Fri, 7 Feb 2014 15:34:18 +0000 (UTC)
commit 0577613a23231732ea2f63b174e80517e5bfed55
Author: Milan Crha <mcrha redhat com>
Date: Fri Feb 7 16:33:12 2014 +0100
Bug #720542 - Crash on calendar view's tooltip timeout
calendar/gui/e-day-view.c | 10 ++++++++++
calendar/gui/e-week-view.c | 7 +++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 43824d2..7528e0f 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -2946,6 +2946,11 @@ e_day_view_remove_event_cb (EDayView *day_view,
day_view->popup_event_day = -1;
}
+ if (event->timeout > 0) {
+ g_source_remove (event->timeout);
+ event->timeout = -1;
+ }
+
if (event->canvas_item)
g_object_run_dispose (G_OBJECT (event->canvas_item));
@@ -5348,6 +5353,11 @@ e_day_view_free_event_array (EDayView *day_view,
if (is_comp_data_valid (event))
g_object_unref (event->comp_data);
+
+ if (event->timeout > 0) {
+ g_source_remove (event->timeout);
+ event->timeout = -1;
+ }
}
g_array_set_size (array, 0);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index b1ef139..0191c0c 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2946,6 +2946,7 @@ e_week_view_free_events (EWeekView *week_view)
EWeekViewEventSpan *span;
gint event_num, span_num, num_days, day;
gboolean did_editing = week_view->editing_event_num != -1;
+ guint timeout;
/* Reset all our indices. */
week_view->pressed_event_num = -1;
@@ -2992,6 +2993,12 @@ e_week_view_free_events (EWeekView *week_view)
if (did_editing)
g_object_notify (G_OBJECT (week_view), "is-editing");
+
+ timeout = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (week_view), "tooltip-timeout"));
+ if (timeout) {
+ g_source_remove (timeout);
+ g_object_set_data (G_OBJECT (week_view), "tooltip-timeout", NULL);
+ }
}
/* This adds one event to the view, adding it to the appropriate array. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]