[evolution/gnome-3-10] Bug #720542 - Crash on calendar view's tooltip timeout
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-10] Bug #720542 - Crash on calendar view's tooltip timeout
- Date: Fri, 7 Feb 2014 15:34:51 +0000 (UTC)
commit 7d09b51f75f47f8b74d61ae8ed3cca1fa622af46
Author: Milan Crha <mcrha redhat com>
Date: Fri Feb 7 16:34:59 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 65f3855..4488b56 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -2944,6 +2944,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));
@@ -5339,6 +5344,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 0a0e0cf..1bb1368 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2961,6 +2961,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;
@@ -3007,6 +3008,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]