Mercurial > pidgin
changeset 18071:bb9cd8dfc61c
present existing conversation window if one exists
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Fri, 08 Jun 2007 12:43:57 +0000 |
parents | 2b757aadddc9 |
children | 8bad8a91d128 |
files | finch/gntblist.c |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntblist.c Fri Jun 08 12:41:30 2007 +0000 +++ b/finch/gntblist.c Fri Jun 08 12:43:57 2007 +0000 @@ -640,9 +640,18 @@ if (PURPLE_BLIST_NODE_IS_BUDDY(node)) { PurpleBuddy *buddy = (PurpleBuddy *)node; - PurpleConversation *conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, - purple_buddy_get_account(buddy), - purple_buddy_get_name(buddy)); + PurpleConversation *conv; + conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, + purple_buddy_get_name(buddy), + purple_buddy_get_account(buddy)); + if (!conv) { + conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, + purple_buddy_get_account(buddy), + purple_buddy_get_name(buddy)); + } else { + FinchConv *ggconv = conv->ui_data; + gnt_window_present(ggconv->window); + } finch_conversation_set_active(conv); } else if (PURPLE_BLIST_NODE_IS_CHAT(node))