From 1a6bb41b0df656a29274da049e5fff924859d76f Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 17 Jan 2001 22:15:52 +0000 Subject: Added a collection argument to this to set the GalViewCollection. 2001-01-17 Christopher James Lahey * gal-define-views-dialog.c, gal-define-views-dialog.h: Added a collection argument to this to set the GalViewCollection. Connected up the modify, delete, and copy buttons. Documented. * gal-define-views-model.c, gal-define-views-model.h: Added gal_define_views_model_get_view, gal_define_views_model_delete_view, and gal_define_views_model_copy_view methods. Documented. * gal-view-collection.c: Documented. * gal-view-etable.c, gal-view-etable.h: Documented. Implemented edit and clone methods of GalView. Initialized state to a non-NULL value. Added a name parameter to gal_view_etable_new. * gal-view-factory-etable.c: Documented. Added the name argument to gal_view_etable_new. * gal-view-factory.c: Fixed the g_return_val_if_fails to check for GalViewFactory as the type instead of GalView. * gal-view.c, gal-view.h: Added the clone method. svn path=/trunk/; revision=7599 --- widgets/menus/gal-view-collection.c | 42 ++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'widgets/menus/gal-view-collection.c') diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c index 5b625c44f4..30652f064f 100644 --- a/widgets/menus/gal-view-collection.c +++ b/widgets/menus/gal-view-collection.c @@ -83,6 +83,10 @@ gal_view_collection_init (GalViewCollection *collection) collection->factory_list = NULL; } +/** + * gal_view_collection_get_type: + * + */ guint gal_view_collection_get_type (void) { @@ -108,20 +112,44 @@ gal_view_collection_get_type (void) return type; } -GalViewCollection *gal_view_collection_new (void) +/** + * gal_view_collection_new: + * + * A collection of views and view factories. + */ +GalViewCollection * +gal_view_collection_new (void) { return gtk_type_new(gal_view_collection_get_type()); } -/* Set up the view collection */ -void gal_view_collection_set_storage_directories (GalViewCollection *collection, - char *system_dir, - char *local_dir) +/** + * gal_view_collection_set_storage_directories + * @collection: The view collection to initialize + * @system_dir: The location of the system built in views + * @local_dir: The location to store the users set up views + * + * Sets up the GalViewCollection. + */ +void +gal_view_collection_set_storage_directories (GalViewCollection *collection, + char *system_dir, + char *local_dir) { } -void gal_view_collection_add_factory (GalViewCollection *collection, - GalViewFactory *factory) +/** + * gal_view_collection_add_factory + * @collection: The view collection to add a factory to + * @factory: The factory to add + * + * 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) { gtk_object_ref(GTK_OBJECT(factory)); collection->factory_list = g_list_prepend(collection->factory_list, factory); -- cgit v1.2.3