empathy r2063 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2063 - trunk/libempathy
- Date: Tue, 6 Jan 2009 16:48:00 +0000 (UTC)
Author: xclaesse
Date: Tue Jan 6 16:48:00 2009
New Revision: 2063
URL: http://svn.gnome.org/viewvc/empathy?rev=2063&view=rev
Log:
Don't own a reference to the EmpathyTpChat, otherwise it won't be
finalized.
Modified:
trunk/libempathy/empathy-contact-monitor.c
Modified: trunk/libempathy/empathy-contact-monitor.c
==============================================================================
--- trunk/libempathy/empathy-contact-monitor.c (original)
+++ trunk/libempathy/empathy-contact-monitor.c Tue Jan 6 16:48:00 2009
@@ -55,6 +55,13 @@
static void contact_remove_foreach (EmpathyContact *contact,
EmpathyContactMonitor *monitor);
+static void cl_members_changed_cb (EmpathyContactList *cl,
+ EmpathyContact *contact,
+ EmpathyContact *actor,
+ guint reason,
+ gchar *message,
+ gboolean is_member,
+ EmpathyContactMonitor *monitor);
static guint signals[LAST_SIGNAL];
@@ -102,7 +109,7 @@
EmpathyContactMonitorPriv *priv;
priv = GET_PRIV (obj);
-
+
if (priv->contacts) {
g_ptr_array_foreach (priv->contacts,
(GFunc) contact_remove_foreach, obj);
@@ -110,6 +117,11 @@
priv->contacts = NULL;
}
+ if (priv->proxy) {
+ g_signal_handlers_disconnect_by_func (priv->proxy,
+ cl_members_changed_cb, obj);
+ }
+
G_OBJECT_CLASS (empathy_contact_monitor_parent_class)->finalize (obj);
}
@@ -370,12 +382,7 @@
priv->contacts = NULL;
}
- if (priv->proxy != NULL) {
- g_object_unref (priv->proxy);
- priv->proxy = NULL;
- }
-
- priv->proxy = g_object_ref (proxy);
+ priv->proxy = proxy;
priv->contacts = g_ptr_array_new ();
g_signal_connect (proxy, "members-changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]