From a7b6b344618cceca174eea62954373edf84543ac Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 22 Oct 2009 17:28:38 +0100 Subject: empathy.c: document how the reference on the newly created EmpathyChat is managed --- src/empathy.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/empathy.c b/src/empathy.c index 9fddda22e..69210760e 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -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); -- cgit v1.2.3