aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/gossip-chat-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-05-14 04:29:46 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-14 04:29:46 +0800
commitb15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88 (patch)
tree318435ee27d45751c3a8c95112e7342f1b0b5909 /libempathy-gtk/gossip-chat-window.c
parentebceb937aba409b8760330e79da6018363f60d5b (diff)
downloadgsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.tar
gsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.tar.gz
gsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.tar.bz2
gsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.tar.lz
gsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.tar.xz
gsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.tar.zst
gsoc2013-empathy-b15fdb2c66e8c18a9f8db03cbd0cfa9dfb569e88.zip
When a new text channel arrives, check if there is no existing GossipChat
2006-05-13 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/gossip-chat-window.c: * libempathy-gtk/gossip-chat-window.h: * src/empathy-chat-main.c: * libempathy/empathy-tp-chat.c: * libempathy/empathy-tp-chat.h: When a new text channel arrives, check if there is no existing GossipChat object for it. svn path=/trunk/; revision=56
Diffstat (limited to 'libempathy-gtk/gossip-chat-window.c')
-rw-r--r--libempathy-gtk/gossip-chat-window.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/libempathy-gtk/gossip-chat-window.c b/libempathy-gtk/gossip-chat-window.c
index 62ace37b4..fb112379b 100644
--- a/libempathy-gtk/gossip-chat-window.c
+++ b/libempathy-gtk/gossip-chat-window.c
@@ -1874,3 +1874,31 @@ gossip_chat_window_has_focus (GossipChatWindow *window)
return has_focus;
}
+
+GossipChat *
+gossip_chat_window_find_chat_by_id (const gchar *id)
+{
+ GList *l;
+
+ for (l = chat_windows; l; l = l->next) {
+ GossipChatWindowPriv *priv;
+ GossipChatWindow *window;
+ GList *ll;
+
+ window = l->data;
+ priv = GET_PRIV (window);
+
+ for (ll = priv->chats; ll; ll = ll->next) {
+ GossipChat *chat;
+
+ chat = ll->data;
+
+ if (strcmp (id, gossip_chat_get_id (chat)) == 0) {
+ return chat;
+ }
+ }
+ }
+
+ return NULL;
+}
+