empathy r2011 - trunk/libempathy



Author: xclaesse
Date: Mon Dec 22 17:56:29 2008
New Revision: 2011
URL: http://svn.gnome.org/viewvc/empathy?rev=2011&view=rev

Log:
Make existing contact FT capable when the CM supports it

Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>

Modified:
   trunk/libempathy/empathy-tp-contact-factory.c

Modified: trunk/libempathy/empathy-tp-contact-factory.c
==============================================================================
--- trunk/libempathy/empathy-tp-contact-factory.c	(original)
+++ trunk/libempathy/empathy-tp-contact-factory.c	Mon Dec 22 17:56:29 2008
@@ -843,6 +843,7 @@
 		GValue class = {0,};
 		GValue *chan_type, *handle_type;
 		GHashTable *fixed_prop;
+		GList *l;
 
 		g_value_init (&class, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
 		g_value_set_static_boxed (&class, g_ptr_array_index (classes, i));
@@ -869,6 +870,16 @@
 		/* We can request file transfer channel to contacts. */
 		priv->can_request_ft = TRUE;
 
+		/* Update the capabilities of all contacts */
+		for (l = priv->contacts; l != NULL; l = g_list_next (l)) {
+			EmpathyContact *contact = l->data;
+			EmpathyCapabilities caps;
+
+			caps = empathy_contact_get_capabilities (contact);
+			empathy_contact_set_capabilities (contact, caps |
+				EMPATHY_CAPABILITIES_FT);
+		}
+
 		break;
 	}
 



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