diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-08-08 08:22:07 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-08-08 08:22:07 +0800 |
commit | 26cbf6cd5fb66c8c490bbb4d148b811139ec9210 (patch) | |
tree | c11413db3b101217b90b396023ab9852024bef65 /calendar/cal-client/cal-client.c | |
parent | ff41087ad40d0527b53cd0815419978a3df5995c (diff) | |
download | gsoc2013-evolution-26cbf6cd5fb66c8c490bbb4d148b811139ec9210.tar.gz gsoc2013-evolution-26cbf6cd5fb66c8c490bbb4d148b811139ec9210.tar.zst gsoc2013-evolution-26cbf6cd5fb66c8c490bbb4d148b811139ec9210.zip |
New function to stop further notification from happening.
2001-08-07 Federico Mena Quintero <federico@ximian.com>
* cal-client/cal-listener.c (cal_listener_stop_notification): New
function to stop further notification from happening.
(impl_notifyCalOpened): Do not notify if requested.
(impl_notifyObjUpdated): Likewise.
(impl_notifyObjRemoved): Likewise.
(impl_notifyCategoriesChanged): Likewise.
(CalListenerPrivate): Do not keep a reference to the server-side
Cal. This would create a circular reference since the server
keeps a reference to the listener.
(cal_listener_destroy): Likewise.
(impl_notifyCalOpened): Likewise.
* pcs/cal.c (cal_destroy): bonobo_object_release_unref() the listener.
* cal-client/cal-client.c (cal_client_destroy): Ask the listener
to stop notifications. Also, do not unref it as the server does
that itself when we unref the Cal.
svn path=/trunk/; revision=11758
Diffstat (limited to 'calendar/cal-client/cal-client.c')
-rw-r--r-- | calendar/cal-client/cal-client.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index 41e42613bb..f0519057d6 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -260,21 +260,6 @@ destroy_factory (CalClient *client) priv->factory = CORBA_OBJECT_NIL; } -/* Gets rid of the listener that a client knows about */ -static void -destroy_listener (CalClient *client) -{ - CalClientPrivate *priv; - - priv = client->priv; - - if (!priv->listener) - return; - - bonobo_object_unref (BONOBO_OBJECT (priv->listener)); - priv->listener = NULL; -} - /* Gets rid of the calendar client interface object that a client knows about */ static void destroy_cal (CalClient *client) @@ -337,9 +322,14 @@ cal_client_destroy (GtkObject *object) client = CAL_CLIENT (object); priv = client->priv; + /* The server unrefs the query listener, so we just NULL it out here */ + if (priv->listener) { + cal_listener_stop_notification (priv->listener); + priv->listener = NULL; + } + destroy_wombat_client (client); destroy_factory (client); - destroy_listener (client); destroy_cal (client); priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED; |