comparison libpurple/protocols/yahoo/yahoo_aliases.c @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents 2ec94166be43
children
comparison
equal deleted inserted replaced
32692:0f94ec89f0bc 32827:4a34689eeb33
329 if (yd->jp) { 329 if (yd->jp) {
330 gchar *alias_jp = g_convert(alias, -1, "EUC-JP", "UTF-8", NULL, NULL, NULL); 330 gchar *alias_jp = g_convert(alias, -1, "EUC-JP", "UTF-8", NULL, NULL, NULL);
331 gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp); 331 gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp);
332 content = g_strdup_printf("<ab k=\"%s\" cc=\"9\">\n" 332 content = g_strdup_printf("<ab k=\"%s\" cc=\"9\">\n"
333 "<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n", 333 "<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n",
334 purple_account_get_username(gc->account), 334 purple_account_get_username(purple_connection_get_account(gc)),
335 who, converted_alias_jp); 335 who, converted_alias_jp);
336 g_free(converted_alias_jp); 336 g_free(converted_alias_jp);
337 g_free(alias_jp); 337 g_free(alias_jp);
338 } else { 338 } else {
339 gchar *escaped_alias = g_markup_escape_text(alias, -1); 339 gchar *escaped_alias = g_markup_escape_text(alias, -1);
340 content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"9\">\n" 340 content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"9\">\n"
341 "<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n", 341 "<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n",
342 purple_account_get_username(gc->account), 342 purple_account_get_username(purple_connection_get_account(gc)),
343 who, escaped_alias); 343 who, escaped_alias);
344 g_free(escaped_alias); 344 g_free(escaped_alias);
345 } 345 }
346 } else { 346 } else {
347 purple_debug_info("yahoo", "Updating '%s' as new alias for user '%s'\n", alias, who); 347 purple_debug_info("yahoo", "Updating '%s' as new alias for user '%s'\n", alias, who);
349 if (yd->jp) { 349 if (yd->jp) {
350 gchar *alias_jp = g_convert(alias, -1, "EUC-JP", "UTF-8", NULL, NULL, NULL); 350 gchar *alias_jp = g_convert(alias, -1, "EUC-JP", "UTF-8", NULL, NULL, NULL);
351 gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp); 351 gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp);
352 content = g_strdup_printf("<ab k=\"%s\" cc=\"1\">\n" 352 content = g_strdup_printf("<ab k=\"%s\" cc=\"1\">\n"
353 "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n", 353 "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
354 purple_account_get_username(gc->account), 354 purple_account_get_username(purple_connection_get_account(gc)),
355 who, cb->id, converted_alias_jp); 355 who, cb->id, converted_alias_jp);
356 g_free(converted_alias_jp); 356 g_free(converted_alias_jp);
357 g_free(alias_jp); 357 g_free(alias_jp);
358 } else { 358 } else {
359 gchar *escaped_alias = g_markup_escape_text(alias, -1); 359 gchar *escaped_alias = g_markup_escape_text(alias, -1);
360 content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n" 360 content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n"
361 "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n", 361 "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
362 purple_account_get_username(gc->account), 362 purple_account_get_username(purple_connection_get_account(gc)),
363 who, cb->id, escaped_alias); 363 who, cb->id, escaped_alias);
364 g_free(escaped_alias); 364 g_free(escaped_alias);
365 } 365 }
366 } 366 }
367 367