aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2006-09-28 16:40:29 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-09-28 16:40:29 +0800
commit0fa1dbec3cbb6cc5b16a7dcbf94620eecbdf2e96 (patch)
tree0e4221097375e947895174c77fb5f7b14c7e34f8
parentf4c7aaa0f974c1080313ed6cf4f46f05eed63edc (diff)
downloadgsoc2013-evolution-0fa1dbec3cbb6cc5b16a7dcbf94620eecbdf2e96.tar.gz
gsoc2013-evolution-0fa1dbec3cbb6cc5b16a7dcbf94620eecbdf2e96.tar.zst
gsoc2013-evolution-0fa1dbec3cbb6cc5b16a7dcbf94620eecbdf2e96.zip
** Fix for bug #334692
2006-09-28 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #334692 * gui/e-week-view.c: (e_week_view_on_scroll), (tooltip_destroy), (tooltip_event_cb), (e_week_view_on_text_item_event): Remove the timers that are left out when using scroll. They seem to trigger crashes. svn path=/trunk/; revision=32816
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-week-view.c28
2 files changed, 29 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d0423c1eae..a44abc9440 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2006-09-28 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #334692
+
+ * gui/e-week-view.c: (e_week_view_on_scroll), (tooltip_destroy),
+ (tooltip_event_cb), (e_week_view_on_text_item_event): Remove the
+ timers that are left out when using scroll. They seem to trigger
+ crashes.
+
2006-09-21 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #354775
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 83c5821a71..f8fc86d1ad 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2126,7 +2126,14 @@ e_week_view_on_scroll (GtkWidget *widget,
GtkAdjustment *adj = GTK_RANGE (week_view->vscrollbar)->adjustment;
gfloat new_value;
GtkWidget *tool_window = g_object_get_data (G_OBJECT (week_view), "tooltip-window");
-
+ guint timeout;
+
+ timeout = GPOINTER_TO_UINT (g_object_get_data (week_view, "tooltip-timeout"));
+ if (timeout) {
+ g_source_remove (timeout);
+ g_object_set_data (G_OBJECT (week_view), "tooltip-timeout", NULL);
+ }
+
if (tool_window) {
gtk_widget_destroy (tool_window);
g_object_set_data (G_OBJECT (week_view), "tooltip-window", NULL);
@@ -2540,18 +2547,21 @@ tooltip_destroy (EWeekView *week_view, GnomeCanvasItem *item)
{
int event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num"));
EWeekViewEvent *pevent;
-
+ guint timeout;
+
+ timeout = GPOINTER_TO_UINT (g_object_get_data (week_view, "tooltip-timeout"));
+ if (timeout) {
+ g_source_remove (timeout);
+ g_object_set_data (G_OBJECT (week_view), "tooltip-timeout", NULL);
+ }
+
pevent = tooltip_get_view_event (week_view, -1, event_num);
if (pevent) {
if (pevent->tooltip && g_object_get_data (G_OBJECT (week_view), "tooltip-window")) {
gtk_widget_destroy (pevent->tooltip);
pevent->tooltip = NULL;
}
-
- if (pevent->timeout != -1) {
- g_source_remove (pevent->timeout);
- pevent->timeout = -1;
- }
+
g_object_set_data (G_OBJECT (week_view), "tooltip-window", NULL);
}
}
@@ -2582,6 +2592,7 @@ tooltip_event_cb (GnomeCanvasItem *item,
data->event_num = event_num;
data->get_view_event = tooltip_get_view_event;
pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
+ g_object_set_data ((GObject *)view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
return TRUE;
}
@@ -3154,7 +3165,8 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
data->event_num = nevent;
data->get_view_event = tooltip_get_view_event;
pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
-
+ g_object_set_data ((GObject *)week_view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
+
return TRUE;
}
case GDK_LEAVE_NOTIFY: