aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-signature.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-signature.c
parentf1d2541c487fbf7433a1b9aad8e8982ef08b85f5 (diff)
downloadgsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.gz
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-signature.c')
-rw-r--r--e-util/e-signature.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/e-util/e-signature.c b/e-util/e-signature.c
index 6b9c1abdbe..1ac5616eef 100644
--- a/e-util/e-signature.c
+++ b/e-util/e-signature.c
@@ -60,7 +60,10 @@ enum {
PROP_UID
};
-static gpointer parent_class;
+G_DEFINE_TYPE (
+ ESignature,
+ e_signature,
+ G_TYPE_OBJECT)
static gboolean
xml_set_bool (xmlNodePtr node,
@@ -235,7 +238,7 @@ signature_finalize (GObject *object)
g_free (priv->uid);
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (e_signature_parent_class)->finalize (object);
}
static void
@@ -243,7 +246,6 @@ e_signature_class_init (ESignatureClass *class)
{
GObjectClass *object_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (ESignaturePrivate));
object_class = G_OBJECT_CLASS (class);
@@ -324,32 +326,6 @@ e_signature_init (ESignature *signature)
signature->priv = E_SIGNATURE_GET_PRIVATE (signature);
}
-GType
-e_signature_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- GTypeInfo type_info = {
- sizeof (ESignatureClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) e_signature_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ESignature),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_signature_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- G_TYPE_OBJECT, "ESignature", &type_info, 0);
- }
-
- return type;
-}
-
/**
* e_signature_new:
*