empathy r2357 - in trunk: libempathy-gtk tests



Author: xclaesse
Date: Fri Jan 30 17:35:40 2009
New Revision: 2357
URL: http://svn.gnome.org/viewvc/empathy?rev=2357&view=rev

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

Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

Modified:
   trunk/libempathy-gtk/empathy-contact-selector.c
   trunk/libempathy-gtk/empathy-contact-selector.h
   trunk/tests/empetit.c

Modified: trunk/libempathy-gtk/empathy-contact-selector.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-selector.c	(original)
+++ trunk/libempathy-gtk/empathy-contact-selector.c	Fri Jan 30 17:35:40 2009
@@ -320,7 +320,7 @@
 }
 
 EmpathyContact *
-empathy_contact_selector_get_selected (EmpathyContactSelector *selector)
+empathy_contact_selector_dup_selected (EmpathyContactSelector *selector)
 {
   EmpathyContactSelectorPriv *priv = GET_PRIV (selector);
   EmpathyContact *contact = NULL;

Modified: trunk/libempathy-gtk/empathy-contact-selector.h
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-selector.h	(original)
+++ trunk/libempathy-gtk/empathy-contact-selector.h	Fri Jan 30 17:35:40 2009
@@ -58,11 +58,10 @@
 };
 
 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
 

Modified: trunk/tests/empetit.c
==============================================================================
--- trunk/tests/empetit.c	(original)
+++ trunk/tests/empetit.c	Fri Jan 30 17:35:40 2009
@@ -37,12 +37,14 @@
   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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]