From dea4c72b4e46801849bd721f058ec7cdcb121885 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 24 Jan 2001 07:31:40 +0000 Subject: Actually implement this function. 2001-01-24 Christopher James Lahey * gal-view-collection.c (gal_view_collection_get_view_item): Actually implement this function. svn path=/trunk/; revision=7774 --- widgets/menus/gal-view-collection.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 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 db314f4d5f..fb5192f0c7 100644 --- a/widgets/menus/gal-view-collection.c +++ b/widgets/menus/gal-view-collection.c @@ -373,8 +373,6 @@ gal_view_collection_get_count (GalViewCollection *collection) * @collection: The view collection to query * @n: The view to get. * - * Calculates the number of views in the given collection. - * * Returns: The nth view in the collection */ GalView * @@ -387,6 +385,23 @@ gal_view_collection_get_view (GalViewCollection *collection, return collection->view_data[n]->view; } +/** + * gal_view_collection_get_view_item + * @collection: The view collection to query + * @n: The view item to get. + * + * Returns: The nth view item in the collection + */ +GalViewCollectionItem * +gal_view_collection_get_view_item (GalViewCollection *collection, + int n) +{ + g_return_val_if_fail(n < collection->view_count, NULL); + g_return_val_if_fail(n >= 0, NULL); + + return collection->view_data[n]; +} + static char * gal_view_generate_string (GalViewCollection *collection, GalView *view, -- cgit