diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2001-10-29 08:15:09 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2001-10-29 08:15:09 +0800 |
commit | a023b22c3f2f126e5c96c1c407ed2d8a0cb55cac (patch) | |
tree | 17216522bcfd6be2eb1be8b8e2bf0c5739b16fe2 /calendar/cal-client/cal-client.c | |
parent | cda2634eb0dfac52d4f08139d98121a4f4ef4a8b (diff) | |
download | gsoc2013-evolution-a023b22c3f2f126e5c96c1c407ed2d8a0cb55cac.tar.gz gsoc2013-evolution-a023b22c3f2f126e5c96c1c407ed2d8a0cb55cac.tar.zst gsoc2013-evolution-a023b22c3f2f126e5c96c1c407ed2d8a0cb55cac.zip |
removed this function, as we don't need to unref at all the WombatClient
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
svn path=/trunk/; revision=14306
Diffstat (limited to 'calendar/cal-client/cal-client.c')
-rw-r--r-- | calendar/cal-client/cal-client.c | 32 |
1 files changed, 7 insertions, 25 deletions
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)); |