Mercurial > pidgin
comparison src/gtkconv.c @ 8908:a9ad52960c1c
[gaim-migrate @ 9678]
" This patch will fix misdisplayed friendly
names/aliases. For example a msn friendly name
containing a < would only display the name up until the
<. This probably breaks smileys in friendly names (is
that such a bad thing?), but if the user has added any
formating (<b>/<i>/<u>/etc) in the alias that will show
as text and not as formated.." --Gary Kramlich
i prefer the bug he is worried he might have introduced to the bug that he's fixing.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 08 May 2004 23:37:40 +0000 |
parents | 8ffd1679df93 |
children | 40ebc5ecf86a |
comparison
equal
deleted
inserted
replaced
8907:00138e366ef8 | 8908:a9ad52960c1c |
---|---|
4633 gtk_imhtml_append_text_with_images(GTK_IMHTML(gtkconv->imhtml), | 4633 gtk_imhtml_append_text_with_images(GTK_IMHTML(gtkconv->imhtml), |
4634 buf, 0, images); | 4634 buf, 0, images); |
4635 } | 4635 } |
4636 else { | 4636 else { |
4637 char *new_message = g_memdup(message, length); | 4637 char *new_message = g_memdup(message, length); |
4638 char *who_escaped = g_markup_escape_text(who, strlen(who)); | |
4638 | 4639 |
4639 if (flags & GAIM_MESSAGE_WHISPER) { | 4640 if (flags & GAIM_MESSAGE_WHISPER) { |
4640 str = g_malloc(1024); | 4641 str = g_malloc(1024); |
4641 | 4642 |
4642 /* If we're whispering, it's not an autoresponse. */ | 4643 /* If we're whispering, it's not an autoresponse. */ |
4643 if (gaim_message_meify(new_message, length)) { | 4644 if (gaim_message_meify(new_message, length)) { |
4644 g_snprintf(str, 1024, "***%s", who); | 4645 g_snprintf(str, 1024, "***%s", who_escaped); |
4645 strcpy(color, "#6C2585"); | 4646 strcpy(color, "#6C2585"); |
4646 } | 4647 } |
4647 else { | 4648 else { |
4648 g_snprintf(str, 1024, "*%s*:", who); | 4649 g_snprintf(str, 1024, "*%s*:", who_escaped); |
4649 strcpy(color, "#00FF00"); | 4650 strcpy(color, "#00FF00"); |
4650 } | 4651 } |
4651 } | 4652 } |
4652 else { | 4653 else { |
4653 if (gaim_message_meify(new_message, length)) { | 4654 if (gaim_message_meify(new_message, length)) { |
4654 str = g_malloc(1024); | 4655 str = g_malloc(1024); |
4655 | 4656 |
4656 if (flags & GAIM_MESSAGE_AUTO_RESP) | 4657 if (flags & GAIM_MESSAGE_AUTO_RESP) |
4657 g_snprintf(str, 1024, "%s ***%s", AUTO_RESPONSE, who); | 4658 g_snprintf(str, 1024, "%s ***%s", AUTO_RESPONSE, who_escaped); |
4658 else | 4659 else |
4659 g_snprintf(str, 1024, "***%s", who); | 4660 g_snprintf(str, 1024, "***%s", who_escaped); |
4660 | 4661 |
4661 if (flags & GAIM_MESSAGE_NICK) | 4662 if (flags & GAIM_MESSAGE_NICK) |
4662 strcpy(color, "#AF7F00"); | 4663 strcpy(color, "#AF7F00"); |
4663 else | 4664 else |
4664 strcpy(color, "#062585"); | 4665 strcpy(color, "#062585"); |
4665 } | 4666 } |
4666 else { | 4667 else { |
4667 str = g_malloc(1024); | 4668 str = g_malloc(1024); |
4668 if (flags & GAIM_MESSAGE_AUTO_RESP) | 4669 if (flags & GAIM_MESSAGE_AUTO_RESP) |
4669 g_snprintf(str, 1024, "%s %s", who, AUTO_RESPONSE); | 4670 g_snprintf(str, 1024, "%s %s", who_escaped, AUTO_RESPONSE); |
4670 else | 4671 else |
4671 g_snprintf(str, 1024, "%s:", who); | 4672 g_snprintf(str, 1024, "%s:", who_escaped); |
4672 if (flags & GAIM_MESSAGE_NICK) | 4673 if (flags & GAIM_MESSAGE_NICK) |
4673 strcpy(color, "#AF7F00"); | 4674 strcpy(color, "#AF7F00"); |
4674 else if (flags & GAIM_MESSAGE_RECV) { | 4675 else if (flags & GAIM_MESSAGE_RECV) { |
4675 if (flags & GAIM_MESSAGE_COLORIZE) { | 4676 if (flags & GAIM_MESSAGE_COLORIZE) { |
4676 const char *u; | 4677 const char *u; |
4687 strcpy(color, RECV_COLOR); | 4688 strcpy(color, RECV_COLOR); |
4688 } | 4689 } |
4689 else if (flags & GAIM_MESSAGE_SEND) | 4690 else if (flags & GAIM_MESSAGE_SEND) |
4690 strcpy(color, SEND_COLOR); | 4691 strcpy(color, SEND_COLOR); |
4691 } | 4692 } |
4693 | |
4694 if(who_escaped) | |
4695 g_free(who_escaped); | |
4692 } | 4696 } |
4693 | 4697 |
4694 if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps")) | 4698 if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps")) |
4695 g_snprintf(buf, BUF_LONG, | 4699 g_snprintf(buf, BUF_LONG, |
4696 "<FONT COLOR=\"%s\" %s><FONT SIZE=\"2\">(%s)</FONT> " | 4700 "<FONT COLOR=\"%s\" %s><FONT SIZE=\"2\">(%s)</FONT> " |