aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-06 00:34:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-06 04:40:50 +0800
commit7bb795b299758e6a81536b81c19693f353106105 (patch)
tree35937e1022645939bf0f3635848b7f86e03fb19b /modules/calendar/e-cal-shell-view-private.c
parentd629e6850a64b826fad60857a6b6945149ca8214 (diff)
downloadgsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar
gsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar.gz
gsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar.bz2
gsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar.lz
gsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar.xz
gsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar.zst
gsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.zip
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.
Diffstat (limited to 'modules/calendar/e-cal-shell-view-private.c')
-rw-r--r--modules/calendar/e-cal-shell-view-private.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index b4ed297ea0..f559241138 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -27,8 +27,6 @@
#include "e-cal-shell-view-private.h"
-#include "calendar/gui/calendar-view-factory.h"
-
#define CHECK_NB 5
/* be compatible with older e-d-s for MeeGo */
@@ -412,37 +410,6 @@ cal_shell_view_backend_error_cb (EClientCache *client_cache,
}
static void
-cal_shell_view_load_view_collection (EShellViewClass *shell_view_class)
-{
- GalViewCollection *collection;
- GalViewFactory *factory;
-
- collection = shell_view_class->view_collection;
-
- factory = g_object_new (GAL_TYPE_VIEW_FACTORY_CALENDAR_DAY, NULL);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- factory = g_object_new (GAL_TYPE_VIEW_FACTORY_CALENDAR_WORK_WEEK, NULL);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- factory = g_object_new (GAL_TYPE_VIEW_FACTORY_CALENDAR_WEEK, NULL);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- factory = g_object_new (GAL_TYPE_VIEW_FACTORY_CALENDAR_MONTH, NULL);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- factory = gal_view_factory_etable_new ();
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- gal_view_collection_load (collection);
-}
-
-static void
cal_shell_view_notify_view_id_cb (EShellView *shell_view)
{
GalViewInstance *view_instance;
@@ -467,7 +434,7 @@ e_cal_shell_view_private_init (ECalShellView *cal_shell_view,
EShellViewClass *shell_view_class)
{
if (!gal_view_collection_loaded (shell_view_class->view_collection))
- cal_shell_view_load_view_collection (shell_view_class);
+ gal_view_collection_load (shell_view_class->view_collection);
g_signal_connect (
cal_shell_view, "notify::view-id",