From 7bb795b299758e6a81536b81c19693f353106105 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 5 Jul 2013 12:34:19 -0400 Subject: Remove gal_view_collection_add_factory(). No longer needed. Instead, use g_type_ensure() to ensure the necessary GalView subclasses are registered in the GType system before loading a GalViewCollection. Best place to ensure types is from GClassInitFunc. --- modules/calendar/e-cal-shell-view.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/calendar/e-cal-shell-view.c') diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index bacf4f4ec2..5350265cae 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -25,6 +25,8 @@ #include "e-cal-shell-view-private.h" +#include "calendar/gui/calendar-view.h" + static gpointer parent_class; static GType cal_shell_view_type; @@ -595,6 +597,13 @@ cal_shell_view_class_init (ECalShellViewClass *class, shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new; shell_view_class->execute_search = cal_shell_view_execute_search; shell_view_class->update_actions = cal_shell_view_update_actions; + + /* Ensure the GalView types we need are registered. */ + g_type_ensure (GAL_TYPE_VIEW_CALENDAR_DAY); + g_type_ensure (GAL_TYPE_VIEW_CALENDAR_WORK_WEEK); + g_type_ensure (GAL_TYPE_VIEW_CALENDAR_WEEK); + g_type_ensure (GAL_TYPE_VIEW_CALENDAR_MONTH); + g_type_ensure (GAL_TYPE_VIEW_ETABLE); } static void -- cgit v1.2.3