]> git.0d.be Git - empathy.git/commitdiff
empathy.c: document how the reference on the newly created EmpathyChat is managed
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 22 Oct 2009 16:28:38 +0000 (17:28 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 23 Oct 2009 14:09:42 +0000 (15:09 +0100)
src/empathy.c

index 9fddda22eed81ad3776d39665be62d9503500fab..69210760e5343f7006452d8250ccf1966259be62 100644 (file)
@@ -118,9 +118,16 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
         }
 
       if (chat)
-        empathy_chat_set_tp_chat (chat, tp_chat);
+        {
+          empathy_chat_set_tp_chat (chat, tp_chat);
+        }
       else
-        chat = empathy_chat_new (tp_chat);
+        {
+          chat = empathy_chat_new (tp_chat);
+          /* empathy_chat_new returns a floating reference as EmpathyChat is
+           * a GtkWidget. This reference will be taken by a container
+           * (a GtkNotebook) when we'll call empathy_chat_window_present_chat */
+        }
 
       empathy_chat_window_present_chat (chat);