[gnome-calendar/calendar-management] e-source-local: register the type properly



commit ed77fb049d7c84d38d6d6f4d889a319a7bf35f57
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Feb 5 16:07:51 2015 -0200

    e-source-local: register the type properly
    
    Also, cleanup some unneeded methods

 src/e-source-local.c |   21 +++------------------
 src/e-source-local.h |    1 -
 2 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/src/e-source-local.c b/src/e-source-local.c
index 62c5736..060bfda 100644
--- a/src/e-source-local.c
+++ b/src/e-source-local.c
@@ -31,10 +31,9 @@ enum {
        PROP_CUSTOM_FILE
 };
 
-G_DEFINE_DYNAMIC_TYPE (
-       ESourceLocal,
-       e_source_local,
-       E_TYPE_SOURCE_EXTENSION)
+G_DEFINE_TYPE (ESourceLocal,
+                    e_source_local,
+                    E_TYPE_SOURCE_EXTENSION)
 
 static void
 source_local_set_property (GObject *object,
@@ -131,26 +130,12 @@ e_source_local_class_init (ESourceLocalClass *class)
 }
 
 static void
-e_source_local_class_finalize (ESourceLocalClass *class)
-{
-}
-
-static void
 e_source_local_init (ESourceLocal *extension)
 {
        extension->priv = E_SOURCE_LOCAL_GET_PRIVATE (extension);
        g_mutex_init (&extension->priv->property_lock);
 }
 
-void
-e_source_local_type_register (GTypeModule *type_module)
-{
-       /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
-        *     function, so we have to wrap it with a public function in
-        *     order to register types from a separate compilation unit. */
-       e_source_local_register_type (type_module);
-}
-
 GFile *
 e_source_local_get_custom_file (ESourceLocal *extension)
 {
diff --git a/src/e-source-local.h b/src/e-source-local.h
index e91b894..9321ed7 100644
--- a/src/e-source-local.h
+++ b/src/e-source-local.h
@@ -57,7 +57,6 @@ struct _ESourceLocalClass {
 };
 
 GType          e_source_local_get_type         (void);
-void           e_source_local_type_register    (GTypeModule *type_module);
 GFile *                e_source_local_get_custom_file  (ESourceLocal *extension);
 GFile *                e_source_local_dup_custom_file  (ESourceLocal *extension);
 void           e_source_local_set_custom_file  (ESourceLocal *extension,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]