Mercurial > pidgin
changeset 31486:249ffc44061e
Fix bug in mxit_show_split_message() (the workaround for Pidgin's workaround
to GtkHTML) when messages with many links were not correctly split.
Set the PURPLE_MESSAGE_RAW flag for the 2nd, 3rd, etc piece of the mesage so
that it looks like one message. We can now remove the prepended
"continuing..." text.
author | andrew.victor@mxit.com |
---|---|
date | Mon, 21 Mar 2011 19:40:36 +0000 |
parents | aa74632c869d |
children | cfb5364a0381 |
files | libpurple/protocols/mxit/markup.c |
diffstat | 1 files changed, 6 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/markup.c Mon Mar 21 16:30:01 2011 +0000 +++ b/libpurple/protocols/mxit/markup.c Mon Mar 21 19:40:36 2011 +0000 @@ -235,7 +235,6 @@ */ static void mxit_show_split_message( struct RXMsgData* mx ) { - const char* cont = "<font color=\"#999999\">continuing...</font>\n"; GString* msg = NULL; char* ch = NULL; int pos = 0; @@ -245,7 +244,6 @@ int l_gt = 0; int stop = 0; int tags = 0; - int segs = 0; gboolean intag = FALSE; /* @@ -319,21 +317,20 @@ stop--; } - /* build the string */ - if ( segs ) - g_string_prepend( msg, cont ); - /* push message to pidgin */ serv_got_im( mx->session->con, mx->from, msg->str, mx->flags, mx->timestamp ); g_string_free( msg, TRUE ); msg = NULL; + /* next part need this flag set */ + mx->flags |= PURPLE_MESSAGE_RAW; + tags = 0; - segs++; start = stop + 1; + pos = start; } - - pos++; + else + pos++; } if ( start != pos ) { @@ -343,8 +340,6 @@ ch[pos] = '\0'; msg = g_string_new( &ch[start] ); ch[pos] = '\n'; - if ( segs ) - g_string_prepend( msg, cont ); /* push message to pidgin */ serv_got_im( mx->session->con, mx->from, msg->str, mx->flags, mx->timestamp );