[gnome-calendar] manager: overwrite constructed vfunc is not needed
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: overwrite constructed vfunc is not needed
- Date: Thu, 4 Dec 2014 22:35:45 +0000 (UTC)
commit e175ca2f66b10c56337f04445fce8aab9dea6284
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Wed Oct 15 10:52:42 2014 -0400
manager: overwrite constructed vfunc is not needed
Since GcalManager does not have any properties or use in way GObject's
initialization system there's no need of having initialization code
split between vfunc _init and vfunc _contructed.
src/gcal-manager.c | 67 ++++------------------------------------------------
1 files changed, 5 insertions(+), 62 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index 2665f5a..840c75d 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -514,55 +514,9 @@ remove_source (GcalManager *manager,
static void
gcal_manager_class_init (GcalManagerClass *klass)
{
- G_OBJECT_CLASS (klass)->constructed = gcal_manager_constructed;
G_OBJECT_CLASS (klass)->finalize = gcal_manager_finalize;
- /**
- * GcalManager::objects-added:
- *
- * The list passed to the signalis composed of #GcalEventData
- * structures keeping a volatile pointer to the source of the event
- * and an owned copy of an #EcalComponent
- *
- * @manager: the #GcalManager instance which emitted the signal
- * @objects: (type GSList) (transfer none) (element-type long):
- */
- signals[EVENTS_ADDED] =
- g_signal_new ("events-added",
- GCAL_TYPE_MANAGER,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GcalManagerClass,
- events_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE,
- 1,
- G_TYPE_POINTER);
-
- signals[EVENTS_MODIFIED] =
- g_signal_new ("events-modified",
- GCAL_TYPE_MANAGER,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GcalManagerClass,
- events_modified),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE,
- 1,
- G_TYPE_POINTER);
-
- signals[EVENTS_REMOVED] =
- g_signal_new ("events-removed",
- GCAL_TYPE_MANAGER,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GcalManagerClass,
- events_removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE,
- 1,
- G_TYPE_POINTER);
-
+ /* FIXME: check if this is really needed */
signals[EVENT_CREATED] =
g_signal_new ("event-created",
GCAL_TYPE_MANAGER,
@@ -581,6 +535,10 @@ gcal_manager_init (GcalManager *self)
{
GcalManagerPrivate *priv;
+ GError *error;
+ GList *sources;
+ GList *l;
+
priv = gcal_manager_get_instance_private (self);
priv->system_timezone = e_cal_util_get_system_timezone ();
@@ -599,21 +557,6 @@ gcal_manager_init (GcalManager *self)
(GEqualFunc) e_source_equal,
NULL,
free_manager_unit_data);
-}
-
-static void
-gcal_manager_constructed (GObject *object)
-{
- GcalManagerPrivate *priv;
-
- GError *error;
- GList *sources;
- GList *l;
-
- if (G_OBJECT_CLASS (gcal_manager_parent_class)->constructed != NULL)
- G_OBJECT_CLASS (gcal_manager_parent_class)->constructed (object);
-
- priv = gcal_manager_get_instance_private (GCAL_MANAGER (object));
error = NULL;
priv->source_registry = e_source_registry_new_sync (NULL, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]