# HG changeset patch # User Mark Doliner # Date 1102657741 0 # Node ID ee4f477fc8cf404aae4f886c2f8d32afb5ca0b13 # Parent 476bf80b8ad89c0aa602e36afcacc110df74fe92 [gaim-migrate @ 11553] Minor tweaks to the blist and status xml reading code. These functions don't expect the filename to be called "blist.xml" and "status.xml" anymore. Some guy wanted this because he wants to try to add some sort of AIM buddy list importing, or something. I think. committer: Tailor Script diff -r 476bf80b8ad8 -r ee4f477fc8cf src/blist.c --- a/src/blist.c Fri Dec 10 05:26:26 2004 +0000 +++ b/src/blist.c Fri Dec 10 05:49:01 2004 +0000 @@ -1959,7 +1959,7 @@ gaim_debug_info("blist", "Reading %s\n", filename); if (!g_file_get_contents(filename, &contents, &length, &error)) { - gaim_debug_error("blist", "Error reading blist.xml: %s\n", + gaim_debug_error("blist", "Error reading buddy list: %s\n", error->message); g_error_free(error); return FALSE; @@ -1970,8 +1970,8 @@ if (gaim == NULL) { FILE *backup; char *name; - gaim_debug_error("blist", "Error parsing blist.xml\n"); - name = g_build_filename(gaim_user_dir(), "blist.xml~", NULL); + gaim_debug_error("blist", "Error parsing buddy list\n"); + name = g_strdup_printf("%s~", filename); if ((backup = fopen(name, "w"))) { fwrite(contents, length, 1, backup); fclose(backup); @@ -2036,7 +2036,7 @@ } } - gaim_debug_info("blist", "Finished reading blist.xml\n"); + gaim_debug_info("blist", "Finished reading buddy list\n"); xmlnode_free(gaim); @@ -2280,7 +2280,7 @@ if (exp_acct && chat->account != exp_acct) return; - + acct_name = g_markup_escape_text(chat->account->username, -1); fprintf(file, "\t\t\t\n", gaim_account_get_protocol_id(chat->account), acct_name); diff -r 476bf80b8ad8 -r ee4f477fc8cf src/status.c --- a/src/status.c Fri Dec 10 05:26:26 2004 +0000 +++ b/src/status.c Fri Dec 10 05:49:01 2004 +0000 @@ -1829,7 +1829,7 @@ gaim_debug_info("status", "Reading %s\n", filename); if (!g_file_get_contents(filename, &contents, &length, &error)) { - gaim_debug_error("status", "Error reading status.xml: %s\n", + gaim_debug_error("status", "Error reading statuses: %s\n", error->message); g_error_free(error); return FALSE; @@ -1840,8 +1840,8 @@ if (statuses == NULL) { FILE *backup; gchar *name; - gaim_debug_error("status", "Error parsing status.xml\n"); - name = g_build_filename(gaim_user_dir(), "status.xml~", NULL); + gaim_debug_error("status", "Error parsing statuses\n"); + name = g_strdup_printf("%s~", filename); if ((backup = fopen(name, "w"))) { fwrite(contents, length, 1, backup); fclose(backup); @@ -1861,7 +1861,7 @@ gaim_statuses_read_parse_status(status); } - gaim_debug_info("status", "Finished reading status.xml\n"); + gaim_debug_info("status", "Finished reading statuses\n"); xmlnode_free(statuses);