Mercurial > pidgin
diff src/conversation.c @ 4476:62c1e5e656d0
[gaim-migrate @ 4751]
gaim_conversation_new() now takes an aim_user parameter. This should fix
the new placement grouping bugs, as the default "user" (account)
selected was the first account in the list of connections. There may be
side-effects, especially with perl plugins, but I'm not sure. Please report
anything odd that you see as a result of this.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 30 Jan 2003 18:45:50 +0000 |
parents | c43c91ecb261 |
children | fa2d74e20a89 |
line wrap: on
line diff
--- a/src/conversation.c Thu Jan 30 18:38:34 2003 +0000 +++ b/src/conversation.c Thu Jan 30 18:45:50 2003 +0000 @@ -841,7 +841,8 @@ * Conversation API **************************************************************************/ struct gaim_conversation * -gaim_conversation_new(GaimConversationType type, const char *name) +gaim_conversation_new(GaimConversationType type, struct aim_user *user, + const char *name) { struct gaim_conversation *conv; @@ -849,12 +850,13 @@ return NULL; /* Check if this conversation already exists. */ - if ((conv = gaim_find_conversation(name)) != NULL) + if ((conv = gaim_find_conversation_with_user(name, user)) != NULL) return conv; conv = g_malloc0(sizeof(struct gaim_conversation)); conv->type = type; + conv->user = user; conv->name = g_strdup(name); conv->title = g_strdup(name); conv->send_history = g_list_append(NULL, NULL); @@ -882,12 +884,6 @@ conversations = g_list_append(conversations, conv); - /* Set the gc */ - if (connections != NULL) { - gaim_conversation_set_user(conv, - ((struct gaim_connection *)connections->data)->user); - } - /* Auto-set the title. */ gaim_conversation_autoset_title(conv); @@ -1329,7 +1325,7 @@ char *cuser; GList *cnv; - if (name == NULL || user == NULL) + if (name == NULL) return NULL; cuser = g_strdup(normalize(name));