From e1110b246ff83d6add4bbf01c6ec8a8460070491 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sat, 2 Jun 2007 11:49:00 +0000 Subject: Set default presence to available if there is no presence iface. 2007-06-02 Xavier Claessens * libempathy-gtk/gossip-group-chat.c: * libempathy/empathy-tp-contact-list.c: * libempathy/gossip-contact.c: Set default presence to available if there is no presence iface. svn path=/trunk/; revision=113 --- ChangeLog | 7 +++++++ libempathy-gtk/gossip-group-chat.c | 1 - libempathy/empathy-tp-contact-list.c | 12 ++++++++++++ libempathy/gossip-contact.c | 6 +++--- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2a9fb20d..5ec871fc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-06-02 Xavier Claessens + + * libempathy-gtk/gossip-group-chat.c: + * libempathy/empathy-tp-contact-list.c: + * libempathy/gossip-contact.c: Set default presence to available if + there is no presence iface. + 2007-06-02 Xavier Claessens * libempathy-gtk/gossip-ui-utils.c: diff --git a/libempathy-gtk/gossip-group-chat.c b/libempathy-gtk/gossip-group-chat.c index 3dc4022bf..493e07461 100644 --- a/libempathy-gtk/gossip-group-chat.c +++ b/libempathy-gtk/gossip-group-chat.c @@ -186,7 +186,6 @@ gossip_group_chat_new (McAccount *account, /* Create contact list */ priv->store = gossip_contact_list_store_new (EMPATHY_CONTACT_LIST (priv->tp_chat)); priv->view = gossip_contact_list_view_new (priv->store); - gossip_contact_list_store_set_show_offline (priv->store, TRUE); gtk_container_add (GTK_CONTAINER (priv->scrolled_window_contacts), GTK_WIDGET (priv->view)); gtk_widget_show (GTK_WIDGET (priv->view)); diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 6af5ed064..760ee013b 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -684,6 +684,18 @@ empathy_tp_contact_list_get_from_handles (EmpathyTpContactList *list, "handle", handle, NULL); + if (!priv->presence_iface) { + GossipPresence *presence; + + /* We have no presence iface, set default presence + * to available */ + presence = gossip_presence_new_full (MC_PRESENCE_AVAILABLE, + NULL); + + gossip_contact_set_presence (contact, presence); + g_object_unref (presence); + } + g_signal_connect (contact, "notify::groups", G_CALLBACK (tp_contact_list_groups_updated_cb), list); diff --git a/libempathy/gossip-contact.c b/libempathy/gossip-contact.c index 51015f365..78b2eefd0 100644 --- a/libempathy/gossip-contact.c +++ b/libempathy/gossip-contact.c @@ -333,9 +333,9 @@ gossip_contact_new (McAccount *account) } GossipContact * -gossip_contact_new_full (McAccount *account, - const gchar *id, - const gchar *name) +gossip_contact_new_full (McAccount *account, + const gchar *id, + const gchar *name) { return g_object_new (GOSSIP_TYPE_CONTACT, "account", account, -- cgit v1.2.3