diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-02-16 06:28:46 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-02-16 06:28:46 +0800 |
commit | a17ae72f50370e70a8f231b4d24361d448402b20 (patch) | |
tree | 4154058b33ae5f8048f6ffbf40b6d56a43d347ce | |
parent | b68b95efe92023193c318d4dd0fb92544463adef (diff) | |
download | gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.tar gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.tar.gz gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.tar.bz2 gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.tar.lz gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.tar.xz gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.tar.zst gsoc2013-empathy-a17ae72f50370e70a8f231b4d24361d448402b20.zip |
Cleanup code from previous merge
svn path=/trunk/; revision=638
-rw-r--r-- | libempathy/empathy-contact.c | 6 | ||||
-rw-r--r-- | libempathy/empathy-tp-call.c | 18 | ||||
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 5 |
3 files changed, 14 insertions, 15 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 3f03c1d33..698612572 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -159,7 +159,7 @@ empathy_contact_class_init (EmpathyContactClass *class) "Contact Capabilities", "Capabilities of the contact", EMPATHY_TYPE_CAPABILITIES, - 0, + EMPATHY_CAPABILITIES_UNKNOWN, G_PARAM_READWRITE)); g_object_class_install_property (object_class, @@ -176,10 +176,6 @@ empathy_contact_class_init (EmpathyContactClass *class) static void empathy_contact_init (EmpathyContact *contact) { - EmpathyContactPriv *priv; - - priv = GET_PRIV (contact); - priv->capabilities = EMPATHY_CAPABILITIES_UNKNOWN; } static void diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index 4ec4a97ff..7deb31c25 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -327,13 +327,14 @@ tp_call_request_streams_for_capabilities (EmpathyTpCall *call, static void tp_call_request_streams_capabilities_cb (EmpathyContact *contact, - GParamSpec *property, gpointer user_data) + GParamSpec *property, + gpointer user_data) { EmpathyTpCall *call = EMPATHY_TP_CALL (user_data); g_signal_handlers_disconnect_by_func (contact, - tp_call_request_streams_capabilities_cb, - user_data); + tp_call_request_streams_capabilities_cb, + user_data); tp_call_request_streams_for_capabilities (call, empathy_contact_get_capabilities (contact)); @@ -361,11 +362,12 @@ tp_call_request_streams (EmpathyTpCall *call) else { capabilities = empathy_contact_get_capabilities (priv->contact); - if (capabilities == EMPATHY_CAPABILITIES_UNKNOWN) { - g_signal_connect (G_OBJECT (priv->contact), "notify::capabilities", - G_CALLBACK (tp_call_request_streams_capabilities_cb), call); - return; - } + if (capabilities == EMPATHY_CAPABILITIES_UNKNOWN) + { + g_signal_connect (priv->contact, "notify::capabilities", + G_CALLBACK (tp_call_request_streams_capabilities_cb), call); + return; + } } tp_call_request_streams_for_capabilities (call, capabilities); diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index 533f1c5b1..1cce6080c 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -505,7 +505,8 @@ tp_contact_factory_update_capabilities (EmpathyTpContactFactory *tp_factory, capabilities = empathy_contact_get_capabilities (contact); if (strcmp (channel_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA) == 0) { - capabilities = EMPATHY_CAPABILITIES_NONE; + capabilities &= ~EMPATHY_CAPABILITIES_AUDIO; + capabilities &= ~EMPATHY_CAPABILITIES_VIDEO; if (specific & TP_CHANNEL_MEDIA_CAPABILITY_AUDIO) { capabilities |= EMPATHY_CAPABILITIES_AUDIO; } @@ -533,7 +534,7 @@ tp_contact_factory_get_capabilities_cb (DBusGProxy *proxy, if (error) { empathy_debug (DEBUG_DOMAIN, "Error getting capabilities: %s", - error->message); + error->message); /* FIXME Should set the capabilities of the contacts for which this request * originated to NONE */ goto OUT; |