aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-03 22:21:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-28 19:09:55 +0800
commitfb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17 (patch)
tree04349923c58c110e84e3ba1b4e29eb376cb90d07 /libempathy-gtk
parentc92545819b005cd651f84108fda5cc99af275788 (diff)
downloadgsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.tar
gsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.tar.gz
gsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.tar.bz2
gsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.tar.lz
gsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.tar.xz
gsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.tar.zst
gsoc2013-empathy-fb2b5ea4bbbc4ac7a1a1353cb162ec2d4524eb17.zip
contact-menu: stop using empathy_contact_manager_get_flags_for_connection()
https://bugzilla.gnome.org/show_bug.cgi?id=663328
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-menu.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index f47b95ff1..dd9ea5c16 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -174,7 +174,6 @@ empathy_contact_add_menu_item_new (EmpathyContact *contact)
TpConnection *connection;
GList *l, *members;
gboolean found = FALSE;
- EmpathyContactListFlags flags;
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
@@ -185,12 +184,8 @@ empathy_contact_add_menu_item_new (EmpathyContact *contact)
manager = empathy_contact_manager_dup_singleton ();
connection = empathy_contact_get_connection (contact);
- flags = empathy_contact_manager_get_flags_for_connection (manager,
- connection);
-
- if (!(flags & EMPATHY_CONTACT_LIST_CAN_ADD)) {
+ if (!tp_connection_get_can_change_contact_list (connection))
return NULL;
- }
members = empathy_contact_list_get_members (EMPATHY_CONTACT_LIST (manager));
for (l = members; l; l = l->next) {
@@ -520,7 +515,6 @@ contact_edit_menu_item_activate_cb (EmpathyContact *contact)
GtkWidget *
empathy_contact_edit_menu_item_new (EmpathyContact *contact)
{
- EmpathyContactManager *manager;
GtkWidget *item;
GtkWidget *image;
gboolean enable = FALSE;
@@ -529,17 +523,12 @@ empathy_contact_edit_menu_item_new (EmpathyContact *contact)
if (empathy_contact_manager_initialized ()) {
TpConnection *connection;
- EmpathyContactListFlags flags;
- manager = empathy_contact_manager_dup_singleton ();
connection = empathy_contact_get_connection (contact);
- flags = empathy_contact_manager_get_flags_for_connection (
- manager, connection);
-
- enable = (flags & EMPATHY_CONTACT_LIST_CAN_ALIAS ||
- flags & EMPATHY_CONTACT_LIST_CAN_GROUP);
- g_object_unref (manager);
+ enable = (tp_connection_can_set_contact_alias (connection) ||
+ tp_connection_get_group_storage (connection) !=
+ TP_CONTACT_METADATA_STORAGE_TYPE_NONE);
}
item = gtk_image_menu_item_new_with_mnemonic (