aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-04-24 14:26:19 +0800
committerDavyd Madeley <davyd@madeley.id.au>2009-07-15 18:12:15 +0800
commit0c0c427ea240b0615cc08658fc318516d4259d3e (patch)
tree4c7e448be457c6d9612447317b46031ae65a4d22
parent736807e3c658aee559cb3d41413e775023d29c51 (diff)
downloadgsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.tar
gsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.tar.gz
gsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.tar.bz2
gsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.tar.lz
gsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.tar.xz
gsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.tar.zst
gsoc2013-empathy-0c0c427ea240b0615cc08658fc318516d4259d3e.zip
Remove redundant empathy_tp_contact_list_can_add()
-rw-r--r--libempathy/empathy-contact-manager.c9
-rw-r--r--libempathy/empathy-tp-contact-list.c17
2 files changed, 6 insertions, 20 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 059382b60..49155c8c5 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -532,15 +532,18 @@ empathy_contact_manager_can_add (EmpathyContactManager *manager,
TpConnection *connection)
{
EmpathyContactManagerPriv *priv = GET_PRIV (manager);
- EmpathyTpContactList *list;
+ EmpathyContactList *list;
+ EmpathyContactListFlags flags;
g_return_val_if_fail (EMPATHY_IS_CONTACT_MANAGER (manager), FALSE);
g_return_val_if_fail (connection != NULL, FALSE);
list = g_hash_table_lookup (priv->lists, connection);
- if (list == NULL)
+ if (list == NULL) {
return FALSE;
+ }
+ flags = empathy_contact_list_get_flags (list);
- return empathy_tp_contact_list_can_add (list);
+ return (flags & EMPATHY_CONTACT_LIST_CAN_ADD);
}
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 4ae5c88c9..514f7a6b5 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -1114,23 +1114,6 @@ tp_contact_list_iface_init (EmpathyContactListIface *iface)
iface->get_flags = tp_contact_list_get_flags;
}
-gboolean
-empathy_tp_contact_list_can_add (EmpathyTpContactList *list)
-{
- EmpathyTpContactListPriv *priv;
- TpChannelGroupFlags flags;
-
- g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list), FALSE);
-
- priv = GET_PRIV (list);
-
- if (priv->subscribe == NULL)
- return FALSE;
-
- flags = tp_channel_group_get_flags (priv->subscribe);
- return (flags & TP_CHANNEL_GROUP_FLAG_CAN_ADD) != 0;
-}
-
void
empathy_tp_contact_list_remove_all (EmpathyTpContactList *list)
{