| 5968 char *new_message = g_memdup(displaying, length); |
5968 char *new_message = g_memdup(displaying, length); |
| 5969 char *alias_escaped = (alias ? g_markup_escape_text(alias, strlen(alias)) : g_strdup("")); |
5969 char *alias_escaped = (alias ? g_markup_escape_text(alias, strlen(alias)) : g_strdup("")); |
| 5970 /* The initial offset is to deal with |
5970 /* The initial offset is to deal with |
| 5971 * escaped entities making the string longer */ |
5971 * escaped entities making the string longer */ |
| 5972 int tag_start_offset = 0; |
5972 int tag_start_offset = 0; |
| 5973 int tag_end_offset = 0; |
|
| 5974 const char *tagname = NULL; |
5973 const char *tagname = NULL; |
| 5975 |
5974 |
| 5976 GtkTextIter start, end; |
5975 GtkTextIter start, end; |
| 5977 GtkTextMark *mark; |
5976 GtkTextMark *mark; |
| 5978 GtkTextTag *tag; |
5977 GtkTextTag *tag; |
| 5991 tagname = "whisper-action-name"; |
5990 tagname = "whisper-action-name"; |
| 5992 } |
5991 } |
| 5993 else { |
5992 else { |
| 5994 g_snprintf(str, 1024, "*%s*:", alias_escaped); |
5993 g_snprintf(str, 1024, "*%s*:", alias_escaped); |
| 5995 tag_start_offset += 1; |
5994 tag_start_offset += 1; |
| |
5995 #if 0 |
| 5996 tag_end_offset = 2; |
5996 tag_end_offset = 2; |
| |
5997 #endif |
| 5997 tagname = "whisper-name"; |
5998 tagname = "whisper-name"; |
| 5998 } |
5999 } |
| 5999 } else { |
6000 } else { |
| 6000 if (purple_message_meify(new_message, -1)) { |
6001 if (purple_message_meify(new_message, -1)) { |
| 6001 if (flags & PURPLE_MESSAGE_AUTO_RESP) { |
6002 if (flags & PURPLE_MESSAGE_AUTO_RESP) { |
| 6014 if (flags & PURPLE_MESSAGE_AUTO_RESP) { |
6015 if (flags & PURPLE_MESSAGE_AUTO_RESP) { |
| 6015 g_snprintf(str, 1024, "%s %s", alias_escaped, AUTO_RESPONSE); |
6016 g_snprintf(str, 1024, "%s %s", alias_escaped, AUTO_RESPONSE); |
| 6016 tag_start_offset += strlen(AUTO_RESPONSE) - 6 + 1; |
6017 tag_start_offset += strlen(AUTO_RESPONSE) - 6 + 1; |
| 6017 } else { |
6018 } else { |
| 6018 g_snprintf(str, 1024, "%s:", alias_escaped); |
6019 g_snprintf(str, 1024, "%s:", alias_escaped); |
| |
6020 #if 0 |
| 6019 tag_end_offset = 1; |
6021 tag_end_offset = 1; |
| |
6022 #endif |
| 6020 } |
6023 } |
| 6021 |
6024 |
| 6022 if (flags & PURPLE_MESSAGE_NICK) { |
6025 if (flags & PURPLE_MESSAGE_NICK) { |
| 6023 if (type == PURPLE_CONV_TYPE_IM) { |
6026 if (type == PURPLE_CONV_TYPE_IM) { |
| 6024 tagname = "highlight-name"; |
6027 tagname = "highlight-name"; |