From: <ev...@us...> - 2006-12-20 20:06:50
|
Revision: 18031 http://svn.sourceforge.net/gaim/?rev=18031&view=rev Author: evands Date: 2006-12-20 12:06:47 -0800 (Wed, 20 Dec 2006) Log Message: ----------- * Improved gaim_plugin_oscar_decode_im_part()'s error message; "the buddy you are talking to" is awkward and wrong, and "the buddy to whom you are talking" is just silly. Use the buddy's screenname instead. * Pass the screen name to gaim_plugin_oscar_decode_im_part() in incomingim_chan4() as is done elsewhere rather than passing "1" as the name. Modified Paths: -------------- trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-20 09:35:24 UTC (rev 18030) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-20 20:06:47 UTC (rev 18031) @@ -427,17 +427,19 @@ if (ret == NULL) ret = gaim_plugin_oscar_convert_to_utf8(data, datalen, charsetstr2, TRUE); if (ret == NULL) { - char *str, *salvage; + char *str, *salvage, tmp; str = g_malloc(datalen + 1); strncpy(str, data, datalen); str[datalen] = '\0'; salvage = gaim_utf8_salvage(str); - ret = g_strdup_printf("%s %s", salvage, - _("(There was an error receiving this message. Either you and the buddy you are speaking to have a different encoding selected, or the buddy has a buggy client.)")); + tmp = g_strdup_printf(_("(There was an error receiving this message. Either you and %s have different encodings selected, or %s has a buggy client.)"), + sourcesn, sourcesn); + ret = g_strdup_printf("%s %s", salvage, tmp); + g_free(tmp); g_free(str); g_free(salvage); - } + } return ret; } @@ -2295,9 +2297,12 @@ for (numtoks=0; msg1[numtoks]; numtoks++); msg2 = (gchar **)g_malloc((numtoks+1)*sizeof(gchar *)); for (i=0; msg1[i]; i++) { + gchar *uin = g_strdup_printf("%u", args->uin); + gaim_str_strip_char(msg1[i], '\r'); /* TODO: Should use an encoding other than ASCII? */ - msg2[i] = gaim_plugin_oscar_decode_im_part(account, "1", AIM_CHARSET_ASCII, 0x0000, msg1[i], strlen(msg1[i])); + msg2[i] = gaim_plugin_oscar_decode_im_part(account, uin, AIM_CHARSET_ASCII, 0x0000, msg1[i], strlen(msg1[i])); + g_free(uin); } msg2[i] = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |