diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-07-06 00:34:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-07-06 04:40:50 +0800 |
commit | 7bb795b299758e6a81536b81c19693f353106105 (patch) | |
tree | 35937e1022645939bf0f3635848b7f86e03fb19b /e-util/gal-view-collection.c | |
parent | d629e6850a64b826fad60857a6b6945149ca8214 (diff) | |
download | gsoc2013-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/gal-view-collection.c')
-rw-r--r-- | e-util/gal-view-collection.c | 31 |
1 files changed, 0 insertions, 31 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) |