diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2001-01-24 12:22:08 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-01-24 12:22:08 +0800 |
commit | 6b3050b79ef1c987e854786bfef7cee614fee2a4 (patch) | |
tree | 9321d273e30db633d4d872e5c89ba02db32688bc /widgets/menus/gal-view-collection.c | |
parent | d6599e25f2dfeccbc29e35cf8fbab3cd8c626839 (diff) | |
download | gsoc2013-evolution-6b3050b79ef1c987e854786bfef7cee614fee2a4.tar.gz gsoc2013-evolution-6b3050b79ef1c987e854786bfef7cee614fee2a4.tar.zst gsoc2013-evolution-6b3050b79ef1c987e854786bfef7cee614fee2a4.zip |
Made GalViewCollectionItem a public type. (load_single_file): Made it so
2001-01-23 Christopher James Lahey <clahey@helixcode.com>
* gal-view-collection.c, gal-view-collection.h: Made
GalViewCollectionItem a public type.
(load_single_file): Made it so that the filename does not get
saved with the directory structure.
(gal_view_collection_get_view_item): Added this function to return
a certain GalViewCollectionItem.
svn path=/trunk/; revision=7773
Diffstat (limited to 'widgets/menus/gal-view-collection.c')
-rw-r--r-- | widgets/menus/gal-view-collection.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c index 03882ed484..db314f4d5f 100644 --- a/widgets/menus/gal-view-collection.c +++ b/widgets/menus/gal-view-collection.c @@ -19,17 +19,6 @@ #define PARENT_TYPE gtk_object_get_type () -struct _GalViewCollectionItem { - GalView *view; - char *id; - gboolean changed; - gboolean ever_changed; - gboolean built_in; - char *filename; - char *title; - char *type; -}; - static GtkObjectClass *gal_view_collection_parent_class; enum { @@ -226,13 +215,8 @@ load_single_file (GalViewCollection *collection, item->type = e_xml_get_string_prop_by_name(node, "type"); if (item->filename) { GalViewFactory *factory; - char *temp; GList *factories; - temp = g_concat_dir_and_file(dir, item->filename); - g_free(item->filename); - item->filename = temp; - factory = NULL; for (factories = collection->factory_list; factories; factories = factories->next) { if (!strcmp(gal_view_factory_get_type_code(factories->data), item->type)) { @@ -241,12 +225,17 @@ load_single_file (GalViewCollection *collection, } } if (factory) { - item->view = gal_view_factory_new_view (factory, item->filename); - gal_view_load(item->view, item->filename); + char *filename; + + filename = g_concat_dir_and_file(dir, item->filename); + item->view = gal_view_factory_new_view (factory, item->title); + gal_view_load(item->view, filename); gal_view_set_title (item->view, item->title); gtk_signal_connect(GTK_OBJECT(item->view), "changed", GTK_SIGNAL_FUNC(view_changed), item); + g_free(filename); } + } return item; } |