aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-chatroom.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-05-24 07:01:46 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-24 07:01:46 +0800
commit726dec7bfdafeae5d1cbaf00149aa0659ce589a4 (patch)
treec69bb33a1a7c50dddc37cf1be09b26ba128bcf06 /libempathy/empathy-tp-chatroom.c
parenta7b98a1b882d17da63c9165042282db78aff508b (diff)
downloadgsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.tar
gsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.tar.gz
gsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.tar.bz2
gsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.tar.lz
gsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.tar.xz
gsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.tar.zst
gsoc2013-empathy-726dec7bfdafeae5d1cbaf00149aa0659ce589a4.zip
New objects: GossipAccountChooser and GossipNewChatroom, we can now join
2007-05-24 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/gossip-account-chooser.c: * libempathy-gtk/gossip-new-chatroom-dialog.c: * libempathy-gtk/gossip-account-widget-jabber.c: * libempathy-gtk/gossip-account-chooser.h: * libempathy-gtk/gossip-new-chatroom-dialog.h: * libempathy-gtk/gossip-group-chat.c: * libempathy-gtk/empathy-main-window.c: * libempathy-gtk/gossip-new-chatroom-dialog.glade: * libempathy-gtk/gossip-account-widget-jabber.glade: * libempathy-gtk/Makefile.am: * libempathy/empathy-tp-chatroom.c: * data/gtalk.profile: * data/jabber.profile: * data/salut.profile: * data/Makefile.am: * data/empathy.desktop.in.in: * data/msn.profile: * data/irc.profile: New objects: GossipAccountChooser and GossipNewChatroom, we can now join any chatroom. Adding IRC profile. svn path=/trunk/; revision=89
Diffstat (limited to 'libempathy/empathy-tp-chatroom.c')
-rw-r--r--libempathy/empathy-tp-chatroom.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-chatroom.c b/libempathy/empathy-tp-chatroom.c
index 34875c10c..eb47c9bb3 100644
--- a/libempathy/empathy-tp-chatroom.c
+++ b/libempathy/empathy-tp-chatroom.c
@@ -250,8 +250,6 @@ tp_chatroom_members_added_cb (GossipTelepathyGroup *group,
EmpathyTpChatroomPriv *priv;
GList *contacts, *l;
- g_return_if_fail (EMPATHY_IS_TP_CHATROOM (chatroom));
-
priv = GET_PRIV (chatroom);
contacts = empathy_tp_contact_list_get_from_handles (priv->list, handles);
@@ -275,6 +273,22 @@ tp_chatroom_members_removed_cb (GossipTelepathyGroup *group,
const gchar *message,
EmpathyTpChatroom *chatroom)
{
+ EmpathyTpChatroomPriv *priv;
+ GList *contacts, *l;
+
+ priv = GET_PRIV (chatroom);
+
+ contacts = empathy_tp_contact_list_get_from_handles (priv->list, handles);
+ for (l = contacts; l; l = l->next) {
+ GossipContact *contact;
+
+ contact = l->data;
+
+ g_signal_emit_by_name (chatroom, "contact-removed", contact);
+
+ g_object_unref (contact);
+ }
+ g_list_free (contacts);
}
static void
@@ -295,6 +309,16 @@ tp_chatroom_add (EmpathyContactList *list,
GossipContact *contact,
const gchar *message)
{
+ EmpathyTpChatroomPriv *priv;
+
+ g_return_if_fail (EMPATHY_IS_TP_CHATROOM (list));
+ g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+
+ priv = GET_PRIV (list);
+
+ gossip_telepathy_group_add_member (priv->group,
+ gossip_contact_get_handle (contact),
+ message);
}
static void
@@ -302,6 +326,16 @@ tp_chatroom_remove (EmpathyContactList *list,
GossipContact *contact,
const gchar *message)
{
+ EmpathyTpChatroomPriv *priv;
+
+ g_return_if_fail (EMPATHY_IS_TP_CHATROOM (list));
+ g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+
+ priv = GET_PRIV (list);
+
+ gossip_telepathy_group_remove_member (priv->group,
+ gossip_contact_get_handle (contact),
+ message);
}
static GList *