aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
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 /e-util
parentd629e6850a64b826fad60857a6b6945149ca8214 (diff)
downloadgsoc2013-evolution-7bb795b299758e6a81536b81c19693f353106105.tar.gz
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 'e-util')
-rw-r--r--e-util/gal-view-collection.c31
-rw-r--r--e-util/gal-view-collection.h4
2 files changed, 1 insertions, 34 deletions
diff --git a/e-util/gal-view-collection.c b/e-util/gal-view-collection.c
index 617eaad2ad..badd81bf9f 100644
--- a/e-util/gal-view-collection.c
+++ b/e-util/gal-view-collection.c
@@ -38,8 +38,6 @@ struct _GalViewCollectionPrivate {
GalViewCollectionItem **view_data;
gint view_count;
- GList *factory_list;
-
GalViewCollectionItem **removed_view_data;
gint removed_view_count;
@@ -185,12 +183,6 @@ gal_view_collection_dispose (GObject *object)
priv->view_data = NULL;
priv->view_count = 0;
- g_list_foreach (
- priv->factory_list,
- (GFunc) g_object_unref, NULL);
- g_list_free (priv->factory_list);
- priv->factory_list = NULL;
-
for (ii = 0; ii < priv->removed_view_count; ii++)
gal_view_collection_item_free (priv->removed_view_data[ii]);
g_free (priv->removed_view_data);
@@ -338,29 +330,6 @@ gal_view_collection_set_storage_directories (GalViewCollection *collection,
g_object_notify (G_OBJECT (collection), "user-directory");
}
-/**
- * gal_view_collection_add_factory
- * @collection: The view collection to add a factory to
- * @factory: The factory to add. The @collection will add a reference
- * to the factory object, so you should unref it after calling this
- * function if you no longer need it.
- *
- * Adds the given factory to this collection. This list is used both
- * when loading views from their xml description as well as when the
- * user tries to create a new view.
- */
-void
-gal_view_collection_add_factory (GalViewCollection *collection,
- GalViewFactory *factory)
-{
- g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection));
- g_return_if_fail (GAL_IS_VIEW_FACTORY (factory));
-
- collection->priv->factory_list = g_list_prepend (
- collection->priv->factory_list,
- g_object_ref (factory));
-}
-
static void
view_changed (GalView *view,
GalViewCollectionItem *item)
diff --git a/e-util/gal-view-collection.h b/e-util/gal-view-collection.h
index 5cc355410e..700262e6ce 100644
--- a/e-util/gal-view-collection.h
+++ b/e-util/gal-view-collection.h
@@ -23,7 +23,7 @@
#ifndef GAL_VIEW_COLLECTION_H
#define GAL_VIEW_COLLECTION_H
-#include <e-util/gal-view-factory.h>
+#include <e-util/gal-view.h>
/* Standard GObject macros */
#define GAL_TYPE_VIEW_COLLECTION \
@@ -91,8 +91,6 @@ void gal_view_collection_set_storage_directories
(GalViewCollection *collection,
const gchar *system_dir,
const gchar *local_dir);
-void gal_view_collection_add_factory (GalViewCollection *collection,
- GalViewFactory *factory);
/* Query the view collection. */
gint gal_view_collection_get_count (GalViewCollection *collection);