aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-extensible.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-08-24 23:21:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-08-25 02:37:02 +0800
commitecf3434da05b1f39f793c24b38bfd278e10b5786 (patch)
tree485ed2399920ecb10dbee2b4db4c437c22574a20 /e-util/e-extensible.c
parentf1d2541c487fbf7433a1b9aad8e8982ef08b85f5 (diff)
downloadgsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.gz
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.bz2
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.lz
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.xz
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.zst
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.zip
GObject boilerplate cleanup.
Prefer thread-safe G_DEFINE_TYPE and G_DEFINE_INTERFACE macros over manual GType registration. This is just a start... lots more to do.
Diffstat (limited to 'e-util/e-extensible.c')
-rw-r--r--e-util/e-extensible.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/e-util/e-extensible.c b/e-util/e-extensible.c
index b718fc59bf..909003f580 100644
--- a/e-util/e-extensible.c
+++ b/e-util/e-extensible.c
@@ -66,6 +66,11 @@
static GQuark extensible_quark;
+G_DEFINE_INTERFACE (
+ EExtensible,
+ e_extensible,
+ G_TYPE_OBJECT)
+
static GPtrArray *
extensible_get_extensions (EExtensible *extensible)
{
@@ -99,39 +104,11 @@ exit:
}
static void
-extensible_interface_init (EExtensibleInterface *interface)
+e_extensible_default_init (EExtensibleInterface *interface)
{
extensible_quark = g_quark_from_static_string ("e-extensible-quark");
}
-GType
-e_extensible_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EExtensibleInterface),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) extensible_interface_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- 0, /* instance_size */
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- G_TYPE_INTERFACE, "EExtensible", &type_info, 0);
-
- g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
- }
-
- return type;
-}
-
/**
* e_extensible_load_extensions:
* @extensible: an #EExtensible