From 12e06cc1063923471b95e984a64be89a82bdb655 Mon Sep 17 00:00:00 2001 From: qarkai Date: Sun, 2 Oct 2016 09:51:47 +0300 Subject: [PATCH] Migrate pounces.xml to XDG data dir --HG-- branch : xdg-dirs --- libpurple/pounce.c | 6 +++--- libpurple/util.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libpurple/pounce.c b/libpurple/pounce.c index 8b8fc29eda..5fb2dbc380 100644 --- a/libpurple/pounce.c +++ b/libpurple/pounce.c @@ -278,7 +278,7 @@ sync_pounces(void) node = pounces_to_xmlnode(); data = purple_xmlnode_to_formatted_str(node, NULL); - purple_util_write_data_to_file("pounces.xml", data, -1); + purple_util_write_data_to_data_file("pounces.xml", data, -1); g_free(data); purple_xmlnode_free(node); } @@ -534,7 +534,7 @@ end_element_handler(GMarkupParseContext *context, const gchar *element_name, g_free(data->account_name); data->ui_name = NULL; - data->pounce = NULL; + data->pouncee = NULL; data->protocol_id = NULL; data->event_type = NULL; data->option_type = NULL; @@ -570,7 +570,7 @@ static GMarkupParser pounces_parser = static gboolean purple_pounces_load(void) { - gchar *filename = g_build_filename(purple_user_dir(), "pounces.xml", NULL); + gchar *filename = g_build_filename(purple_data_dir(), "pounces.xml", NULL); gchar *contents = NULL; gsize length; GMarkupParseContext *context; diff --git a/libpurple/util.c b/libpurple/util.c index 00ecd13e88..2f38ef4e76 100644 --- a/libpurple/util.c +++ b/libpurple/util.c @@ -63,6 +63,7 @@ migrate_to_xdg_base_dirs(void) purple_move_to_xdg_base_dir(purple_data_dir(), "certificates"); purple_move_to_xdg_base_dir(purple_cache_dir(), "icons"); purple_move_to_xdg_base_dir(purple_data_dir(), "logs"); + purple_move_to_xdg_base_dir(purple_data_dir(), "pounces.xml"); } return; -- 2.11.4.GIT