[empathy] chat: use the individual view/store rather than the contact one
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] chat: use the individual view/store rather than the contact one
- Date: Thu, 24 Nov 2011 11:29:59 +0000 (UTC)
commit bcc23595d5522d4345148bdc1ae05ab016894be1
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Nov 7 10:55:39 2011 +0100
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
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 f2afc4d..70e35dd 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]