Mercurial > pidgin
diff src/gtkconv.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 | 473de7371a97 |
children | fa2d74e20a89 |
line wrap: on
line diff
--- a/src/gtkconv.c Thu Jan 30 18:38:34 2003 +0000 +++ b/src/gtkconv.c Thu Jan 30 18:45:50 2003 +0000 @@ -530,6 +530,7 @@ struct gaim_conversation *conv2; struct gaim_gtk_conversation *gtkconv; struct gaim_gtk_chat_pane *gtkchat; + struct aim_user *user; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *sel; @@ -549,14 +550,16 @@ if (*name == '@') name++; if (*name == '+') name++; + user = gaim_conversation_get_user(conv); + conv2 = gaim_find_conversation(name); - if (conv2 != NULL) + if (conv2 != NULL) { gaim_window_raise(gaim_conversation_get_window(conv2)); + gaim_conversation_set_user(conv2, user); + } else - conv2 = gaim_conversation_new(GAIM_CONV_IM, name); - - gaim_conversation_set_user(conv2, gaim_conversation_get_user(conv)); + conv2 = gaim_conversation_new(GAIM_CONV_IM, user, name); } static void @@ -600,17 +603,18 @@ { const char *who; struct gaim_conversation *conv2; + struct aim_user *user; who = g_object_get_data(G_OBJECT(w), "user_data"); + user = gaim_conversation_get_user(conv); + conv2 = gaim_find_conversation(who); if (conv2 != NULL) gaim_window_show(gaim_conversation_get_window(conv2)); - else { - conv2 = gaim_conversation_new(GAIM_CONV_IM, who); - gaim_conversation_set_user(conv2, gaim_conversation_get_user(conv)); - } + else + conv2 = gaim_conversation_new(GAIM_CONV_IM, user, who); } static void @@ -710,9 +714,9 @@ struct gaim_conversation *c; if ((c = gaim_find_conversation(who)) == NULL) - c = gaim_conversation_new(GAIM_CONV_IM, who); - - gaim_conversation_set_user(c, user); + c = gaim_conversation_new(GAIM_CONV_IM, user, who); + else + gaim_conversation_set_user(c, user); } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { static GtkWidget *menu = NULL;