aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/cal-client/cal-client.c32
2 files changed, 15 insertions, 25 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 03f68a97ee..975ee70498 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2001-10-28 Rodrigo Moya <rodrigo@ximian.com>
+
+ * cal-client/cal-client.c (destroy_wombat_client): removed this
+ function, as we don't need to unref at all the WombatClient
+ object, since it is aggregated to the CalListener object, which
+ will take care of unrefing it (Fixes Ximian #12001)
+ (cal_client_open_calendar): create the WombatClient here
+
2001-10-28 Damon Chaplin <damon@ximian.com>
* gui/print.c (print_todo_details): get the tasks directly from the
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 5e51540e28..f3035ae4b8 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -218,31 +218,8 @@ cal_client_init (CalClient *client)
priv->uri = NULL;
priv->factories = NULL;
priv->timezones = g_hash_table_new (g_str_hash, g_str_equal);
+ priv->w_client = NULL;
priv->default_zone = icaltimezone_get_utc_timezone ();
-
- /* create the WombatClient */
- priv->w_client = wombat_client_new (
- (WombatClientGetPasswordFn) client_get_password_cb,
- (WombatClientForgetPasswordFn) client_forget_password_cb,
- (gpointer) client);
-}
-
-/* Gets rid of the WombatClient that a client knows about */
-static void
-destroy_wombat_client (CalClient *client)
-{
- CalClientPrivate *priv;
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- priv = client->priv;
-
- if (!priv->w_client)
- return;
-
- bonobo_object_unref (BONOBO_OBJECT (priv->w_client));
- priv->w_client = NULL;
}
/* Gets rid of the factories that a client knows about */
@@ -352,7 +329,7 @@ cal_client_destroy (GtkObject *object)
priv->listener = NULL;
}
- destroy_wombat_client (client);
+ priv->w_client = NULL;
destroy_factories (client);
destroy_cal (client);
@@ -745,6 +722,11 @@ cal_client_open_calendar (CalClient *client, const char *str_uri, gboolean only_
return FALSE;
}
+ /* create the WombatClient */
+ priv->w_client = wombat_client_new (
+ (WombatClientGetPasswordFn) client_get_password_cb,
+ (WombatClientForgetPasswordFn) client_forget_password_cb,
+ (gpointer) client);
bonobo_object_add_interface (BONOBO_OBJECT (priv->listener),
BONOBO_OBJECT (priv->w_client));