| 663 |
663 |
| 664 /* This code will 'align' the name from the TOC */ |
664 /* This code will 'align' the name from the TOC */ |
| 665 /* server with what's in our record. We want to */ |
665 /* server with what's in our record. We want to */ |
| 666 /* store things how THEY want it... */ |
666 /* store things how THEY want it... */ |
| 667 if (strcmp(name, b->name)) { |
667 if (strcmp(name, b->name)) { |
| 668 GList *cnv = conversations; |
668 char *who = g_strdup(b->name); |
| 669 struct conversation *cv; |
|
| 670 |
|
| 671 char *who = g_malloc(80); |
|
| 672 |
|
| 673 strcpy(who, normalize(name)); |
|
| 674 |
|
| 675 while (cnv) { |
|
| 676 cv = (struct conversation *)cnv->data; |
|
| 677 if (!g_strcasecmp(who, normalize(cv->name))) { |
|
| 678 if (im_options & OPT_IM_ONE_WINDOW) { |
|
| 679 set_convo_tab_label(cv, b->name); |
|
| 680 } else { |
|
| 681 g_snprintf(cv->name, sizeof(cv->name), "%s", name); |
|
| 682 if (find_log_info(name) || (logging_options & OPT_LOG_ALL)) |
|
| 683 g_snprintf(who, 63, LOG_CONVERSATION_TITLE, name); |
|
| 684 else |
|
| 685 g_snprintf(who, 63, CONVERSATION_TITLE, name); |
|
| 686 gtk_window_set_title(GTK_WINDOW(cv->window), who); |
|
| 687 /* was g_free(buf), but break gives us that |
|
| 688 * and freeing twice is not good --Sumner */ |
|
| 689 break; |
|
| 690 } |
|
| 691 } |
|
| 692 cnv = cnv->next; |
|
| 693 } |
|
| 694 g_free(who); |
|
| 695 who = g_strdup(b->name); |
|
| 696 g_snprintf(b->name, sizeof(b->name), "%s", name); |
669 g_snprintf(b->name, sizeof(b->name), "%s", name); |
| 697 handle_buddy_rename(b, who); |
670 handle_buddy_rename(b, who); |
| 698 g_free(who); |
671 g_free(who); |
| 699 } |
672 } |
| 700 |
673 |