comparison finch/gntconv.c @ 31185:1e5654e2928d

propagate from branch 'im.pidgin.pidgin' (head ea17b906d0f9b7422adfebcbec58d7c06d3bd8bc) to branch 'im.pidgin.pidgin.openq' (head 0f8a2684fb6f0f7221bde3bedd5734241bfb7ff5)
author SHiNE CsyFeK <csyfek@gmail.com>
date Sat, 18 Jul 2009 15:15:45 +0000
parents 37741237d146
children f7c5bb2f6623
comparison
equal deleted inserted replaced
31184:a1e92a4d99b9 31185:1e5654e2928d
189 purple_conversation_write(ggconv->active_conv, "", _("Message was not sent, because you are not signed on."), 189 purple_conversation_write(ggconv->active_conv, "", _("Message was not sent, because you are not signed on."),
190 PURPLE_MESSAGE_ERROR | PURPLE_MESSAGE_NO_LOG, time(NULL)); 190 PURPLE_MESSAGE_ERROR | PURPLE_MESSAGE_NO_LOG, time(NULL));
191 } 191 }
192 else 192 else
193 { 193 {
194 char *escape = g_markup_escape_text((*text == '/' ? text + 1 : text), -1); 194 char *escape = purple_markup_escape_text((*text == '/' ? text + 1 : text), -1);
195 char *apos = purple_strreplace(escape, "&apos;", "'");
196 g_free(escape);
197 escape = apos;
198 switch (purple_conversation_get_type(ggconv->active_conv)) 195 switch (purple_conversation_get_type(ggconv->active_conv))
199 { 196 {
200 case PURPLE_CONV_TYPE_IM: 197 case PURPLE_CONV_TYPE_IM:
201 purple_conv_im_send_with_flags(PURPLE_CONV_IM(ggconv->active_conv), escape, PURPLE_MESSAGE_SEND); 198 purple_conv_im_send_with_flags(PURPLE_CONV_IM(ggconv->active_conv), escape, PURPLE_MESSAGE_SEND);
202 break; 199 break;
882 879
883 gnt_text_view_tag_change(GNT_TEXT_VIEW(ggconv->tv), "typing", NULL, TRUE); 880 gnt_text_view_tag_change(GNT_TEXT_VIEW(ggconv->tv), "typing", NULL, TRUE);
884 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), "\n", GNT_TEXT_FLAG_NORMAL); 881 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), "\n", GNT_TEXT_FLAG_NORMAL);
885 882
886 /* Unnecessary to print the timestamp for delayed message */ 883 /* Unnecessary to print the timestamp for delayed message */
887 if (purple_prefs_get_bool("/finch/conversations/timestamps")) 884 if (purple_prefs_get_bool("/finch/conversations/timestamps")) {
885 if (!mtime)
886 time(&mtime);
888 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), 887 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv),
889 purple_utf8_strftime("(%H:%M:%S)", localtime(&mtime)), gnt_color_pair(color_timestamp)); 888 purple_utf8_strftime("(%H:%M:%S)", localtime(&mtime)), gnt_color_pair(color_timestamp));
889 }
890 890
891 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), " ", GNT_TEXT_FLAG_NORMAL); 891 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), " ", GNT_TEXT_FLAG_NORMAL);
892 892
893 if (flags & PURPLE_MESSAGE_AUTO_RESP) 893 if (flags & PURPLE_MESSAGE_AUTO_RESP)
894 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), 894 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv),