aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-03 20:12:04 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-03 20:12:04 +0800
commiteca5223b875706bd304aba1632bd303cf242e2ed (patch)
tree4b9ac85d32e2cb02a03fc7b77c03a01b1f7562f4 /calendar
parent5c7182a0a85b54920f333a9a035af1d293ab2247 (diff)
downloadgsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.tar
gsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.tar.gz
gsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.tar.bz2
gsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.tar.lz
gsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.tar.xz
gsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.tar.zst
gsoc2013-evolution-eca5223b875706bd304aba1632bd303cf242e2ed.zip
Bug 628654 - e_calendar_view_get_tooltips memory leak
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-calendar-view.c4
-rw-r--r--calendar/gui/e-calendar-view.h2
-rw-r--r--calendar/gui/e-day-view.c5
-rw-r--r--calendar/gui/e-week-view.c10
4 files changed, 14 insertions, 7 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 57a96d8990..2bc7eef003 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1792,7 +1792,7 @@ e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECal *client)
*/
gboolean
-e_calendar_view_get_tooltips (ECalendarViewEventData *data)
+e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
{
GtkWidget *label, *box, *hbox, *ebox, *frame;
const gchar *str;
@@ -1833,7 +1833,6 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
if (!(str && *str)) {
g_object_unref (newcomp);
gtk_widget_destroy (box);
- g_free (data);
return FALSE;
}
@@ -1974,7 +1973,6 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
g_object_set_data (G_OBJECT (data->cal_view), "tooltip-window", pevent->tooltip);
g_object_unref (newcomp);
- g_free (data);
return FALSE;
}
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index 6f68e6376b..1ba1727eba 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -232,7 +232,7 @@ void e_calendar_utils_show_error_silent
void e_calendar_utils_show_info_silent
(GtkWidget *widget);
-gboolean e_calendar_view_get_tooltips (ECalendarViewEventData *data);
+gboolean e_calendar_view_get_tooltips (const ECalendarViewEventData *data);
void e_calendar_view_move_tip (GtkWidget *widget,
gint x,
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 95bd14b74a..d203bd97d7 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -6414,7 +6414,10 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
data->day = day;
data->event_num = event_num;
data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event;
- pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
+ pevent->timeout = g_timeout_add_full (
+ G_PRIORITY_DEFAULT, 500,
+ (GSourceFunc)e_calendar_view_get_tooltips,
+ data, (GDestroyNotify) g_free);
return TRUE;
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index c842e30377..91abad1b50 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3014,7 +3014,10 @@ tooltip_event_cb (GnomeCanvasItem *item,
data->day = -1;
data->event_num = event_num;
data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event;
- pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
+ pevent->timeout = g_timeout_add_full (
+ G_PRIORITY_DEFAULT, 500,
+ (GSourceFunc)e_calendar_view_get_tooltips,
+ data, (GDestroyNotify) g_free);
g_object_set_data ((GObject *)view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
return TRUE;
@@ -3642,7 +3645,10 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
data->day = -1;
data->event_num = nevent;
data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event;
- pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
+ pevent->timeout = g_timeout_add_full (
+ G_PRIORITY_DEFAULT, 500,
+ (GSourceFunc)e_calendar_view_get_tooltips,
+ data, (GDestroyNotify) g_free);
g_object_set_data ((GObject *)week_view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
return TRUE;