diff options
Diffstat (limited to 'addressbook/gui/widgets/gal-view-factory-minicard.c')
-rw-r--r-- | addressbook/gui/widgets/gal-view-factory-minicard.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/addressbook/gui/widgets/gal-view-factory-minicard.c b/addressbook/gui/widgets/gal-view-factory-minicard.c index 7e6767ce20..e6cac225ce 100644 --- a/addressbook/gui/widgets/gal-view-factory-minicard.c +++ b/addressbook/gui/widgets/gal-view-factory-minicard.c @@ -75,7 +75,7 @@ gal_view_factory_minicard_init (GalViewFactoryMinicard *factory) GalViewFactory * gal_view_factory_minicard_new (void) { - return gal_view_factory_minicard_construct (gtk_type_new (gal_view_factory_minicard_get_type ())); + return gal_view_factory_minicard_construct (g_object_new (GAL_TYPE_VIEW_FACTORY_MINICARD, NULL)); } /** @@ -93,26 +93,25 @@ gal_view_factory_minicard_construct (GalViewFactoryMinicard *factory) return GAL_VIEW_FACTORY(factory); } -GtkType +GType gal_view_factory_minicard_get_type (void) { - static guint type = 0; - - if (!type) - { - GtkTypeInfo info = - { - "GalViewFactoryMinicard", - sizeof (GalViewFactoryMinicard), + static GType type = 0; + + if (!type) { + static const GTypeInfo info = { sizeof (GalViewFactoryMinicardClass), - (GtkClassInitFunc) gal_view_factory_minicard_class_init, - (GtkObjectInitFunc) gal_view_factory_minicard_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gal_view_factory_minicard_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GalViewFactoryMinicard), + 0, /* n_preallocs */ + (GInstanceInitFunc) gal_view_factory_minicard_init, }; - - type = gtk_type_unique (PARENT_TYPE, &info); + + type = g_type_register_static (PARENT_TYPE, "GalViewFactoryMinicard", &info, 0); } return type; |