diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-07 17:55:39 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-24 19:29:03 +0800 |
commit | bcc23595d5522d4345148bdc1ae05ab016894be1 (patch) | |
tree | 8c313c197354c07515ded90df55bd1b46e558b63 | |
parent | 70ec5dfc46d6177c74139ad84e6a74f521e8b374 (diff) | |
download | gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.tar gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.tar.gz gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.tar.bz2 gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.tar.lz gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.tar.xz gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.tar.zst gsoc2013-empathy-bcc23595d5522d4345148bdc1ae05ab016894be1.zip |
chat: use the individual view/store rather than the contact one
The great unification !
EmpathyChat was the last user of the contact store/view, everything now use
the individual ones.
https://bugzilla.gnome.org/show_bug.cgi?id=663387
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index f2afc4d4e..70e35ddad 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -49,8 +49,8 @@ #include "empathy-chat.h" #include "empathy-spell.h" #include "empathy-contact-dialogs.h" -#include "empathy-contact-list-store.h" -#include "empathy-contact-list-view.h" +#include "empathy-individual-store-channel.h" +#include "empathy-individual-view.h" #include "empathy-contact-menu.h" #include "empathy-input-text-view.h" #include "empathy-search-bar.h" @@ -2728,7 +2728,7 @@ chat_update_contacts_visibility (EmpathyChat *chat, } if (show && priv->contact_list_view == NULL) { - EmpathyContactListStore *store; + EmpathyIndividualStore *store; gint min_width; GtkAllocation allocation; @@ -2749,19 +2749,27 @@ chat_update_contacts_visibility (EmpathyChat *chat, priv->contacts_visible_id = g_timeout_add (500, chat_contacts_visible_timeout_cb, chat); - store = empathy_contact_list_store_new ( - EMPATHY_CONTACT_LIST (priv->tp_chat)); - empathy_contact_list_store_set_show_groups ( - EMPATHY_CONTACT_LIST_STORE (store), FALSE); - - priv->contact_list_view = GTK_WIDGET (empathy_contact_list_view_new (store, - EMPATHY_CONTACT_LIST_FEATURE_CONTACT_TOOLTIP, - EMPATHY_CONTACT_FEATURE_CHAT | - EMPATHY_CONTACT_FEATURE_CALL | - EMPATHY_CONTACT_FEATURE_LOG | - EMPATHY_CONTACT_FEATURE_INFO)); + store = EMPATHY_INDIVIDUAL_STORE ( + empathy_individual_store_channel_new ((TpChannel *) priv->tp_chat)); + + empathy_individual_store_set_show_groups (store, FALSE); + + priv->contact_list_view = GTK_WIDGET (empathy_individual_view_new (store, + EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_TOOLTIP, + EMPATHY_INDIVIDUAL_FEATURE_ADD_CONTACT | + EMPATHY_INDIVIDUAL_FEATURE_CHAT | + EMPATHY_INDIVIDUAL_FEATURE_CALL | + EMPATHY_INDIVIDUAL_FEATURE_LOG | + EMPATHY_INDIVIDUAL_FEATURE_INFO)); + + empathy_individual_view_set_show_offline ( + EMPATHY_INDIVIDUAL_VIEW (priv->contact_list_view), TRUE); + empathy_individual_view_set_show_uninteresting ( + EMPATHY_INDIVIDUAL_VIEW (priv->contact_list_view), TRUE); + gtk_container_add (GTK_CONTAINER (priv->scrolled_window_contacts), priv->contact_list_view); + gtk_widget_show (priv->contact_list_view); gtk_widget_show (priv->scrolled_window_contacts); g_object_unref (store); |