aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-10-12 01:11:30 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-10-12 01:11:30 +0800
commita59599ca0ea97ff01b14129930f7999e3574fb12 (patch)
treea34df8cde1ebda123d966594cc9d06b6e70b6797
parent6d2863d35a413fd8e1164b852597ecee44701dca (diff)
downloadgsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.tar
gsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.tar.gz
gsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.tar.bz2
gsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.tar.lz
gsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.tar.xz
gsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.tar.zst
gsoc2013-evolution-a59599ca0ea97ff01b14129930f7999e3574fb12.zip
Bug 661399 - Crash when hovering over calendar entry
-rw-r--r--calendar/gui/e-calendar-view.c16
-rw-r--r--calendar/gui/e-calendar-view.h3
2 files changed, 11 insertions, 8 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 84046e7aac..0da5afc618 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1826,8 +1826,7 @@ e_calendar_view_move_tip (GtkWidget *widget,
*/
gboolean
-e_calendar_view_get_tooltips (ECalendarView *cal_view,
- const ECalendarViewEventData *data)
+e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
{
GtkWidget *label, *box, *hbox, *ebox, *frame;
const gchar *str;
@@ -1838,7 +1837,7 @@ e_calendar_view_get_tooltips (ECalendarView *cal_view,
time_t t_start, t_end;
ECalendarViewEvent *pevent;
GtkStyle *style = gtk_widget_get_default_style ();
- GtkWidget *widget = (GtkWidget *) g_object_get_data (G_OBJECT (data->cal_view), "tooltip-window");
+ GtkWidget *widget;
GdkWindow *window;
ECalComponent *newcomp = e_cal_component_new ();
icaltimezone *zone, *default_zone;
@@ -1846,12 +1845,17 @@ e_calendar_view_get_tooltips (ECalendarView *cal_view,
ECalClient *client = NULL;
gboolean free_text = FALSE;
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
+ /* This function is a timeout callback. */
- model = e_calendar_view_get_model (cal_view);
+ g_return_val_if_fail (data != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (data->cal_view), FALSE);
+
+ model = e_calendar_view_get_model (data->cal_view);
/* Delete any stray tooltip if left */
- if (widget)
+ widget = g_object_get_data (
+ G_OBJECT (data->cal_view), "tooltip-window");
+ if (GTK_IS_WIDGET (widget))
gtk_widget_destroy (widget);
default_zone = e_calendar_view_get_timezone (data->cal_view);
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index 7ebcef7d1c..8d54275d1d 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -248,8 +248,7 @@ void e_calendar_view_modify_and_send (ECalendarView *cal_view,
GtkWindow *toplevel,
gboolean new);
-gboolean e_calendar_view_get_tooltips (ECalendarView *cal_view,
- const ECalendarViewEventData *data);
+gboolean e_calendar_view_get_tooltips (const ECalendarViewEventData *data);
void e_calendar_view_move_tip (GtkWidget *widget,
gint x,