From: <the...@us...> - 2006-08-03 09:19:12
|
Revision: 16627 Author: thekingant Date: 2006-08-03 02:19:10 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16627&view=rev Log Message: ----------- Backport SVN revision #16626 from HEAD to v2_0_0 Original commit message Hopefully load non-ASCII aliases from our SSI information correctly more often with AIM/ICQ. Mattias Eriksson helped with this patch ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16626&view=rev Modified Paths: -------------- branches/v2_0_0/COPYRIGHT branches/v2_0_0/src/protocols/oscar/oscar.c Modified: branches/v2_0_0/COPYRIGHT =================================================================== --- branches/v2_0_0/COPYRIGHT 2006-08-03 09:17:05 UTC (rev 16626) +++ branches/v2_0_0/COPYRIGHT 2006-08-03 09:19:10 UTC (rev 16627) @@ -86,6 +86,7 @@ Nelson Elhage Ignacio J. Elia Brian Enigma +Mattias Eriksson Stefan Esser Steffen Eschenbacher Marc Etcheverry Modified: branches/v2_0_0/src/protocols/oscar/oscar.c =================================================================== --- branches/v2_0_0/src/protocols/oscar/oscar.c 2006-08-03 09:17:05 UTC (rev 16626) +++ branches/v2_0_0/src/protocols/oscar/oscar.c 2006-08-03 09:19:10 UTC (rev 16627) @@ -4785,7 +4785,18 @@ char *gname = aim_ssi_itemlist_findparentname(od->ssi.local, curitem->name); char *gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL; char *alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name); - char *alias_utf8 = alias ? oscar_utf8_try_convert(gc->account, alias) : NULL; + char *alias_utf8; + + if (alias != NULL) + { + if (g_utf8_validate(alias, -1, NULL)) + alias_utf8 = g_strdup(alias); + else + alias_utf8 = oscar_utf8_try_convert(account, alias); + } + else + alias_utf8 = NULL; + b = gaim_find_buddy(gc->account, curitem->name); /* Should gname be freed here? -- elb */ /* Not with the current code, but that might be cleaner -- med */ @@ -4945,8 +4956,18 @@ gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL; + alias = aim_ssi_getalias(od->ssi.local, gname, name); - alias_utf8 = alias ? oscar_utf8_try_convert(gc->account, alias) : NULL; + if (alias != NULL) + { + if (g_utf8_validate(alias, -1, NULL)) + alias_utf8 = g_strdup(alias); + else + alias_utf8 = oscar_utf8_try_convert(gaim_connection_get_account(gc), alias); + } + else + alias_utf8 = NULL; + b = gaim_find_buddy(gc->account, name); g_free(alias); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |