[evolution] Bug 661399 - Crash when hovering over calendar entry
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 661399 - Crash when hovering over calendar entry
- Date: Tue, 11 Oct 2011 17:11:57 +0000 (UTC)
commit a59599ca0ea97ff01b14129930f7999e3574fb12
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Oct 11 13:11:30 2011 -0400
Bug 661399 - Crash when hovering over calendar entry
calendar/gui/e-calendar-view.c | 16 ++++++++++------
calendar/gui/e-calendar-view.h | 3 +--
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 84046e7..0da5afc 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 7ebcef7..8d54275 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]