aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-31 01:35:40 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-31 01:35:40 +0800
commit3eb7d912eea061b01994302f8e76157baea530a8 (patch)
tree7af1b6b8fdb98058585a2a729584b729caca20df
parent55d3cd4e21a0f7a6a860b089fcb6f7457f82f3ca (diff)
downloadgsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.tar
gsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.tar.gz
gsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.tar.bz2
gsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.tar.lz
gsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.tar.xz
gsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.tar.zst
gsoc2013-empathy-3eb7d912eea061b01994302f8e76157baea530a8.zip
Rename _get_selected to _dup_selected and make sure the contact is unrefed.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2357 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--libempathy-gtk/empathy-contact-selector.c2
-rw-r--r--libempathy-gtk/empathy-contact-selector.h7
-rw-r--r--tests/empetit.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-contact-selector.c b/libempathy-gtk/empathy-contact-selector.c
index df5384ace..466b590a3 100644
--- a/libempathy-gtk/empathy-contact-selector.c
+++ b/libempathy-gtk/empathy-contact-selector.c
@@ -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;
diff --git a/libempathy-gtk/empathy-contact-selector.h b/libempathy-gtk/empathy-contact-selector.h
index d766c5a62..19ca8cef8 100644
--- a/libempathy-gtk/empathy-contact-selector.h
+++ b/libempathy-gtk/empathy-contact-selector.h
@@ -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
diff --git a/tests/empetit.c b/tests/empetit.c
index 76d0528d8..2d71c5359 100644
--- a/tests/empetit.c
+++ b/tests/empetit.c
@@ -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,