From c063bac41998b5106743a47426b737ab7c59640d Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 6 Jun 2007 15:03:06 +0000 Subject: New widget: EmpathyContactWidget. It displays information about a contact, 2007-06-06 Xavier Claessens * libempathy-gtk/empathy-status-icon.c: * libempathy-gtk/empathy-contact-widget.glade: * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-contact-widget.h: * libempathy-gtk/Makefile.am: New widget: EmpathyContactWidget. It displays information about a contact, it can be used in any kind of dialog which needs to display contact information like alias, groups, avatar, etc. If the contact is the selfcontact information are editable. * libempathy/empathy-tp-contact-list.c: Do not take care of subscription changes. * libempathy/gossip-contact.c: Use gossip_presence_state_get_default_status (MC_PRESENCE_OFFLINE) when there is no presence. svn path=/trunk/; revision=124 --- libempathy/empathy-tp-contact-list.c | 37 ------------------------------------ libempathy/gossip-contact.c | 2 +- 2 files changed, 1 insertion(+), 38 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 284f51138..e54ebef38 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -144,9 +144,6 @@ static void tp_contact_list_pending_cb (GossipTe static void tp_contact_list_groups_updated_cb (GossipContact *contact, GParamSpec *param, EmpathyTpContactList *list); -static void tp_contact_list_subscription_updated_cb (GossipContact *contact, - GParamSpec *param, - EmpathyTpContactList *list); static void tp_contact_list_name_updated_cb (GossipContact *contact, GParamSpec *param, EmpathyTpContactList *list); @@ -710,9 +707,6 @@ empathy_tp_contact_list_get_from_handles (EmpathyTpContactList *list, g_signal_connect (contact, "notify::groups", G_CALLBACK (tp_contact_list_groups_updated_cb), list); - g_signal_connect (contact, "notify::subscription", - G_CALLBACK (tp_contact_list_subscription_updated_cb), - list); g_signal_connect (contact, "notify::name", G_CALLBACK (tp_contact_list_name_updated_cb), list); @@ -870,9 +864,6 @@ tp_contact_list_contact_removed_foreach (guint handle, g_signal_handlers_disconnect_by_func (contact, tp_contact_list_groups_updated_cb, list); - g_signal_handlers_disconnect_by_func (contact, - tp_contact_list_subscription_updated_cb, - list); g_signal_handlers_disconnect_by_func (contact, tp_contact_list_name_updated_cb, list); @@ -887,9 +878,6 @@ tp_contact_list_block_contact (EmpathyTpContactList *list, g_signal_handlers_block_by_func (contact, tp_contact_list_groups_updated_cb, list); - g_signal_handlers_block_by_func (contact, - tp_contact_list_subscription_updated_cb, - list); g_signal_handlers_block_by_func (contact, tp_contact_list_name_updated_cb, list); @@ -902,9 +890,6 @@ tp_contact_list_unblock_contact (EmpathyTpContactList *list, g_signal_handlers_unblock_by_func (contact, tp_contact_list_groups_updated_cb, list); - g_signal_handlers_unblock_by_func (contact, - tp_contact_list_subscription_updated_cb, - list); g_signal_handlers_unblock_by_func (contact, tp_contact_list_name_updated_cb, list); @@ -1277,28 +1262,6 @@ tp_contact_list_groups_updated_cb (GossipContact *contact, &data); } -static void -tp_contact_list_subscription_updated_cb (GossipContact *contact, - GParamSpec *param, - EmpathyTpContactList *list) -{ - EmpathyTpContactListPriv *priv; - GossipSubscription subscription; - guint handle; - - priv = GET_PRIV (list); - - subscription = gossip_contact_get_subscription (contact); - handle = gossip_contact_get_handle (contact); - - /* FIXME: what to do here, I'm a bit lost... */ - if (subscription) { - gossip_telepathy_group_add_member (priv->publish, handle, ""); - } else { - gossip_telepathy_group_remove_member (priv->publish, handle, ""); - } -} - static void tp_contact_list_name_updated_cb (GossipContact *contact, GParamSpec *param, diff --git a/libempathy/gossip-contact.c b/libempathy/gossip-contact.c index 78b2eefd0..267d86646 100644 --- a/libempathy/gossip-contact.c +++ b/libempathy/gossip-contact.c @@ -652,7 +652,7 @@ gossip_contact_get_status (GossipContact *contact) return status; } - return _("Offline"); + return gossip_presence_state_get_default_status (MC_PRESENCE_OFFLINE); } GossipContact * -- cgit v1.2.3