]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/gossip-chat.c
Fix warning when selecting all accounts.
[empathy.git] / libempathy-gtk / gossip-chat.c
index 70d900d9fa45f89de2a42d56844cd3a8db190e4e..a29c318185737c68ca986a6ca20be651fd640062 100644 (file)
@@ -228,7 +228,7 @@ gossip_chat_init (GossipChat *chat)
        priv = GET_PRIV (chat);
 
        priv->manager = empathy_contact_manager_new ();
-       priv->tooltips = gtk_tooltips_new ();
+       priv->tooltips = g_object_ref_sink (gtk_tooltips_new ());
        priv->default_window_height = -1;
        priv->vscroll_visible = FALSE;
        priv->sensitive = TRUE;
@@ -337,6 +337,7 @@ chat_finalize (GObject *object)
        chat_composing_remove_timeout (chat);
        g_object_unref (chat->account);
        g_object_unref (priv->manager);
+       g_object_unref (priv->tooltips);
 
        if (priv->tp_chat) {
                g_object_unref (priv->tp_chat);
@@ -1072,11 +1073,18 @@ chat_state_changed_cb (EmpathyTpChat             *tp_chat,
                       GossipChat                *chat)
 {
        GossipChatPriv *priv;
+       GossipContact  *own_contact;
        GList          *l;
        gboolean        was_composing;
 
        priv = GET_PRIV (chat);
 
+       own_contact = gossip_contact_get_user (contact);
+       if (gossip_contact_equal (own_contact, contact)) {
+               /* We don't care about our own chat state */
+               return;
+       }
+
        was_composing = (priv->compositors != NULL);
 
        /* Find the contact in the list. After that l is the list elem or NULL */