Commit 4df45fb8 authored by Jonny Lamb's avatar Jonny Lamb Committed by Xavier Claessens

Rename _get_selected to _dup_selected and make sure the contact is unrefed.

Signed-off-by: 's avatarJonny Lamb <jonny.lamb@collabora.co.uk>

svn path=/trunk/; revision=2357
parent 8a2d8d7c
......@@ -320,7 +320,7 @@ empathy_contact_selector_new (EmpathyContactList *contact_list)
}
EmpathyContact *
empathy_contact_selector_get_selected (EmpathyContactSelector *selector)
empathy_contact_selector_dup_selected (EmpathyContactSelector *selector)
{
EmpathyContactSelectorPriv *priv = GET_PRIV (selector);
EmpathyContact *contact = NULL;
......
......@@ -58,11 +58,10 @@ struct _EmpathyContactSelectorClass
};
GType empathy_contact_selector_get_type (void) G_GNUC_CONST;
GtkWidget *
empathy_contact_selector_new (EmpathyContactList *contact_list);
EmpathyContact *
empathy_contact_selector_get_selected (EmpathyContactSelector *selector);
GtkWidget * empathy_contact_selector_new (EmpathyContactList *contact_list);
EmpathyContact * empathy_contact_selector_dup_selected (EmpathyContactSelector *selector);
G_END_DECLS
......
......@@ -37,12 +37,14 @@ clicked_cb (GtkButton *button,
EmpathyContactSelector *selector = EMPATHY_CONTACT_SELECTOR (data);
EmpathyContact *contact;
contact = empathy_contact_selector_get_selected (selector);
contact = empathy_contact_selector_dup_selected (selector);
if (!contact)
return;
empathy_dispatcher_chat_with_contact (contact, chat_cb, NULL);
g_object_unref (contact);
}
int main (int argc,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment