aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-05-14 04:29:46 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-05-14 04:29:46 +0800
commit2a0b78fa2cfb81504905438d333acdde094067e5 (patch)
tree318435ee27d45751c3a8c95112e7342f1b0b5909 /libempathy-gtk
parent7dda1dfd0bb1b2c17e973b8f1137b2559ff5d9dd (diff)
downloadgsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.tar
gsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.tar.gz
gsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.tar.bz2
gsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.tar.lz
gsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.tar.xz
gsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.tar.zst
gsoc2013-empathy-2a0b78fa2cfb81504905438d333acdde094067e5.zip
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. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@56 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/gossip-chat-window.c28
-rw-r--r--libempathy-gtk/gossip-chat-window.h1
2 files changed, 29 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;
+}
+
diff --git a/libempathy-gtk/gossip-chat-window.h b/libempathy-gtk/gossip-chat-window.h
index 783dc5b63..18b06ad90 100644
--- a/libempathy-gtk/gossip-chat-window.h
+++ b/libempathy-gtk/gossip-chat-window.h
@@ -70,6 +70,7 @@ void gossip_chat_window_move_chat (GossipChatWindow *old_wind
void gossip_chat_window_switch_to_chat (GossipChatWindow *window,
GossipChat *chat);
gboolean gossip_chat_window_has_focus (GossipChatWindow *window);
+GossipChat * gossip_chat_window_find_chat_by_id (const gchar *id);
G_END_DECLS