diff options
author | JP Rosevear <jpr@novell.com> | 2004-12-21 23:42:46 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-12-21 23:42:46 +0800 |
commit | a0da580e7e2355b6f6e084cbd968dd6176156082 (patch) | |
tree | d902eddfe5429b7d8dc2e0fa1055f136f880561f /shell/e-component-registry.c | |
parent | 8cb1b7cf11da0d32a087f3f580fb76f0eb2aa212 (diff) | |
download | gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.tar.gz gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.tar.zst gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.zip |
Convert to G_DEFINE_TYPE
2004-12-21 JP Rosevear <jpr@novell.com>
* e-corba-config-page.c: Convert to G_DEFINE_TYPE
* e-history.c: ditto
* e-shell-folder-title-bar.c: ditto
* e-shell-offline-handler.c: ditto
* e-shell-settings-dialog.c: ditto
* e-shell-window.c: ditto
* e-sidebar.c: ditto
* e-user-creatable-items-handler.c: ditto
* e-component-registry.c: ditto
* importer/evolution-importer-client.c: ditto
svn path=/trunk/; revision=28164
Diffstat (limited to 'shell/e-component-registry.c')
-rw-r--r-- | shell/e-component-registry.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index d83c0ae572..a314118305 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -30,7 +30,6 @@ #include <e-util/e-icon-factory.h> #include <libgnome/gnome-i18n.h> -#include <gal/util/e-util.h> #include <bonobo/bonobo-object.h> #include <bonobo/bonobo-exception.h> @@ -38,17 +37,13 @@ #include <string.h> #include <stdlib.h> - -#define PARENT_TYPE G_TYPE_OBJECT -static GObjectClass *parent_class = NULL; - - struct _EComponentRegistryPrivate { GSList *infos; int init:1; }; +G_DEFINE_TYPE (EComponentRegistry, e_component_registry, G_TYPE_OBJECT) /* EComponentInfo handling. */ @@ -261,24 +256,22 @@ impl_finalize (GObject *object) g_slist_foreach (priv->infos, (GFunc) component_info_free, NULL); g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* G_OBJECT_CLASS (e_component_registry_parent_class)->finalize) (object); } static void -class_init (EComponentRegistryClass *klass) +e_component_registry_class_init (EComponentRegistryClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (klass); object_class->finalize = impl_finalize; - - parent_class = g_type_class_ref(PARENT_TYPE); } static void -init (EComponentRegistry *registry) +e_component_registry_init (EComponentRegistry *registry) { registry->priv = g_new0 (EComponentRegistryPrivate, 1); } @@ -354,7 +347,3 @@ e_component_registry_activate (EComponentRegistry *registry, /* it isn't in the registry unless it is already activated */ return bonobo_object_dup_ref (info->iface, NULL); } - - -E_MAKE_TYPE (e_component_registry, "EComponentRegistry", EComponentRegistry, - class_init, init, PARENT_TYPE) |