diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-19 05:50:47 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-19 05:50:47 +0800 |
commit | 20ce0c962a960e39216b06bdf2198dfd83319278 (patch) | |
tree | 7c68fd6c1fe32771ae80c60351247ff810c395e1 /libempathy-gtk/gossip-contact-list.c | |
parent | 8af020a730b144f60c61a55be9e1542e588cf150 (diff) | |
download | gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.tar gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.tar.gz gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.tar.bz2 gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.tar.lz gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.tar.xz gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.tar.zst gsoc2013-empathy-20ce0c962a960e39216b06bdf2198dfd83319278.zip |
EmpathyContactList is now an interface implemented by
* libempathy-gtk/gossip-private-chat.h:
* libempathy-gtk/gossip-contact-list.c:
* libempathy-gtk/gossip-chat.c:
* libempathy-gtk/gossip-chat.h:
* libempathy-gtk/gossip-chat-window.c:
* libempathy-gtk/Makefile.am:
* libempathy-gtk/gossip-chat-view.c:
* libempathy-gtk/gossip-private-chat.c:
* src/empathy-chat-main.c:
* libempathy/gossip-utils.c:
* libempathy/gossip-contact.h:
* libempathy/empathy-tp-chat.c:
* libempathy/gossip-utils.h:
* libempathy/empathy-contact-manager.c:
* libempathy/empathy-contact-manager.h:
* libempathy/empathy-tp-contact-list.c:
* libempathy/empathy-tp-contact-list.h:
* libempathy/empathy-tp-chatroom.c:
* libempathy/empathy-tp-chatroom.h:
* libempathy/empathy-contact-list.c:
* libempathy/empathy-contact-list.h:
* libempathy/Makefile.am:
* libempathy/gossip-contact.c: EmpathyContactList is now an interface
implemented by EmpathyTpContactList, EmpathyContactManager and
EmpathyTpChatroom. GossipContactList use that interface to display a
treeview.
svn path=/trunk/; revision=72
Diffstat (limited to 'libempathy-gtk/gossip-contact-list.c')
-rw-r--r-- | libempathy-gtk/gossip-contact-list.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/libempathy-gtk/gossip-contact-list.c b/libempathy-gtk/gossip-contact-list.c index e268e419f..e4abccc80 100644 --- a/libempathy-gtk/gossip-contact-list.c +++ b/libempathy-gtk/gossip-contact-list.c @@ -32,6 +32,7 @@ #include <libmissioncontrol/mc-account.h> #include <libmissioncontrol/mission-control.h> +#include <libempathy/empathy-contact-list.h> #include <libempathy/empathy-contact-manager.h> #include <libempathy/gossip-debug.h> #include <libempathy/gossip-utils.h> @@ -66,7 +67,7 @@ #define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT_LIST, GossipContactListPriv)) struct _GossipContactListPriv { - EmpathyContactManager *manager; + EmpathyContactList *list; GHashTable *groups; @@ -125,7 +126,7 @@ static gboolean contact_list_row_separator_func (GtkTreeModel gpointer data); static void contact_list_contact_update (GossipContactList *list, GossipContact *contact); -static void contact_list_contact_added_cb (EmpathyContactManager *manager, +static void contact_list_contact_added_cb (EmpathyContactList *list_iface, GossipContact *contact, GossipContactList *list); static void contact_list_contact_updated_cb (GossipContact *contact, @@ -134,7 +135,7 @@ static void contact_list_contact_updated_cb (GossipContact static void contact_list_contact_groups_updated_cb (GossipContact *contact, GParamSpec *param, GossipContactList *list); -static void contact_list_contact_removed_cb (EmpathyContactManager *manager, +static void contact_list_contact_removed_cb (EmpathyContactList *list_iface, GossipContact *contact, GossipContactList *list); static void contact_list_contact_set_active (GossipContactList *list, @@ -456,14 +457,14 @@ gossip_contact_list_init (GossipContactList *list) priv = GET_PRIV (list); - priv->manager = empathy_contact_manager_new (); + priv->list = EMPATHY_CONTACT_LIST (empathy_contact_manager_new ()); priv->is_compact = FALSE; priv->show_active = TRUE; priv->show_avatars = TRUE; contact_list_create_model (list); contact_list_setup_view (list); - empathy_contact_manager_setup (priv->manager); + empathy_contact_list_setup (priv->list); /* Get saved group states. */ gossip_contact_groups_get_all (); @@ -488,11 +489,11 @@ gossip_contact_list_init (GossipContactList *list) NULL, NULL); /* Signal connection. */ - g_signal_connect (priv->manager, + g_signal_connect (priv->list, "contact-added", G_CALLBACK (contact_list_contact_added_cb), list); - g_signal_connect (priv->manager, + g_signal_connect (priv->list, "contact-removed", G_CALLBACK (contact_list_contact_removed_cb), list); @@ -516,13 +517,13 @@ gossip_contact_list_init (GossipContactList *list) GINT_TO_POINTER (FALSE)); /* Add contacts already created */ - contacts = empathy_contact_manager_get_contacts (priv->manager); + contacts = empathy_contact_list_get_contacts (priv->list); for (l = contacts; l; l = l->next) { GossipContact *contact; contact = l->data; - contact_list_contact_added_cb (priv->manager, contact, list); + contact_list_contact_added_cb (priv->list, contact, list); g_object_unref (contact); } @@ -536,9 +537,9 @@ contact_list_finalize (GObject *object) priv = GET_PRIV (object); - /* FIXME: disconnect all signals on the manager and contacts */ + /* FIXME: disconnect all signals on the list and contacts */ - g_object_unref (priv->manager); + g_object_unref (priv->list); g_object_unref (priv->ui); g_object_unref (priv->store); g_object_unref (priv->filter); @@ -780,9 +781,9 @@ contact_list_contact_update (GossipContactList *list, } static void -contact_list_contact_added_cb (EmpathyContactManager *manager, - GossipContact *contact, - GossipContactList *list) +contact_list_contact_added_cb (EmpathyContactList *list_iface, + GossipContact *contact, + GossipContactList *list) { GossipContactListPriv *priv; @@ -848,9 +849,9 @@ contact_list_contact_updated_cb (GossipContact *contact, } static void -contact_list_contact_removed_cb (EmpathyContactManager *manager, - GossipContact *contact, - GossipContactList *list) +contact_list_contact_removed_cb (EmpathyContactList *list_iface, + GossipContact *contact, + GossipContactList *list) { gossip_debug (DEBUG_DOMAIN, "Contact:'%s' removed", gossip_contact_get_name (contact)); @@ -1569,7 +1570,7 @@ contact_list_drag_data_received (GtkWidget *widget, id); /* FIXME: This is ambigous, an id can come from multiple accounts */ - contact = empathy_contact_manager_find (priv->manager, id); + contact = empathy_contact_list_find (priv->list, id); if (!contact) { gossip_debug (DEBUG_DOMAIN, "No contact found associated with drag & drop"); return; @@ -2365,7 +2366,7 @@ contact_list_filter_show_group (GossipContactList *list, * group should be shown because a contact we want to * show exists in it. */ - contacts = empathy_contact_manager_get_contacts (priv->manager); + contacts = empathy_contact_list_get_contacts (priv->list); for (l = contacts; l && !show_group; l = l->next) { if (!gossip_contact_is_in_group (l->data, group)) { continue; @@ -2702,7 +2703,7 @@ gossip_contact_list_set_show_offline (GossipContactList *list, /* Disable temporarily. */ priv->show_active = FALSE; - contacts = empathy_contact_manager_get_contacts (priv->manager); + contacts = empathy_contact_list_get_contacts (priv->list); for (l = contacts; l; l = l->next) { GossipContact *contact; |