Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
4475:1f3241831734 | 4476:62c1e5e656d0 |
---|---|
528 im_cb(GtkWidget *widget, struct gaim_conversation *conv) | 528 im_cb(GtkWidget *widget, struct gaim_conversation *conv) |
529 { | 529 { |
530 struct gaim_conversation *conv2; | 530 struct gaim_conversation *conv2; |
531 struct gaim_gtk_conversation *gtkconv; | 531 struct gaim_gtk_conversation *gtkconv; |
532 struct gaim_gtk_chat_pane *gtkchat; | 532 struct gaim_gtk_chat_pane *gtkchat; |
533 struct aim_user *user; | |
533 GtkTreeIter iter; | 534 GtkTreeIter iter; |
534 GtkTreeModel *model; | 535 GtkTreeModel *model; |
535 GtkTreeSelection *sel; | 536 GtkTreeSelection *sel; |
536 const char *name; | 537 const char *name; |
537 | 538 |
547 return; | 548 return; |
548 | 549 |
549 if (*name == '@') name++; | 550 if (*name == '@') name++; |
550 if (*name == '+') name++; | 551 if (*name == '+') name++; |
551 | 552 |
553 user = gaim_conversation_get_user(conv); | |
554 | |
552 conv2 = gaim_find_conversation(name); | 555 conv2 = gaim_find_conversation(name); |
553 | 556 |
554 if (conv2 != NULL) | 557 if (conv2 != NULL) { |
555 gaim_window_raise(gaim_conversation_get_window(conv2)); | 558 gaim_window_raise(gaim_conversation_get_window(conv2)); |
559 gaim_conversation_set_user(conv2, user); | |
560 } | |
556 else | 561 else |
557 conv2 = gaim_conversation_new(GAIM_CONV_IM, name); | 562 conv2 = gaim_conversation_new(GAIM_CONV_IM, user, name); |
558 | |
559 gaim_conversation_set_user(conv2, gaim_conversation_get_user(conv)); | |
560 } | 563 } |
561 | 564 |
562 static void | 565 static void |
563 ignore_cb(GtkWidget *w, struct gaim_conversation *conv) | 566 ignore_cb(GtkWidget *w, struct gaim_conversation *conv) |
564 { | 567 { |
598 static void | 601 static void |
599 menu_im_cb(GtkWidget *w, struct gaim_conversation *conv) | 602 menu_im_cb(GtkWidget *w, struct gaim_conversation *conv) |
600 { | 603 { |
601 const char *who; | 604 const char *who; |
602 struct gaim_conversation *conv2; | 605 struct gaim_conversation *conv2; |
606 struct aim_user *user; | |
603 | 607 |
604 who = g_object_get_data(G_OBJECT(w), "user_data"); | 608 who = g_object_get_data(G_OBJECT(w), "user_data"); |
609 | |
610 user = gaim_conversation_get_user(conv); | |
605 | 611 |
606 conv2 = gaim_find_conversation(who); | 612 conv2 = gaim_find_conversation(who); |
607 | 613 |
608 if (conv2 != NULL) | 614 if (conv2 != NULL) |
609 gaim_window_show(gaim_conversation_get_window(conv2)); | 615 gaim_window_show(gaim_conversation_get_window(conv2)); |
610 else { | 616 else |
611 conv2 = gaim_conversation_new(GAIM_CONV_IM, who); | 617 conv2 = gaim_conversation_new(GAIM_CONV_IM, user, who); |
612 gaim_conversation_set_user(conv2, gaim_conversation_get_user(conv)); | |
613 } | |
614 } | 618 } |
615 | 619 |
616 static void | 620 static void |
617 menu_info_cb(GtkWidget *w, struct gaim_conversation *conv) | 621 menu_info_cb(GtkWidget *w, struct gaim_conversation *conv) |
618 { | 622 { |
708 | 712 |
709 if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { | 713 if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { |
710 struct gaim_conversation *c; | 714 struct gaim_conversation *c; |
711 | 715 |
712 if ((c = gaim_find_conversation(who)) == NULL) | 716 if ((c = gaim_find_conversation(who)) == NULL) |
713 c = gaim_conversation_new(GAIM_CONV_IM, who); | 717 c = gaim_conversation_new(GAIM_CONV_IM, user, who); |
714 | 718 else |
715 gaim_conversation_set_user(c, user); | 719 gaim_conversation_set_user(c, user); |
716 } | 720 } |
717 else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { | 721 else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { |
718 static GtkWidget *menu = NULL; | 722 static GtkWidget *menu = NULL; |
719 GtkWidget *button; | 723 GtkWidget *button; |
720 | 724 |