From 880cf290462273744bd3da929d9f10964e618e2a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 2 Jul 2013 16:54:22 -0400 Subject: GalViewFactoryClass: Add a "gal_view_type" member. This is the GType of the GalView instances the factory creates. Having this information will allow GalViewFactoryClass to do more itself and be less reliant on subclasses. --- e-util/gal-view-factory-etable.c | 1 + e-util/gal-view-factory.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'e-util') diff --git a/e-util/gal-view-factory-etable.c b/e-util/gal-view-factory-etable.c index cc54468260..53f58e8c11 100644 --- a/e-util/gal-view-factory-etable.c +++ b/e-util/gal-view-factory-etable.c @@ -51,6 +51,7 @@ gal_view_factory_etable_class_init (GalViewFactoryEtableClass *class) GalViewFactoryClass *view_factory_class; view_factory_class = GAL_VIEW_FACTORY_CLASS (class); + view_factory_class->gal_view_type = GAL_TYPE_VIEW_ETABLE; view_factory_class->get_type_code = view_factory_etable_get_type_code; view_factory_class->new_view = view_factory_etable_new_view; } diff --git a/e-util/gal-view-factory.h b/e-util/gal-view-factory.h index 2a67dbe263..19f644e966 100644 --- a/e-util/gal-view-factory.h +++ b/e-util/gal-view-factory.h @@ -61,6 +61,8 @@ struct _GalViewFactory { struct _GalViewFactoryClass { GObjectClass parent_class; + GType gal_view_type; + /* Methods */ const gchar * (*get_type_code) (GalViewFactory *factory); GalView * (*new_view) (GalViewFactory *factory, -- cgit v1.2.3