aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-09-24 19:50:12 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-09-24 19:50:12 +0800
commit388c6a2d5dbbda429f12854141f640b91ece6590 (patch)
tree36234adeae049fd81fd2452de6b93b0ee34fa47a /calendar/pcs
parent87f9823068608040e7e73f9407797986a0f72ba1 (diff)
downloadgsoc2013-evolution-388c6a2d5dbbda429f12854141f640b91ece6590.tar.gz
gsoc2013-evolution-388c6a2d5dbbda429f12854141f640b91ece6590.tar.zst
gsoc2013-evolution-388c6a2d5dbbda429f12854141f640b91ece6590.zip
unref the QueryListener object. (query_construct): create an
2002-09-24 Rodrigo Moya <rodrigo@ximian.com> * pcs/query.c (listener_died_cb): unref the QueryListener object. (query_construct): create an EComponentListener for the non-cached queries' listeners also. svn path=/trunk/; revision=18195
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/query.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/calendar/pcs/query.c b/calendar/pcs/query.c
index 2ca9ad8409..debee6a920 100644
--- a/calendar/pcs/query.c
+++ b/calendar/pcs/query.c
@@ -1404,13 +1404,24 @@ listener_died_cb (EComponentListener *cl, gpointer data)
{
QueryPrivate *priv;
Query *query = QUERY (data);
+ GNOME_Evolution_Calendar_QueryListener ql;
+ CORBA_Environment ev;
priv = query->priv;
- priv->listeners = g_list_remove (priv->listeners, e_component_listener_get_component (cl));
+ ql = e_component_listener_get_component (cl);
+ priv->listeners = g_list_remove (priv->listeners, ql);
priv->component_listeners = g_list_remove (priv->component_listeners, cl);
gtk_object_unref (GTK_OBJECT (cl));
+
+ CORBA_exception_init (&ev);
+ bonobo_object_release_unref (ql, &ev);
+
+ if (BONOBO_EX (&ev))
+ g_message ("query_destroy(): Could not unref the listener\n");
+
+ CORBA_exception_free (&ev);
}
static void
@@ -1572,6 +1583,7 @@ query_construct (Query *query,
{
QueryPrivate *priv;
CORBA_Environment ev;
+ EComponentListener *cl;
g_return_val_if_fail (query != NULL, NULL);
g_return_val_if_fail (IS_QUERY (query), NULL);
@@ -1592,6 +1604,11 @@ query_construct (Query *query,
}
CORBA_exception_free (&ev);
+ cl = e_component_listener_new (ql, 0);
+ priv->component_listeners = g_list_append (priv->component_listeners, cl);
+ gtk_signal_connect (GTK_OBJECT (cl), "component_died",
+ GTK_SIGNAL_FUNC (listener_died_cb), query);
+
priv->backend = backend;
gtk_object_ref (GTK_OBJECT (priv->backend));