aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-02-07 23:33:12 +0800
committerMilan Crha <mcrha@redhat.com>2014-02-07 23:33:12 +0800
commit0577613a23231732ea2f63b174e80517e5bfed55 (patch)
treedba835f648d3fba87c96852893adcb55ca752cf4
parentf4e7a0a5e6b4da9b276125f026daae8e60c0dcc1 (diff)
downloadgsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.tar
gsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.tar.gz
gsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.tar.bz2
gsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.tar.lz
gsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.tar.xz
gsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.tar.zst
gsoc2013-evolution-0577613a23231732ea2f63b174e80517e5bfed55.zip
Bug #720542 - Crash on calendar view's tooltip timeout
-rw-r--r--calendar/gui/e-day-view.c10
-rw-r--r--calendar/gui/e-week-view.c7
2 files changed, 17 insertions, 0 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 43824d2dbd..7528e0f163 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 b1ef139518..0191c0ce24 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. */