]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-group-chat.c
Merge call branch from Elliot Fairweather with cleanups from Xavier Claessens.
[empathy.git] / libempathy-gtk / empathy-group-chat.c
index 948f728e579c16b67670646f6ade537f0cf56f3b..4f86ef2bab2c2e88a868464184422389aff8dca8 100644 (file)
@@ -40,7 +40,6 @@
 #include <libempathy/empathy-contact.h>
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-conf.h>
 
 #include "empathy-group-chat.h"
 #include "empathy-chat.h"
@@ -51,6 +50,7 @@
 //#include "empathy-sound.h"
 #include "empathy-images.h"
 #include "empathy-ui-utils.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 
 #define DEBUG_DOMAIN "GroupChat"
@@ -175,22 +175,15 @@ group_chat_finalize (GObject *object)
 }
 
 EmpathyGroupChat *
-empathy_group_chat_new (McAccount *account,
-                       TpChan    *tp_chan)
+empathy_group_chat_new (EmpathyTpChatroom *tp_chat)
 {
-       EmpathyGroupChat     *chat;
-       EmpathyGroupChatPriv *priv;
-
-       g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
-       g_return_val_if_fail (TELEPATHY_IS_CHAN (tp_chan), NULL);
+       EmpathyGroupChat *chat;
 
-       chat = g_object_new (EMPATHY_TYPE_GROUP_CHAT, NULL);
+       g_return_val_if_fail (EMPATHY_IS_TP_CHAT (tp_chat), NULL);
 
-       priv = GET_PRIV (chat);
-
-       EMPATHY_CHAT (chat)->account = g_object_ref (account);
-       priv->tp_chat = empathy_tp_chatroom_new (account, tp_chan);
-       empathy_chat_set_tp_chat (EMPATHY_CHAT (chat), EMPATHY_TP_CHAT (priv->tp_chat));
+       chat = g_object_new (EMPATHY_TYPE_GROUP_CHAT,
+                            "tp-chat", tp_chat,
+                            NULL);
 
        return chat;
 }
@@ -534,8 +527,14 @@ group_chat_set_tp_chat (EmpathyChat    *chat,
 
        /* Create contact list */
        priv->store = empathy_contact_list_store_new (EMPATHY_CONTACT_LIST (priv->tp_chat));
-       priv->view = empathy_contact_list_view_new (priv->store);
-       empathy_contact_list_view_set_interactive (priv->view, TRUE);
+       priv->view = empathy_contact_list_view_new (priv->store,
+                                                   EMPATHY_CONTACT_LIST_FEATURE_CONTACT_CHAT |
+                                                   EMPATHY_CONTACT_LIST_FEATURE_CONTACT_CALL |
+                                                   EMPATHY_CONTACT_LIST_FEATURE_CONTACT_LOG |
+                                                   EMPATHY_CONTACT_LIST_FEATURE_CONTACT_FT |
+                                                   EMPATHY_CONTACT_LIST_FEATURE_CONTACT_INVITE |
+                                                   EMPATHY_CONTACT_LIST_FEATURE_CONTACT_INFO);
+
        gtk_container_add (GTK_CONTAINER (priv->scrolled_window_contacts),
                           GTK_WIDGET (priv->view));
        gtk_widget_show (GTK_WIDGET (priv->view));