[evolution] GnomeCalendar: Sink the floating ECalendarView references.



commit c5a2dda49b902626ecda9aa1edb6049d7fcf421b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Sep 11 09:00:54 2010 -0400

    GnomeCalendar: Sink the floating ECalendarView references.
    
    GnomeCalendar should sink the initially-floating ECalendarView
    references since it keeps them in an internal array and unreferences
    them in its dispose() method.

 calendar/gui/gnome-cal.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index e054422..1195e04 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -427,6 +427,7 @@ gnome_calendar_constructed (GObject *object)
 	calendar_view = e_day_view_new (model);
 	e_calendar_view_set_calendar (calendar_view, gcal);
 	gcal->priv->views[GNOME_CAL_DAY_VIEW] = calendar_view;
+	g_object_ref_sink (calendar_view);
 
 	g_signal_connect_swapped (
 		calendar_view, "selection-changed",
@@ -438,6 +439,7 @@ gnome_calendar_constructed (GObject *object)
 	e_day_view_set_days_shown (E_DAY_VIEW (calendar_view), 5);
 	e_calendar_view_set_calendar (calendar_view, gcal);
 	gcal->priv->views[GNOME_CAL_WORK_WEEK_VIEW] = calendar_view;
+	g_object_ref_sink (calendar_view);
 
 	g_signal_connect_swapped (
 		calendar_view, "notify::working-days",
@@ -447,6 +449,7 @@ gnome_calendar_constructed (GObject *object)
 	calendar_view = e_week_view_new (model);
 	e_calendar_view_set_calendar (calendar_view, gcal);
 	gcal->priv->views[GNOME_CAL_WEEK_VIEW] = calendar_view;
+	g_object_ref_sink (calendar_view);
 
 	g_signal_connect_swapped (
 		calendar_view, "selection-changed",
@@ -464,6 +467,7 @@ gnome_calendar_constructed (GObject *object)
 	e_week_view_set_weeks_shown (E_WEEK_VIEW (calendar_view), 6);
 	e_calendar_view_set_calendar (calendar_view, gcal);
 	gcal->priv->views[GNOME_CAL_MONTH_VIEW] = calendar_view;
+	g_object_ref_sink (calendar_view);
 
 	g_signal_connect_swapped (
 		calendar_view, "selection-changed",
@@ -479,6 +483,7 @@ gnome_calendar_constructed (GObject *object)
 	calendar_view = e_cal_list_view_new (model);
 	e_calendar_view_set_calendar (calendar_view, gcal);
 	gcal->priv->views[GNOME_CAL_LIST_VIEW] = calendar_view;
+	g_object_ref_sink (calendar_view);
 
 	g_signal_connect_swapped (
 		calendar_view, "selection-changed",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]